All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/4] trusted-firmware-a: support multi-board platforms
@ 2020-05-14 20:47 Denys Dmytriyenko
  2020-05-14 20:47 ` [PATCH v2 2/4] trusted-firmware-a: add support for SPD (Secure Payload Dispatcher) services Denys Dmytriyenko
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Denys Dmytriyenko @ 2020-05-14 20:47 UTC (permalink / raw)
  To: meta-arm; +Cc: Denys Dmytriyenko

From: Denys Dmytriyenko <denys@ti.com>

Some platforms can have multiple board configurations, passed as TARGET_BOARD=""
that also becomes an extra directory level in the build output hierarchy.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
v2 - replace boolean index trick

 .../recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc    | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
index 4b5da7a..899b778 100644
--- a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
+++ b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
@@ -12,6 +12,10 @@ COMPATIBLE_MACHINE ?= "invalid"
 # Platform must be set for each machine
 TFA_PLATFORM ?= "invalid"
 
+# Some platforms can have multiple board configurations
+# Leave empty for default behavior
+TFA_BOARD ?= ""
+
 # Build for debug (set TFA_DEBUG to 1 to activate)
 TFA_DEBUG ?= "0"
 
@@ -65,6 +69,10 @@ DEPENDS_append = " dtc-native openssl-native"
 # Add platform parameter
 EXTRA_OEMAKE += "BUILD_BASE=${B} PLAT=${TFA_PLATFORM}"
 
+# Handle TFA_BOARD parameter
+EXTRA_OEMAKE += "${@'TARGET_BOARD=${TFA_BOARD}' if d.getVar('TFA_BOARD') else ''}"
+BUILD_DIR = "${TFA_PLATFORM}${@'/${TFA_BOARD}' if d.getVar('TFA_BOARD') else ''}"
+
 # Handle TFA_DEBUG parameter
 EXTRA_OEMAKE += "${@bb.utils.contains('TFA_DEBUG', '1', ' DEBUG=${TFA_DEBUG}', '', d)}"
 
@@ -93,9 +101,9 @@ do_compile[cleandirs] = "${B}"
 
 do_install() {
     if ${@"true" if d.getVar('TFA_DEBUG') == '1' else "false"}; then
-        BUILD_PLAT=${B}/${TFA_PLATFORM}/debug/
+        BUILD_PLAT=${B}/${BUILD_DIR}/debug/
     else
-        BUILD_PLAT=${B}/${TFA_PLATFORM}/release/
+        BUILD_PLAT=${B}/${BUILD_DIR}/release/
     fi
 
     install -d -m 755 ${D}/firmware
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-15 13:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14 20:47 [PATCH v2 1/4] trusted-firmware-a: support multi-board platforms Denys Dmytriyenko
2020-05-14 20:47 ` [PATCH v2 2/4] trusted-firmware-a: add support for SPD (Secure Payload Dispatcher) services Denys Dmytriyenko
2020-05-15  7:48   ` Diego Sueiro
2020-05-14 20:47 ` [PATCH 3/4] trusted-firmware-a: install/deploy multiple variants of the target Denys Dmytriyenko
2020-05-14 20:47 ` [PATCH 4/4] trusted-firmware-a: provide symlinks for canonical names Denys Dmytriyenko
2020-05-15  7:46 ` [PATCH v2 1/4] trusted-firmware-a: support multi-board platforms Diego Sueiro
2020-05-15 13:09 ` [meta-arm] " Jon Mason

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.