From 0eaae108c492112a6657eb17a26fa2b0bafc82a1 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Tue, 21 May 2024 10:13:35 -0400 Subject: [PATCH] meta-agl-bsp: fix up raspberrypi5 build Changes: - Add meta-lts-mixins_u-boot layer to BBLAYERS for raspberrypi5 to get U-Boot v2024.04. - Add required configuration to make the newer U-Boot buildable to the raspberrypi5 machine configuration. The tweaks to re-enable U-Boot were sourced from the commits in this meta-raspberrypi PR: https://github.com/agherzan/meta-raspberrypi/pull/1304 If those get merged our configuration can be simplified. - Add required LICENSE_FLAGS_ACCEPTED tweak to raspberrypi5 machine configuration (copied from raspberrypi4). - Remove obsolete Xen tweaks from the raspberrypi4 and raspberrypi5 machine configurations. Bug-AGL: SPEC-5144 Change-Id: If02e0cc7baada46f4a9db305d3babe5b4a6784ff Signed-off-by: Scott Murray Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/29908 ci-image-boot-test: Jenkins Job builder account Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account Reviewed-by: Jan-Simon Moeller --- meta-agl-bsp/conf/include/agl_raspberrypi4.inc | 12 --------- meta-agl-bsp/conf/include/agl_raspberrypi5.inc | 29 +++++++++++----------- .../machine/raspberrypi5/50_bblayers.conf.inc | 5 +++- 3 files changed, 18 insertions(+), 28 deletions(-) diff --git a/meta-agl-bsp/conf/include/agl_raspberrypi4.inc b/meta-agl-bsp/conf/include/agl_raspberrypi4.inc index 4ba7ff0f6..998ffedc8 100644 --- a/meta-agl-bsp/conf/include/agl_raspberrypi4.inc +++ b/meta-agl-bsp/conf/include/agl_raspberrypi4.inc @@ -21,17 +21,5 @@ IMAGE_INSTALL:append = " kernel-modules linux-firmware-rpidistro-bcm43430 linux- # Psplash causes crash on first boot on RPi IMAGE_FEATURES:remove = "splash" -# Build updatable image. Only takes effect when sota.bbclass is inherited -DISTRO_FEATURES:append = " sota" - -# Add xen build, if the xen feature activated -DISTRO_FEATURES:append = " ${@bb.utils.contains('AGL_XEN_WANTED', '1', ' xen', '', d)}" - -# add xen-tools to build -IMAGE_INSTALL:append = " ${@bb.utils.contains('AGL_XEN_WANTED', '1', 'xen-tools xen-mkimage-rpi4', '', d)}" - -# Add xen-raspberry binary to boot files -IMAGE_BOOT_FILES:append = " ${@bb.utils.contains('AGL_XEN_WANTED','1', 'xen-${MACHINE}', '',d)}" - #DISPLAY CONFIGURATION WESTON_DISPLAYS:raspberrypi4 = " hdmi-a-1-90 hdmi-a-2-90" diff --git a/meta-agl-bsp/conf/include/agl_raspberrypi5.inc b/meta-agl-bsp/conf/include/agl_raspberrypi5.inc index a0e675956..212c9ff1b 100644 --- a/meta-agl-bsp/conf/include/agl_raspberrypi5.inc +++ b/meta-agl-bsp/conf/include/agl_raspberrypi5.inc @@ -4,8 +4,16 @@ GPU_MEM = "256" # Add CMA to the kernel arguments for SOTA OSTREE_KERNEL_ARGS:sota:append = " cma=256M" -# use u-boot always (RPi5 U-boot is not ready yet) -RPI_USE_U_BOOT = "0" +# use u-boot always +RPI_USE_U_BOOT = "1" + +# Re-enable U-Boot for raspberrypi5 here until upstream is fixed. +# Note that this assumes the use of scarthgap/u-boot meta-lts-mixins +# branch. +UBOOT_MACHINE = "rpi_arm64_config" +COMPATIBLE_MACHINE:pn-u-boot:forcevariable = "" +KERNEL_IMAGETYPE_UBOOT ?= "Image" +KERNEL_BOOTCMD ?= "booti" # Use UART for serial console ENABLE_UART ?= "1" @@ -13,22 +21,13 @@ ENABLE_UART ?= "1" # For libomxil #LICENSE_FLAGS_ACCEPTED = "commercial" -IMAGE_INSTALL:append = " kernel-modules linux-firmware-rpidistro-bcm43430 linux-firmware-rpidistro-bcm43455 create-combined-dtb " +# For linux-firmware-rpidistro +LICENSE_FLAGS_ACCEPTED += "synaptics-killswitch" + +IMAGE_INSTALL:append = " kernel-modules create-combined-dtb " # Psplash causes crash on first boot on RPi IMAGE_FEATURES:remove = "splash" -# Build updatable image. Only takes effect when sota.bbclass is inherited -DISTRO_FEATURES:append = " sota" - -# Add xen build, if the xen feature activated -DISTRO_FEATURES:append = " ${@bb.utils.contains('AGL_XEN_WANTED', '1', ' xen', '', d)}" - -# add xen-tools to build -IMAGE_INSTALL:append = " ${@bb.utils.contains('AGL_XEN_WANTED', '1', 'xen-tools xen-mkimage-rpi4', '', d)}" - -# Add xen-raspberry binary to boot files -IMAGE_BOOT_FILES:append = " ${@bb.utils.contains('AGL_XEN_WANTED','1', 'xen-${MACHINE}', '',d)}" - #DISPLAY CONFIGURATION WESTON_DISPLAYS:raspberrypi5 = " hdmi-a-1-90 hdmi-a-2-90" diff --git a/templates/machine/raspberrypi5/50_bblayers.conf.inc b/templates/machine/raspberrypi5/50_bblayers.conf.inc index 2e677dd8a..d225d627b 100644 --- a/templates/machine/raspberrypi5/50_bblayers.conf.inc +++ b/templates/machine/raspberrypi5/50_bblayers.conf.inc @@ -1 +1,4 @@ -BBLAYERS =+ "${METADIR}/bsp/meta-raspberrypi" +BBLAYERS =+ " \ + ${METADIR}/bsp/meta-raspberrypi \ + ${METADIR}/bsp/meta-lts-mixins_u-boot \ +" -- 2.16.6