meta-agl-bsp: fix up raspberrypi5 build 08/29908/2
authorScott Murray <scott.murray@konsulko.com>
Tue, 21 May 2024 14:13:35 +0000 (10:13 -0400)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Wed, 22 May 2024 20:14:17 +0000 (20:14 +0000)
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 <scott.murray@konsulko.com>
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 <jsmoeller@linuxfoundation.org>
meta-agl-bsp/conf/include/agl_raspberrypi4.inc
meta-agl-bsp/conf/include/agl_raspberrypi5.inc
templates/machine/raspberrypi5/50_bblayers.conf.inc

index 4ba7ff0..998ffed 100644 (file)
@@ -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"
index a0e6759..212c9ff 100644 (file)
@@ -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"
index 2e677dd..d225d62 100644 (file)
@@ -1 +1,4 @@
-BBLAYERS =+ "${METADIR}/bsp/meta-raspberrypi"
+BBLAYERS =+ " \
+    ${METADIR}/bsp/meta-raspberrypi \
+    ${METADIR}/bsp/meta-lts-mixins_u-boot \
+"