All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/3] LEGO MINDSTORMS EV3 kernel 4.19 update
@ 2018-12-27 19:53 David Lechner
  2018-12-27 19:53 ` [Buildroot] [PATCH 1/3] linux-firmware: Add config option for TI CC2560(A) Bluetooth module David Lechner
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: David Lechner @ 2018-12-27 19:53 UTC (permalink / raw)
  To: buildroot

This series updates LEGO MINDSTORMS EV3 to the current LTS kernel (4.19). See
individual commit messages for details.

David Lechner (3):
  linux-firmware: Add config option for TI CC2560(A) Bluetooth module
  board/lego/ev3: fix max U-Boot flash size
  board/lego/ev3: Update to Linux kernel 4.19 and U-Boot 2018.11

 board/lego/ev3/genimage.cfg                   | 14 +++++++--
 board/lego/ev3/linux.fragment                 |  6 ++++
 ...s-legoev3-increase-flash-image-sizes.patch | 31 -------------------
 board/lego/ev3/readme.txt                     | 17 ++++++++++
 configs/lego_ev3_defconfig                    | 19 +++++++-----
 package/linux-firmware/Config.in              |  5 +++
 package/linux-firmware/linux-firmware.mk      |  8 +++++
 7 files changed, 59 insertions(+), 41 deletions(-)
 delete mode 100644 board/lego/ev3/patches/uboot/configs-legoev3-increase-flash-image-sizes.patch

-- 
2.17.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 1/3] linux-firmware: Add config option for TI CC2560(A) Bluetooth module
  2018-12-27 19:53 [Buildroot] [PATCH 0/3] LEGO MINDSTORMS EV3 kernel 4.19 update David Lechner
@ 2018-12-27 19:53 ` David Lechner
  2018-12-27 19:53 ` [Buildroot] [PATCH 2/3] board/lego/ev3: fix max U-Boot flash size David Lechner
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: David Lechner @ 2018-12-27 19:53 UTC (permalink / raw)
  To: buildroot

This adds a new config option to include the firmware files for the TI
CC2560 and CC2560A Bluetooth modules. LEGO MINDSTORMS EV3 has one of
these two modules depending on when it was manufactured, so it is useful
to include both firmwares to cover all cases for this device.

Signed-off-by: David Lechner <david@lechnology.com>
---
 package/linux-firmware/Config.in         | 5 +++++
 package/linux-firmware/linux-firmware.mk | 8 ++++++++
 2 files changed, 13 insertions(+)

diff --git a/package/linux-firmware/Config.in b/package/linux-firmware/Config.in
index bb88afeec2..dcc8d4bade 100644
--- a/package/linux-firmware/Config.in
+++ b/package/linux-firmware/Config.in
@@ -282,6 +282,11 @@ config BR2_PACKAGE_LINUX_FIRMWARE_REDPINE_RS9113
 	help
 	  Firmware files for WLAN and Bluetooth modules rs9113
 
+config BR2_PACKAGE_LINUX_FIRMWARE_TI_CC2560
+	bool "TI CC2560"
+	help
+	  Firmware files for Bluetooth modules CC2560 and CC2560A
+
 config BR2_PACKAGE_LINUX_FIRMWARE_TI_WL127X
 	bool "TI wl127x"
 	help
diff --git a/package/linux-firmware/linux-firmware.mk b/package/linux-firmware/linux-firmware.mk
index e5cd56d9a5..ee02c7a030 100644
--- a/package/linux-firmware/linux-firmware.mk
+++ b/package/linux-firmware/linux-firmware.mk
@@ -249,6 +249,14 @@ LINUX_FIRMWARE_FILES += ath10k/QCA6174
 LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENSE.QualcommAtheros_ath10k
 endif
 
+# CC2560(A)
+ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_TI_CC2560),y)
+LINUX_FIRMWARE_FILES += \
+	ti-connectivity/TIInit_6.2.31.bts \
+	ti-connectivity/TIInit_6.6.15.bts
+LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.ti-connectivity
+endif
+
 # wl127x
 ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_TI_WL127X),y)
 # wl1271-nvs.bin is a symlink to wl127x-nvs.bin
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/3] board/lego/ev3: fix max U-Boot flash size
  2018-12-27 19:53 [Buildroot] [PATCH 0/3] LEGO MINDSTORMS EV3 kernel 4.19 update David Lechner
  2018-12-27 19:53 ` [Buildroot] [PATCH 1/3] linux-firmware: Add config option for TI CC2560(A) Bluetooth module David Lechner
@ 2018-12-27 19:53 ` David Lechner
  2019-01-18 13:09   ` Peter Korsgaard
  2018-12-27 19:53 ` [Buildroot] [PATCH 3/3] board/lego/ev3: Update to Linux kernel 4.19 and U-Boot 2018.11 David Lechner
  2018-12-28 10:50 ` [Buildroot] [PATCH 0/3] LEGO MINDSTORMS EV3 kernel 4.19 update Thomas Petazzoni
  3 siblings, 1 reply; 6+ messages in thread
From: David Lechner @ 2018-12-27 19:53 UTC (permalink / raw)
  To: buildroot

The first stage bootloader on LEGO MINDSTORMS EV3 only loads the first
256K of the flash memory (this is hard-coded in an EEPROM). So, the
second stage bootloader (U-Boot) cannot exceed this size.

Signed-off-by: David Lechner <david@lechnology.com>
---
 board/lego/ev3/genimage.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/lego/ev3/genimage.cfg b/board/lego/ev3/genimage.cfg
index 3da3048d8d..65d9714650 100644
--- a/board/lego/ev3/genimage.cfg
+++ b/board/lego/ev3/genimage.cfg
@@ -16,7 +16,7 @@ image flash.bin {
 	flashtype = "nor-16M-256"
 	partition uboot {
 		image = "u-boot.bin"
-		size = 320K
+		size = 256K
 	}
 	partition uimage {
 		image = "uImage.da850-lego-ev3"
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 3/3] board/lego/ev3: Update to Linux kernel 4.19 and U-Boot 2018.11
  2018-12-27 19:53 [Buildroot] [PATCH 0/3] LEGO MINDSTORMS EV3 kernel 4.19 update David Lechner
  2018-12-27 19:53 ` [Buildroot] [PATCH 1/3] linux-firmware: Add config option for TI CC2560(A) Bluetooth module David Lechner
  2018-12-27 19:53 ` [Buildroot] [PATCH 2/3] board/lego/ev3: fix max U-Boot flash size David Lechner
@ 2018-12-27 19:53 ` David Lechner
  2018-12-28 10:50 ` [Buildroot] [PATCH 0/3] LEGO MINDSTORMS EV3 kernel 4.19 update Thomas Petazzoni
  3 siblings, 0 replies; 6+ messages in thread
From: David Lechner @ 2018-12-27 19:53 UTC (permalink / raw)
  To: buildroot

This updates LEGO MINDSTORMS EV3 to Linux kernel 4.19 and U-Boot
2018.11. This kernel brings Bluetooth support, so some Bluez packages
are also added. Also, we now have proper device tree support, so a few
things are rearranged in the flash and SD card images since the DTB is
no longer appended to the kernel image.

Signed-off-by: David Lechner <david@lechnology.com>
---
 board/lego/ev3/genimage.cfg                   | 12 +++++--
 board/lego/ev3/linux.fragment                 |  6 ++++
 ...s-legoev3-increase-flash-image-sizes.patch | 31 -------------------
 board/lego/ev3/readme.txt                     | 17 ++++++++++
 configs/lego_ev3_defconfig                    | 19 +++++++-----
 5 files changed, 45 insertions(+), 40 deletions(-)
 delete mode 100644 board/lego/ev3/patches/uboot/configs-legoev3-increase-flash-image-sizes.patch

diff --git a/board/lego/ev3/genimage.cfg b/board/lego/ev3/genimage.cfg
index 65d9714650..14880e8f11 100644
--- a/board/lego/ev3/genimage.cfg
+++ b/board/lego/ev3/genimage.cfg
@@ -18,8 +18,13 @@ image flash.bin {
 		image = "u-boot.bin"
 		size = 256K
 	}
+	partition dtb {
+		image = "da850-lego-ev3.dtb"
+		size = 64K
+		offset = 0x40000
+	}
 	partition uimage {
-		image = "uImage.da850-lego-ev3"
+		image = "uImage"
 		size = 4M
 		offset = 0x50000
 	}
@@ -35,7 +40,10 @@ image flash.bin {
 image boot.vfat {
 	vfat {
 		file uImage {
-			image = "uImage.da850-lego-ev3"
+			image = "uImage"
+		}
+		file da850-lego-ev3.dtb {
+			image = "da850-lego-ev3.dtb"
 		}
 	}
 	size = 16M
diff --git a/board/lego/ev3/linux.fragment b/board/lego/ev3/linux.fragment
index 30dea57b6c..79efd27d37 100644
--- a/board/lego/ev3/linux.fragment
+++ b/board/lego/ev3/linux.fragment
@@ -1,3 +1,4 @@
+CONFIG_ARM_APPENDED_DTB=n
 CONFIG_ARCH_DAVINCI_DM644x=n
 CONFIG_ARCH_DAVINCI_DM355=n
 CONFIG_ARCH_DAVINCI_DM646x=n
@@ -60,3 +61,8 @@ CONFIG_DRM_DUMB_VGA_DAC=n
 CONFIG_DRM_TINYDRM=y
 CONFIG_TINYDRM_ST7586=y
 CONFIG_FB_DA8XX=n
+CONFIG_COMMON_CLK_PWM=y
+CONFIG_BT=y
+CONFIG_BT_HS=n
+CONFIG_BT_LE=n
+CONFIG_RFKILL=y
diff --git a/board/lego/ev3/patches/uboot/configs-legoev3-increase-flash-image-sizes.patch b/board/lego/ev3/patches/uboot/configs-legoev3-increase-flash-image-sizes.patch
deleted file mode 100644
index ee0ce61603..0000000000
--- a/board/lego/ev3/patches/uboot/configs-legoev3-increase-flash-image-sizes.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From cdd8d11858fa34f6e813fae46b5556e9fb3570dc Mon Sep 17 00:00:00 2001
-From: David Lechner <david@lechnology.com>
-Date: Sun, 19 Nov 2017 19:54:32 -0600
-Subject: [PATCH] configs: legoev3: increase flash image sizes
-
-This increases the kernel image to 4M and the rootfs image to 10M.
-
-It is getting hard to get a kernel image to fit in 3M and the rootfs image
-size now matches the filesyssize variable.
-
-Signed-off-by: David Lechner <david@lechnology.com>
----
- include/configs/legoev3.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/include/configs/legoev3.h b/include/configs/legoev3.h
-index 79fa3c4..2eeaf85 100644
---- a/include/configs/legoev3.h
-+++ b/include/configs/legoev3.h
-@@ -204,7 +204,7 @@
- 	"mmcargs=setenv bootargs mem=${memsize} console=${console} root=/dev/mmcblk0p2 rw rootwait lpj=747520\0" \
- 	"mmcboot=bootm ${loadaddr}\0" \
- 	"flashargs=setenv bootargs mem=${memsize} initrd=${filesysaddr},${filesyssize} root=/dev/ram0 rw rootfstype=squashfs console=${console} lpj=747520\0" \
--	"flashboot=sf probe 0; sf read ${loadaddr} 0x50000 0x300000; sf read ${filesysaddr} 0x350000 0x960000; bootm ${loadaddr}\0" \
-+	"flashboot=sf probe 0; sf read ${loadaddr} 0x50000 0x400000; sf read ${filesysaddr} 0x450000 0xA00000; bootm ${loadaddr}\0" \
- 	"loadimage=fatload mmc 0 ${loadaddr} uImage\0" \
- 	"loadbootscr=fatload mmc 0 ${bootscraddr} boot.scr\0" \
- 	"bootscript=source ${bootscraddr}\0" \
--- 
-2.7.4
-
diff --git a/board/lego/ev3/readme.txt b/board/lego/ev3/readme.txt
index 8df91ac111..648bca1e91 100644
--- a/board/lego/ev3/readme.txt
+++ b/board/lego/ev3/readme.txt
@@ -70,6 +70,13 @@ official Lego Mindstorms EV3 programming software firmware update tool to load
 the image. To use sdcard.img, use a disk writing tool such as Etcher or dd to
 write the image to the ?SD card.
 
+NOTE: The sdcard.img created by lego_ev3_defconfig won't boot if the official
+LEGO firmware is installed on the EV3 (it has an old version of U-Boot that
+doesn't know about device tree). You must either set the kernel configuration
+option to append the device tree to the kernel or you can create a boot.scr
+that chainloads a newer U-Boot or you can install a newer U-Boot in the flash
+memory (just flashing u-boot.bin is enough).
+
 Finish
 ======
 
@@ -80,3 +87,13 @@ See:
 - http://botbench.com/blog/2013/08/05/mindsensors-ev3-usb-console-adapter/
 
 The serial port config to use is 115200/8-N-1.
+
+Bluetooth
+=========
+
+To enable Bluetooth:
+
+    # modprobe hci_uart
+    # /usr/libexec/bluetooth/bluetoothd &
+    # bluetoothctl
+    [bluetooth]# power on
diff --git a/configs/lego_ev3_defconfig b/configs/lego_ev3_defconfig
index 0281924133..cf2809059e 100644
--- a/configs/lego_ev3_defconfig
+++ b/configs/lego_ev3_defconfig
@@ -2,28 +2,33 @@
 BR2_arm=y
 BR2_arm926t=y
 
-# Build options
-BR2_GLOBAL_PATCH_DIR="board/lego/ev3/patches"
+# Toolchain
+BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
 
 # system
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS1"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/lego/ev3/post-image.sh"
-# Linux headers same as kernel, a 4.14 series
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_14=y
+# Linux headers same as kernel, a 4.19 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
 
 # Kernel
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19"
 BR2_LINUX_KERNEL_DEFCONFIG="davinci_all"
 BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/lego/ev3/linux.fragment"
+BR2_LINUX_KERNEL_UIMAGE=y
 BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0xc0008000"
-BR2_LINUX_KERNEL_APPENDED_UIMAGE=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="da850-lego-ev3"
 
 # Target packages
 BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="board/lego/ev3/busybox.fragment"
+BR2_PACKAGE_BLUEZ5_UTILS=y
+BR2_PACKAGE_BLUEZ5_UTILS_CLIENT=y
+BR2_PACKAGE_LINUX_FIRMWARE=y
+BR2_PACKAGE_LINUX_FIRMWARE_TI_CC2560=y
 
 # filesystem
 BR2_TARGET_ROOTFS_EXT2=y
@@ -36,7 +41,7 @@ BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.11"
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2018.11"
 BR2_TARGET_UBOOT_BOARD_DEFCONFIG="legoev3"
 
 # host
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 0/3] LEGO MINDSTORMS EV3 kernel 4.19 update
  2018-12-27 19:53 [Buildroot] [PATCH 0/3] LEGO MINDSTORMS EV3 kernel 4.19 update David Lechner
                   ` (2 preceding siblings ...)
  2018-12-27 19:53 ` [Buildroot] [PATCH 3/3] board/lego/ev3: Update to Linux kernel 4.19 and U-Boot 2018.11 David Lechner
@ 2018-12-28 10:50 ` Thomas Petazzoni
  3 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2018-12-28 10:50 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 27 Dec 2018 13:53:02 -0600, David Lechner wrote:

> David Lechner (3):
>   linux-firmware: Add config option for TI CC2560(A) Bluetooth module
>   board/lego/ev3: fix max U-Boot flash size
>   board/lego/ev3: Update to Linux kernel 4.19 and U-Boot 2018.11

Series applied. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/3] board/lego/ev3: fix max U-Boot flash size
  2018-12-27 19:53 ` [Buildroot] [PATCH 2/3] board/lego/ev3: fix max U-Boot flash size David Lechner
@ 2019-01-18 13:09   ` Peter Korsgaard
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2019-01-18 13:09 UTC (permalink / raw)
  To: buildroot

>>>>> "David" == David Lechner <david@lechnology.com> writes:

 > The first stage bootloader on LEGO MINDSTORMS EV3 only loads the first
 > 256K of the flash memory (this is hard-coded in an EEPROM). So, the
 > second stage bootloader (U-Boot) cannot exceed this size.

 > Signed-off-by: David Lechner <david@lechnology.com>

Committed to 2018.02.x and 2018.11.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-18 13:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-27 19:53 [Buildroot] [PATCH 0/3] LEGO MINDSTORMS EV3 kernel 4.19 update David Lechner
2018-12-27 19:53 ` [Buildroot] [PATCH 1/3] linux-firmware: Add config option for TI CC2560(A) Bluetooth module David Lechner
2018-12-27 19:53 ` [Buildroot] [PATCH 2/3] board/lego/ev3: fix max U-Boot flash size David Lechner
2019-01-18 13:09   ` Peter Korsgaard
2018-12-27 19:53 ` [Buildroot] [PATCH 3/3] board/lego/ev3: Update to Linux kernel 4.19 and U-Boot 2018.11 David Lechner
2018-12-28 10:50 ` [Buildroot] [PATCH 0/3] LEGO MINDSTORMS EV3 kernel 4.19 update Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.