[v2,04/11] u-boot-custom: Allow to define different installation binaries

Message ID bcef6815d0bdc429613728531b0277279c25c08a.1705239574.git.jan.kiszka@siemens.com
State Accepted, archived
Headers show
Series Add support for BeaglePlay | expand

Commit Message

Jan Kiszka Jan. 14, 2024, 1:39 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

This allows to decouple the build target U_BOOT_BIN from the installed
and packaged binaries and also adds support for multiple binaries. The
default remains what is specified via U_BOOT_BIN.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/recipes-bsp/u-boot/u-boot-custom.inc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
index c3d8fdf5..fa713c75 100644
--- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
@@ -26,6 +26,8 @@  python() {
 
 DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git"
 
+U_BOOT_BIN_INSTALL ?= "${U_BOOT_BIN}"
+
 TEMPLATE_FILES = "debian/control.tmpl debian/rules.tmpl"
 TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS U_BOOT_CONFIG U_BOOT_BIN \
     BL31 TEE"
@@ -38,8 +40,11 @@  do_prepare_build() {
 
     deb_add_changelog
 
-    echo "${U_BOOT_BIN} /usr/lib/u-boot/${MACHINE}" > \
-        ${S}/debian/u-boot-${MACHINE}.install
+    rm -f ${S}/debian/u-boot-${MACHINE}.install
+    for bin in ${U_BOOT_BIN_INSTALL}; do
+        echo "$bin /usr/lib/u-boot/${MACHINE}" >> \
+            ${S}/debian/u-boot-${MACHINE}.install
+    done
 
     echo "tools/env/libubootenv.a usr/lib" > \
         ${S}/debian/u-boot-${MACHINE}-dev.install