[v2,03/11] u-boot-custom: Allow to set BL31 and TEE from recipes

Message ID e6549ea9118738a512ff556fa0d3549fa1e99167.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>

These variables commonly define the trusted firmware and trusted
execution environment binaries. There should be no reason to fork the
rules file only for injecting those.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/recipes-bsp/u-boot/files/debian/rules.tmpl | 2 +-
 meta/recipes-bsp/u-boot/u-boot-custom.inc       | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/recipes-bsp/u-boot/files/debian/rules.tmpl b/meta/recipes-bsp/u-boot/files/debian/rules.tmpl
index 806b01fe..53c85451 100755
--- a/meta/recipes-bsp/u-boot/files/debian/rules.tmpl
+++ b/meta/recipes-bsp/u-boot/files/debian/rules.tmpl
@@ -14,7 +14,7 @@  endif
 
 override_dh_auto_build:
 	$(MAKE) $(PARALLEL_MAKE) ${U_BOOT_CONFIG}
-	$(MAKE) $(PARALLEL_MAKE) ${U_BOOT_BIN}
+	$(MAKE) $(PARALLEL_MAKE) BL31=${BL31} TEE=${TEE} ${U_BOOT_BIN}
 	$(MAKE) -n u-boot-initial-env >/dev/null 2>&1; if [ $$? -ne 2 ]; then \
 		$(MAKE) $(PARALLEL_MAKE) u-boot-initial-env; \
 	else \
diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
index f16906ce..c3d8fdf5 100644
--- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
@@ -27,7 +27,8 @@  python() {
 DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git"
 
 TEMPLATE_FILES = "debian/control.tmpl debian/rules.tmpl"
-TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS U_BOOT_CONFIG U_BOOT_BIN"
+TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS U_BOOT_CONFIG U_BOOT_BIN \
+    BL31 TEE"
 
 U_BOOT_TOOLS_PACKAGE ?= "0"
 U_BOOT_CONFIG_PACKAGE ?= "0"