Skip to contentSkip to conversation

configs/roseapplepi: switch to mainline 5.7.19 kernel

Buildroot Applied Peter Korsgaard 2 participants 2 messages Aug 28, 2020 Arm/actions semi architecture

lore
Share & tools
lore
#0 lore raw

Mainline Linux now has basic s500/roseapplepi support, so switch to that to get rid of the dependency on gcc7. Add two patches for the dts / fix that didn't make it for kernel 5.7.

The mainline kernel does not yet have support for the mmc interface, so change to initramfs for now. Patches for mmc support have been posted recently, so this can be reverted once they show up in a stable kernel:

https://lore.kernel.org/lkml/cover.1593124368.git.cristian.ciocaltea at gmail.com/

The owl serial port is called ttyOWLn in mainline, so adjust the bootargs to match. Also drop the unneeded execute permission on uEnv.txt.

---
 board/roseapplepi/genimage.cfg                |  10 +-
 board/roseapplepi/linux.config                |  45 +++
 ...1-arm-dts-owl-s500-Fix-incorrect-PPI.patch |  52 +++
 .../linux/0001-unbreak-xhci-trace.patch       |  31 --
 ...002-arm-dts-owl-s500-add-RoseapplePi.patch |  89 +++++
 .../0002-kernel-add-support-for-gcc-5.patch   |  99 -----
 ...inux-use-static-inline-in-ARM-ftrace.patch |  54 ---
 .../0004-Fix-compile-errors-with-gcc5.patch   | 121 ------
 ...egrate-the-various-compiler-gcc-345-.patch | 363 ------------------
 board/roseapplepi/uEnv.txt                    |   2 +-
 configs/roseapplepi_defconfig                 |  20 +-
 11 files changed, 198 insertions(+), 688 deletions(-)
 create mode 100644 board/roseapplepi/linux.config
 create mode 100644 board/roseapplepi/patches/linux/0001-arm-dts-owl-s500-Fix-incorrect-PPI.patch
 delete mode 100644 board/roseapplepi/patches/linux/0001-unbreak-xhci-trace.patch
 create mode 100644 board/roseapplepi/patches/linux/0002-arm-dts-owl-s500-add-RoseapplePi.patch
 delete mode 100644 board/roseapplepi/patches/linux/0002-kernel-add-support-for-gcc-5.patch
 delete mode 100644 board/roseapplepi/patches/linux/0003-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
 delete mode 100644 board/roseapplepi/patches/linux/0004-Fix-compile-errors-with-gcc5.patch
 delete mode 100644 board/roseapplepi/patches/linux/0005-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch
 mode change 100755 => 100644 board/roseapplepi/uEnv.txt
board/roseapplepi/genimage.cfg +2 -8
index 4d40e65bba..f4a353e823 100644
@@ -7,10 +7,10 @@ image boot.vfat {
 		     "uImage"
 		}
 		file kernel.dtb {
-		     image = "actduino_bubble_gum_sdboot_linux.dtb"
+		     image = "owl-s500-roseapplepi.dtb"
 		}
 	}
-	size = 10M
+	size = 128M
 }
 
 image sdcard.img {
@@ -34,10 +34,4 @@ image sdcard.img {
 		bootable = "true"
 		image = "boot.vfat"
 	}
-
-	partition rootfs {
-		partition-type = 0x83
-		image = "rootfs.ext4"
-		size = 512M
-	}
 }
board/roseapplepi/linux.config new file +45 -0

45 lines not on this page · raw message

board/roseapplepi/patches/linux/0001-arm-dts-owl-s500-Fix-incorrect-PPI.patch new file +52 -0

52 lines not on this page · raw message

board/roseapplepi/patches/linux/0001-unbreak-xhci-trace.patch deleted +0 -31
deleted file mode 100644
index 79e8c800d2..0000000000
@@ -1,31 +0,0 @@
-[PATCH] unbreak xhci-trace compilation
-
-When commit 84a99f6fc5d4 (xhci: add traces for debug messages in
-xhci_address_device) was backported to the owl tree as part of commit
-5b2ea66f15396 (usb: add owl usb driver), the specific CFLAGS needed for
-xhci-trace.c were missed, causing build breakage:
-
-  CC      drivers/usb/host/xhci-trace.o
-In file included from drivers/usb/host/xhci-trace.h:151:0,
-                 from drivers/usb/host/xhci-trace.c:15:
-include/trace/define_trace.h:79:43: fatal error: ./xhci-trace.h: No such file or directory
-
-Signed-off-by: Peter Korsgaard <[email protected]>
----
- drivers/usb/host/Makefile |    3 +++
- 1 file changed, 3 insertions(+)
-
-Index: linux-59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b/drivers/usb/host/Makefile
-===================================================================
---- linux-59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b.orig/drivers/usb/host/Makefile
-+++ linux-59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b/drivers/usb/host/Makefile
-@@ -4,6 +4,9 @@
- 
- ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
- 
-+# tell define_trace.h where to find the xhci trace header
-+CFLAGS_xhci-trace.o := -I$(src)
-+
- isp1760-y := isp1760-hcd.o isp1760-if.o
- 
- fhci-y := fhci-hcd.o fhci-hub.o fhci-q.o
board/roseapplepi/patches/linux/0002-arm-dts-owl-s500-add-RoseapplePi.patch new file +89 -0

89 lines not on this page · raw message

board/roseapplepi/patches/linux/0002-kernel-add-support-for-gcc-5.patch deleted +0 -99

99 lines not on this page · raw message

board/roseapplepi/patches/linux/0003-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch deleted +0 -54

54 lines not on this page · raw message

board/roseapplepi/patches/linux/0004-Fix-compile-errors-with-gcc5.patch deleted +0 -121

121 lines not on this page · raw message

board/roseapplepi/patches/linux/0005-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch deleted +0 -363

363 lines not on this page · raw message

board/roseapplepi/uEnv.txt +1 -1
old mode 100755
new mode 100644
index f9646e498e..2b9de727b4
@@ -1,3 +1,3 @@
 # no ramdisk
 ramdisk_addr_r=-
-bootargs=clk_ignore_unused root=/dev/mmcblk0p2
+bootargs=console=ttyOWL2,115200
configs/roseapplepi_defconfig +9 -11
index d315a02e16..45c42ec0f9 100644
@@ -2,27 +2,25 @@ BR2_arm=y
 BR2_cortex_a9=y
 BR2_ARM_ENABLE_NEON=y
 BR2_ARM_ENABLE_VFP=y
-
 BR2_GLOBAL_PATCH_DIR="board/roseapplepi/patches"
-# Linux headers same as kernel, a 3.10 series
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10=y
-# kernel does not build with gcc 8.x
-BR2_GCC_VERSION_7_X=y
+# Linux headers same as kernel, a 5.7 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_7=y
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/roseapplepi/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/roseapplepi/genimage.cfg"
 
 BR2_LINUX_KERNEL=y
-BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
-BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,xapp-le,kernel,59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b)/linux-59dbf6a4998e967eb9c6bdcc9b506c0d96acb26b.tar.gz"
-BR2_LINUX_KERNEL_DEFCONFIG="actduino_bubble_gum_linux"
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7.19"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/roseapplepi/linux.config"
 BR2_LINUX_KERNEL_UIMAGE=y
+BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x8000"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
-BR2_LINUX_KERNEL_INTREE_DTS_NAME="actduino_bubble_gum_sdboot_linux"
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="owl-s500-roseapplepi"
 
 # Filesystem / image
-BR2_TARGET_ROOTFS_EXT2=y
-BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_INITRAMFS=y
 # BR2_TARGET_ROOTFS_TAR is not set
 
 # Bootloaders
Signature · 1 line
2.20.1
#1 lore raw
Quoted 28 lines · On Fri, 28 Aug 2020 13:30:51 +0200 Peter Korsgaard <[email protected]> wrote:

Mainline Linux now has basic s500/roseapplepi support, so switch to that to get rid of the dependency on gcc7. Add two patches for the dts / fix that didn't make it for kernel 5.7.

The mainline kernel does not yet have support for the mmc interface, so change to initramfs for now. Patches for mmc support have been posted recently, so this can be reverted once they show up in a stable kernel:

https://lore.kernel.org/lkml/cover.1593124368.git.cristian.ciocaltea at gmail.com/

The owl serial port is called ttyOWLn in mainline, so adjust the bootargs to match. Also drop the unneeded execute permission on uEnv.txt.

---
 board/roseapplepi/genimage.cfg                |  10 +-
 board/roseapplepi/linux.config                |  45 +++
 ...1-arm-dts-owl-s500-Fix-incorrect-PPI.patch |  52 +++
 .../linux/0001-unbreak-xhci-trace.patch       |  31 --
 ...002-arm-dts-owl-s500-add-RoseapplePi.patch |  89 +++++
 .../0002-kernel-add-support-for-gcc-5.patch   |  99 -----
 ...inux-use-static-inline-in-ARM-ftrace.patch |  54 ---
 .../0004-Fix-compile-errors-with-gcc5.patch   | 121 ------
 ...egrate-the-various-compiler-gcc-345-.patch | 363 ------------------
 board/roseapplepi/uEnv.txt                    |   2 +-
 configs/roseapplepi_defconfig                 |  20 +-
 11 files changed, 198 insertions(+), 688 deletions(-)
 create mode 100644 board/roseapplepi/linux.config
Quoted 8 lines
 create mode 100644 board/roseapplepi/patches/linux/0001-arm-dts-owl-s500-Fix-incorrect-PPI.patch
 delete mode 100644 board/roseapplepi/patches/linux/0001-unbreak-xhci-trace.patch
 create mode 100644 board/roseapplepi/patches/linux/0002-arm-dts-owl-s500-add-RoseapplePi.patch
 delete mode 100644 board/roseapplepi/patches/linux/0002-kernel-add-support-for-gcc-5.patch
 delete mode 100644 board/roseapplepi/patches/linux/0003-ARM-8158-1-LLVMLinux-use-static-inline-in-ARM-ftrace.patch
 delete mode 100644 board/roseapplepi/patches/linux/0004-Fix-compile-errors-with-gcc5.patch
 delete mode 100644 board/roseapplepi/patches/linux/0005-compiler-gcc-integrate-the-various-compiler-gcc-345-.patch
 mode change 100755 => 100644 board/roseapplepi/uEnv.txt

Applied to next, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com