* [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
* [PATCH v2 2/4] trusted-firmware-a: add support for SPD (Secure Payload Dispatcher) services
2020-05-14 20:47 [PATCH v2 1/4] trusted-firmware-a: support multi-board platforms Denys Dmytriyenko
@ 2020-05-14 20:47 ` 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
` (3 subsequent siblings)
4 siblings, 1 reply; 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 use Secure Payload Dispatcher - allow selecting one with TFA_SPD.
Official SPD description:
/*******************************************************************************
* This is the Secure Payload Dispatcher (SPD). The dispatcher is meant to be a
* plug-in component to the Secure Monitor, registered as a runtime service. The
* SPD is expected to be a functional extension of the Secure Payload (SP) that
* executes in Secure EL1. The Secure Monitor will delegate all SMCs targeting
* the Trusted OS/Applications range to the dispatcher. The SPD will either
* handle the request locally or delegate it to the Secure Payload. It is also
* responsible for initialising and maintaining communication with the SP.
******************************************************************************/
Clean other EXTRA_OEMAKE to remove leading space not needed with +=
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
---
v2 - replace boolean index trick
.../recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 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 899b778..25d5179 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
@@ -16,6 +16,11 @@ TFA_PLATFORM ?= "invalid"
# Leave empty for default behavior
TFA_BOARD ?= ""
+# Some platforms use SPD (Secure Payload Dispatcher) services
+# Few options are "opteed", "tlkd", "trusty", "tspd"...
+# Leave empty to not use SPD
+TFA_SPD ?= ""
+
# Build for debug (set TFA_DEBUG to 1 to activate)
TFA_DEBUG ?= "0"
@@ -73,16 +78,19 @@ EXTRA_OEMAKE += "BUILD_BASE=${B} PLAT=${TFA_PLATFORM}"
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_SPD parameter
+EXTRA_OEMAKE += "${@'SPD=${TFA_SPD}' if d.getVar('TFA_SPD') else ''}"
+
# Handle TFA_DEBUG parameter
-EXTRA_OEMAKE += "${@bb.utils.contains('TFA_DEBUG', '1', ' DEBUG=${TFA_DEBUG}', '', d)}"
+EXTRA_OEMAKE += "${@bb.utils.contains('TFA_DEBUG', '1', 'DEBUG=${TFA_DEBUG}', '', d)}"
# Handle MBEDTLS
-EXTRA_OEMAKE += "${@bb.utils.contains('TFA_MBEDTLS', '1', ' MBEDTLS_DIR=${TFA_MBEDTLS_DIR}', '', d)}"
+EXTRA_OEMAKE += "${@bb.utils.contains('TFA_MBEDTLS', '1', 'MBEDTLS_DIR=${TFA_MBEDTLS_DIR}', '', d)}"
# Uboot support
DEPENDS += " ${@bb.utils.contains('TFA_UBOOT', '1', 'u-boot', '', d)}"
do_compile[depends] += " ${@bb.utils.contains('TFA_UBOOT', '1', 'u-boot:do_deploy', '', d)}"
-EXTRA_OEMAKE += "${@bb.utils.contains('TFA_UBOOT', '1', ' BL33=${DEPLOY_DIR_IMAGE}/u-boot.bin', '',d)}"
+EXTRA_OEMAKE += "${@bb.utils.contains('TFA_UBOOT', '1', 'BL33=${DEPLOY_DIR_IMAGE}/u-boot.bin', '',d)}"
# The following hack is needed to fit properly in yocto build environment
# TFA is forcing the host compiler and its flags in the Makefile using :=
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/4] trusted-firmware-a: install/deploy multiple variants of the target
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-14 20:47 ` Denys Dmytriyenko
2020-05-14 20:47 ` [PATCH 4/4] trusted-firmware-a: provide symlinks for canonical names Denys Dmytriyenko
` (2 subsequent siblings)
4 siblings, 0 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>
Installing and deploying .bin and .elf shouldn't be mutually exclusive.
There are scenarios where both can be useful - .bin for booting and .elf
for debugging.
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
---
.../trusted-firmware-a/trusted-firmware-a.inc | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 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 25d5179..f5b5bc1 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
@@ -116,29 +116,39 @@ do_install() {
install -d -m 755 ${D}/firmware
for atfbin in ${TFA_INSTALL_TARGET}; do
+ processes="0"
if [ "$atfbin" = "all" ]; then
# Target all is not handled by default
bberror "all as TFA_INSTALL_TARGET is not handled by do_install"
bberror "Please specify valid targets in TFA_INSTALL_TARGET or"
bberror "rewrite or turn off do_install"
exit 1
- elif [ -f $BUILD_PLAT/$atfbin.bin ]; then
+ fi
+
+ if [ -f $BUILD_PLAT/$atfbin.bin ]; then
echo "Install $atfbin.bin"
install -m 0644 $BUILD_PLAT/$atfbin.bin \
${D}/firmware/$atfbin-${TFA_PLATFORM}.bin
- elif [ -f $BUILD_PLAT/$atfbin/$atfbin.elf ]; then
+ processes="1"
+ fi
+ if [ -f $BUILD_PLAT/$atfbin/$atfbin.elf ]; then
echo "Install $atfbin.elf"
install -m 0644 $BUILD_PLAT/$atfbin/$atfbin.elf \
${D}/firmware/$atfbin-${TFA_PLATFORM}.elf
- elif [ -f $BUILD_PLAT/$atfbin ]; then
+ processes="1"
+ fi
+ if [ -f $BUILD_PLAT/$atfbin ]; then
echo "Install $atfbin"
install -m 0644 $BUILD_PLAT/$atfbin \
${D}/firmware/$atfbin-${TFA_PLATFORM}
- elif [ "$atfbin" = "dtbs" ]; then
+ processes="1"
+ fi
+
+ if [ "$atfbin" = "dtbs" ]; then
echo "dtbs install, skipped"
elif [ -f ${B}/tools/$atfbin/$atfbin ]; then
echo "Tools $atfbin install, skipped"
- else
+ elif [ "$processed" = "0" ]; then
bberror "Unsupported TFA_INSTALL_TARGET target $atfbin"
exit 1
fi
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/4] trusted-firmware-a: provide symlinks for canonical names
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-14 20:47 ` [PATCH 3/4] trusted-firmware-a: install/deploy multiple variants of the target Denys Dmytriyenko
@ 2020-05-14 20:47 ` 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
4 siblings, 0 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 expect canonical names, like bl31.bin, instead of bl31-<plat>.bin
Provide symlinks for those as well.
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
---
meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | 3 +++
1 file changed, 3 insertions(+)
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 f5b5bc1..c9c5710 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
@@ -129,18 +129,21 @@ do_install() {
echo "Install $atfbin.bin"
install -m 0644 $BUILD_PLAT/$atfbin.bin \
${D}/firmware/$atfbin-${TFA_PLATFORM}.bin
+ ln -sf $atfbin-${TFA_PLATFORM}.bin ${D}/firmware/$atfbin.bin
processes="1"
fi
if [ -f $BUILD_PLAT/$atfbin/$atfbin.elf ]; then
echo "Install $atfbin.elf"
install -m 0644 $BUILD_PLAT/$atfbin/$atfbin.elf \
${D}/firmware/$atfbin-${TFA_PLATFORM}.elf
+ ln -sf $atfbin-${TFA_PLATFORM}.elf ${D}/firmware/$atfbin.elf
processes="1"
fi
if [ -f $BUILD_PLAT/$atfbin ]; then
echo "Install $atfbin"
install -m 0644 $BUILD_PLAT/$atfbin \
${D}/firmware/$atfbin-${TFA_PLATFORM}
+ ln -sf $atfbin-${TFA_PLATFORM} ${D}/firmware/$atfbin
processes="1"
fi
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/4] trusted-firmware-a: support multi-board platforms
2020-05-14 20:47 [PATCH v2 1/4] trusted-firmware-a: support multi-board platforms Denys Dmytriyenko
` (2 preceding siblings ...)
2020-05-14 20:47 ` [PATCH 4/4] trusted-firmware-a: provide symlinks for canonical names Denys Dmytriyenko
@ 2020-05-15 7:46 ` Diego Sueiro
2020-05-15 13:09 ` [meta-arm] " Jon Mason
4 siblings, 0 replies; 7+ messages in thread
From: Diego Sueiro @ 2020-05-15 7:46 UTC (permalink / raw)
To: meta-arm
On Thu, May 14, 2020 at 09:47 PM, Denys Dmytriyenko wrote:
>
> 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>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.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 [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/4] trusted-firmware-a: add support for SPD (Secure Payload Dispatcher) services
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
0 siblings, 0 replies; 7+ messages in thread
From: Diego Sueiro @ 2020-05-15 7:48 UTC (permalink / raw)
To: meta-arm
On Thu, May 14, 2020 at 09:47 PM, Denys Dmytriyenko wrote:
>
> From: Denys Dmytriyenko <denys@ti.com>
>
> Some platforms use Secure Payload Dispatcher - allow selecting one with
> TFA_SPD.
>
> Official SPD description:
> /*******************************************************************************
> * This is the Secure Payload Dispatcher (SPD). The dispatcher is meant to be
> a
> * plug-in component to the Secure Monitor, registered as a runtime service.
> The
> * SPD is expected to be a functional extension of the Secure Payload (SP)
> that
> * executes in Secure EL1. The Secure Monitor will delegate all SMCs targeting
> * the Trusted OS/Applications range to the dispatcher. The SPD will either
> * handle the request locally or delegate it to the Secure Payload. It is also
> * responsible for initialising and maintaining communication with the SP.
>
> ******************************************************************************/
>
> Clean other EXTRA_OEMAKE to remove leading space not needed with +=
>
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Reviewed-by: Diego Sueiro <diego.sueiro@arm.com>
> ---
> v2 - replace boolean index trick
>
> .../recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | 14
> +++++++++++---
> 1 file changed, 11 insertions(+), 3 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 899b778..25d5179 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
> @@ -16,6 +16,11 @@ TFA_PLATFORM ?= "invalid"
> # Leave empty for default behavior
> TFA_BOARD ?= ""
>
> +# Some platforms use SPD (Secure Payload Dispatcher) services
> +# Few options are "opteed", "tlkd", "trusty", "tspd"...
> +# Leave empty to not use SPD
> +TFA_SPD ?= ""
> +
> # Build for debug (set TFA_DEBUG to 1 to activate)
> TFA_DEBUG ?= "0"
>
> @@ -73,16 +78,19 @@ EXTRA_OEMAKE += "BUILD_BASE=${B} PLAT=${TFA_PLATFORM}"
> 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_SPD parameter
> +EXTRA_OEMAKE += "${@'SPD=${TFA_SPD}' if d.getVar('TFA_SPD') else ''}"
> +
> # Handle TFA_DEBUG parameter
> -EXTRA_OEMAKE += "${@bb.utils.contains('TFA_DEBUG', '1', '
> DEBUG=${TFA_DEBUG}', '', d)}"
> +EXTRA_OEMAKE += "${@bb.utils.contains('TFA_DEBUG', '1', 'DEBUG=${TFA_DEBUG}',
> '', d)}"
>
> # Handle MBEDTLS
> -EXTRA_OEMAKE += "${@bb.utils.contains('TFA_MBEDTLS', '1', '
> MBEDTLS_DIR=${TFA_MBEDTLS_DIR}', '', d)}"
> +EXTRA_OEMAKE += "${@bb.utils.contains('TFA_MBEDTLS', '1',
> 'MBEDTLS_DIR=${TFA_MBEDTLS_DIR}', '', d)}"
>
> # Uboot support
> DEPENDS += " ${@bb.utils.contains('TFA_UBOOT', '1', 'u-boot', '', d)}"
> do_compile[depends] += " ${@bb.utils.contains('TFA_UBOOT', '1',
> 'u-boot:do_deploy', '', d)}"
> -EXTRA_OEMAKE += "${@bb.utils.contains('TFA_UBOOT', '1', '
> BL33=${DEPLOY_DIR_IMAGE}/u-boot.bin', '',d)}"
> +EXTRA_OEMAKE += "${@bb.utils.contains('TFA_UBOOT', '1',
> 'BL33=${DEPLOY_DIR_IMAGE}/u-boot.bin', '',d)}"
>
> # The following hack is needed to fit properly in yocto build environment
> # TFA is forcing the host compiler and its flags in the Makefile using :=
> --
> 2.7.4
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [meta-arm] [PATCH v2 1/4] trusted-firmware-a: support multi-board platforms
2020-05-14 20:47 [PATCH v2 1/4] trusted-firmware-a: support multi-board platforms Denys Dmytriyenko
` (3 preceding siblings ...)
2020-05-15 7:46 ` [PATCH v2 1/4] trusted-firmware-a: support multi-board platforms Diego Sueiro
@ 2020-05-15 13:09 ` Jon Mason
4 siblings, 0 replies; 7+ messages in thread
From: Jon Mason @ 2020-05-15 13:09 UTC (permalink / raw)
To: Denys Dmytriyenko; +Cc: meta-arm, Denys Dmytriyenko
On Thu, May 14, 2020 at 04:47:26PM -0400, Denys Dmytriyenko wrote:
> 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
Series pulled into the master branch.
Thanks,
Jon
>
> .../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 [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.