Skip to contentSkip to conversation

arm-bsp/trusted-firmware-a: Fix BL32 path if usrmerge enabled

PATCH Applied [email protected] 2 participants 3 messages Sep 25, 2023 – Sep 26, 2023

lore
Share & tools
lore
#0 lore raw

cover arm-bsp/trusted-firmware-a: Fix BL32 path if usrmerge enabled

From: Adam Johnston <[email protected]>

The optee recipe installs the tee image using ${nonarch_base_libdir} If usrmerge is enabled this is /usr/lib, otherwise it is /lib

Several platforms (corstone1000, n1sdp, tc) look for tee-pager_v2.bin in the hard-coded /lib/firmware, hence if usrmerge is enabled it won't be found.

Fix these platforms by using ${nonarch_base_libdir} instead of /lib as per the qemu platform code in the generic recipe.

Adam Johnston (1):
arm-bsp/trusted-firmware-a: Fix BL32 binary path if usrmerge enabled

 .../trusted-firmware-a/trusted-firmware-a-corstone1000.inc      | 2 +-
 .../recipes-bsp/trusted-firmware-a/trusted-firmware-a-n1sdp.inc | 2 +-
 .../recipes-bsp/trusted-firmware-a/trusted-firmware-a-tc.inc    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 arm-bsp/trusted-firmware-a: Fix BL32 path if usrmerge enabled

From: Adam Johnston <[email protected]>

The optee recipe installs the tee image using ${nonarch_base_libdir} If usrmerge is enabled this is /usr/lib, otherwise it is /lib

Several platforms (corstone1000, n1sdp, tc) look for tee-pager_v2.bin in the hard-coded /lib/firmware, hence if usrmerge is enabled it won't be found.

Fix these platforms by using ${nonarch_base_libdir} instead of /lib as per the qemu platform code in the generic recipe.

---
 .../trusted-firmware-a/trusted-firmware-a-corstone1000.inc      | 2 +-
 .../recipes-bsp/trusted-firmware-a/trusted-firmware-a-n1sdp.inc | 2 +-
 .../recipes-bsp/trusted-firmware-a/trusted-firmware-a-tc.inc    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-corstone1000.inc +1 -1
index 3f66bed5..5b15247d 100644
@@ -39,6 +39,6 @@ EXTRA_OEMAKE:append = " \
                         COT=tbbr \
                         ARM_ROTPK_LOCATION=devel_rsa  \
                         ROT_KEY=plat/arm/board/common/rotpk/arm_rotprivk_rsa.pem \
-                        BL32=${RECIPE_SYSROOT}/lib/firmware/tee-pager_v2.bin \
+                        BL32=${RECIPE_SYSROOT}/${nonarch_base_libdir}/firmware/tee-pager_v2.bin \
                         LOG_LEVEL=50 \
                         "
meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-n1sdp.inc +1 -1
index c2fa223c..900decc2 100644
@@ -36,6 +36,6 @@ EXTRA_OEMAKE:append = "\
 		    CREATE_KEYS=1 \
 		    ARM_ROTPK_LOCATION="devel_rsa" \
 		    ROT_KEY="${TFA_ROT_KEY}" \
-		    BL32=${RECIPE_SYSROOT}/lib/firmware/tee-pager_v2.bin \
+		    BL32=${RECIPE_SYSROOT}/${nonarch_base_libdir}/firmware/tee-pager_v2.bin \
 		    BL33=${RECIPE_SYSROOT}/firmware/uefi.bin \
 		    "
meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-tc.inc +1 -1
index e17a8f59..c14629fd 100644
@@ -27,7 +27,7 @@ EXTRA_OEMAKE += "TARGET_PLATFORM=${TFA_TARGET_PLATFORM}"
 # Set optee as SP. Set spmc manifest and sp layout file to optee
 DEPENDS += "optee-os"
 
-TFA_SP_LAYOUT_FILE = "${RECIPE_SYSROOT}/lib/firmware/sp_layout.json"
+TFA_SP_LAYOUT_FILE = "${RECIPE_SYSROOT}/${nonarch_base_libdir}/firmware/sp_layout.json"
 TFA_ARM_SPMC_MANIFEST_DTS = "plat/arm/board/tc/fdts/tc_spmc_optee_sp_manifest.dts"
 
 EXTRA_OEMAKE += "SCP_BL2=${RECIPE_SYSROOT}/firmware/scp_ramfw.bin"
Signature · 1 line
2.25.1
Applied
#2 lore raw
In reply to [email protected]
Quoted 10 lines · On Mon, 25 Sep 2023 16:51:39 +0100, [email protected] wrote:

From: Adam Johnston <[email protected]>

The optee recipe installs the tee image using ${nonarch_base_libdir} If usrmerge is enabled this is /usr/lib, otherwise it is /lib

Several platforms (corstone1000, n1sdp, tc) look for tee-pager_v2.bin in the hard-coded /lib/firmware, hence if usrmerge is enabled it won't be found.

[...]

Applied, thanks!

[1/1] arm-bsp/trusted-firmware-a: Fix BL32 path if usrmerge enabled

      commit: be9bbaa16ed0d60490fb8f915fc48e40d14478a5

Best regards,

Signature · 1 line
Jon Mason <[email protected]>