arm/trusted-firmware-a: actually add mbedtls to SRC_URI
PATCH 1/4 arm/trusted-firmware-a: actually add mbedtls to SRC_URI
From: Ross Burton <[email protected]>
trusted-firmware-a.inc was conditionally adding the Mbed TLS tarball to SRC_URI, but all of the versioned recipes subsequently assigned over the top of it so the Mbed TLS tarball was never actually in SRC_URI. This resulted in machine overrides needing to add the tarball themselves.
Solve by using _append so that the SRC_URI is actually changed.
--- meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc +1 -1
@@ -38,7 +38,7 @@ SRC_URI_MBEDTLS ??= "" # This should be set to MBEDTLS LIC FILES checksum LIC_FILES_CHKSUM_MBEDTLS ??= "" # add MBEDTLS to our sources if activated -SRC_URI += "${@bb.utils.contains('TFA_MBEDTLS', '1', '${SRC_URI_MBEDTLS}', '', d)}" +SRC_URI_append = " ${@bb.utils.contains('TFA_MBEDTLS', '1', '${SRC_URI_MBEDTLS}', '', d)}" # add mbed TLS chksum LIC_FILES_CHKSUM += "${@bb.utils.contains('TFA_MBEDTLS', '1', '${LIC_FILES_CHKSUM_MBEDTLS}', '', d)}" # add mbed TLS to version
Signature · 1 line
2.28.0
PATCH 2/4 arm-bsp/trusted-firmware-a: remove duplicated Mbed TLS tarball
From: Ross Burton <[email protected]>
Now that trusted-firmware-a is actually adding the Mbed TLS tarball, the machine-specific includes can stop doing it themselves.
--- .../trusted-firmware-a/trusted-firmware-a-sgi575.inc | 2 -- .../recipes-bsp/trusted-firmware-a/trusted-firmware-a-tc0.inc | 2 -- 2 files changed, 4 deletions(-)
meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-sgi575.inc +0 -2
@@ -1,7 +1,5 @@ # SGI575 specific TFA support -SRC_URI_append = " ${SRC_URI_MBEDTLS}" - COMPATIBLE_MACHINE = "sgi575" TFA_PLATFORM = "sgi575" TFA_BUILD_TARGET = "all fip"
meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-tc0.inc +0 -2
@@ -3,8 +3,6 @@ # Intermediate SHA with 2.3 baseline version SRCREV_tfa = "2fe7d18b0d99fdf4c4dbf84863bb2036dfebc537" -SRC_URI_append = " ${SRC_URI_MBEDTLS}" - DEPENDS += "scp-firmware" COMPATIBLE_MACHINE = "tc0"
Signature · 1 line
2.28.0
PATCH 3/4 arm/trusted-firmware-a: don't build all targets in parallel
In reply to Ross BurtonFrom: Ross Burton <[email protected]>
There are build races in the Makefiles when you build all targets at once (missing dependencies):
| tools/fiptool/fiptool create [...]
| ERROR: fopen WORKDIR/build/juno/debug/fdts/juno_fw_config.dtb: No such file or directory
These are non-trivial to fix so whilst upstream works on this we can just build each target serially.
--- .../recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc +4 -1
@@ -122,7 +122,10 @@ do_compile() { sed -i '/^INCLUDE_PATHS/ s,$, \$\{BUILD_CFLAGS},' ${S}/tools/fiptool/Makefile sed -i 's^OPENSSL_DIR.*=.*$^OPENSSL_DIR = ${STAGING_DIR_NATIVE}/${prefix_native}^' ${S}/tools/*/Makefile - oe_runmake ${TFA_BUILD_TARGET} + # Currently there are races if you build all the targets at once in parallel + for T in ${TFA_BUILD_TARGET}; do + oe_runmake $T + done } do_compile[cleandirs] = "${B}"
Signature · 1 line
2.28.0
PATCH 4/4 arm-bsp/trusted-firmware-a: remove redundant MBEDTLS_DIR assignment
In reply to Ross BurtonFrom: Ross Burton <[email protected]>
The base recipe already does this, so there's no need to do it again.
--- .../trusted-firmware-a/trusted-firmware-a-sgi575.inc | 2 +- .../recipes-bsp/trusted-firmware-a/trusted-firmware-a-tc0.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-sgi575.inc +1 -1
@@ -12,5 +12,5 @@ TFA_UBOOT = "0" DEPENDS += "virtual/uefi-firmware" EXTRA_OEMAKE += "BL33=${RECIPE_SYSROOT}/firmware/uefi.bin" -EXTRA_OEMAKE += "MBEDTLS_DIR=mbedtls TRUSTED_BOARD_BOOT=1 GENERATE_COT=1 ARM_ROTPK_LOCATION=devel_rsa \ +EXTRA_OEMAKE += "TRUSTED_BOARD_BOOT=1 GENERATE_COT=1 ARM_ROTPK_LOCATION=devel_rsa \ ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem"
meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-tc0.inc +1 -1
@@ -15,5 +15,5 @@ TFA_MBEDTLS = "1" TFA_DEBUG = "1" EXTRA_OEMAKE += "SCP_BL2=${RECIPE_SYSROOT}/firmware/scp_ramfw.bin" -EXTRA_OEMAKE += "MBEDTLS_DIR=mbedtls TRUSTED_BOARD_BOOT=1 GENERATE_COT=1 ARM_ROTPK_LOCATION=devel_rsa \ +EXTRA_OEMAKE += "TRUSTED_BOARD_BOOT=1 GENERATE_COT=1 ARM_ROTPK_LOCATION=devel_rsa \ ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem"
Signature · 1 line
2.28.0
Quoted 11 lines · Ross Burton
From: Ross Burton <[email protected]>
trusted-firmware-a.inc was conditionally adding the Mbed TLS tarball to
SRC_URI, but all of the versioned recipes subsequently assigned over the top of it so the Mbed TLS tarball was never actually inSRC_URI. This resulted in machine overrides needing to add the tarball themselves.Solve by using
_appendso that theSRC_URIis actually changed.Change-Id I05cf1dec2c6422a40a42c615fb2b9b6e8d6f1cb0Signed-off-by Ross Burton <[email protected]>
Series pulled into master.
Thanks,
Jon
Quoted 22 lines
--- meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc +1
-1@@ -38,7 +38,7 @@ SRC_URI_MBEDTLS ??= "" # This should be set to MBEDTLS LIC FILES checksum LIC_FILES_CHKSUM_MBEDTLS ??= "" # add MBEDTLS to our sources if activated -SRC_URI += "${@bb.utils.contains('TFA_MBEDTLS', '1', '${SRC_URI_MBEDTLS}', '', d)}" +SRC_URI_append = " ${@bb.utils.contains('TFA_MBEDTLS', '1', '${SRC_URI_MBEDTLS}', '', d)}" # add mbed TLS chksum LIC_FILES_CHKSUM += "${@bb.utils.contains('TFA_MBEDTLS', '1', '${LIC_FILES_CHKSUM_MBEDTLS}', '', d)}" # add mbed TLS to versionSignature · 1 line
2.28.0