Skip to contentSkip to conversation

trusted-firmware-a: adjust ${BUILD_DIR} for meta-arm/master

PATCH In review Denys Dmytriyenko 2 participants 4 messages Oct 21, 2020 – Oct 22, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 trusted-firmware-a: adjust ${BUILD_DIR} for meta-arm/master

From: Denys Dmytriyenko <[email protected]>

As meta-arm/master now sets ${BUILD_DIR} to also include ${B} and release/debug.

---
 recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend +2 -2
index 2dc715c..c3e3c74 100644
@@ -8,7 +8,7 @@ TFA_SPD_k3 = "opteed"
 
 do_compile_append_am65xx-hs-evm() {
 	export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG}
-	( cd ${B}/${BUILD_DIR}/release/; \
+	( cd ${BUILD_DIR}; \
 		mv bl31.bin bl31.bin.unsigned; \
 		${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \
 	)
@@ -16,7 +16,7 @@ do_compile_append_am65xx-hs-evm() {
 
 do_compile_append_j7-hs-evm() {
 	export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG}
-	( cd ${B}/${BUILD_DIR}/release/; \
+	( cd ${BUILD_DIR}; \
 		mv bl31.bin bl31.bin.unsigned; \
 		${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \
 	)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/3 optee-os: adjust for out-of-tree builds in meta-arm/master

From: Denys Dmytriyenko <[email protected]>

As meta-arm/master now builds optee out of tree, hence use ${B} instead of out/arm-plat-${OPTEEOUTPUTMACHINE}

---
 recipes-security/optee/optee-os_%.bbappend | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
recipes-security/optee/optee-os_%.bbappend +5 -5
index 2846d0a..d7e81c5 100644
@@ -3,7 +3,7 @@ do_compile_prepend_ti-soc() {
 }
 
 do_compile_append_k3() {
-    ( cd out/arm-plat-${OPTEEOUTPUTMACHINE}/core/; \
+    ( cd ${B}/core/; \
         cp tee-pager_v2.bin ${B}/bl32.bin; \
         cp tee.elf ${B}/bl32.elf; \
     )
@@ -11,16 +11,16 @@ do_compile_append_k3() {
 
 # Signing procedure for legacy HS devices
 optee_sign_legacyhs() {
-    ( cd out/arm-plat-${OPTEEOUTPUTMACHINE}/core/; \
+    ( cd ${B}/core/; \
         ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh tee.bin tee.bin.signed; \
         normfl=`echo ${OPTEEFLAVOR} | tr "_" "-"`
         mv tee.bin.signed ${B}/$normfl.optee; \
     )
 
     if [ "${OPTEEPAGER}" = "y" ]; then
-        rm -rf out/
+        oe_runmake clean
         oe_runmake all CFG_TEE_TA_LOG_LEVEL=0 CFG_WITH_PAGER=y
-        ( cd out/arm-plat-${OPTEEOUTPUTMACHINE}/core/; \
+        ( cd ${B}/core/; \
             ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh tee.bin tee.bin.signed; \
             normfl=`echo ${OPTEEFLAVOR} | tr "_" "-"`
             mv tee.bin.signed ${B}/$normfl-pager.optee; \
@@ -30,7 +30,7 @@ optee_sign_legacyhs() {
 
 # Signing procedure for K3 HS devices
 optee_sign_k3hs() {
-    ( cd out/arm-plat-${OPTEEOUTPUTMACHINE}/core/; \
+    ( cd ${B}/core/; \
         ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh tee-pager_v2.bin tee-pager.bin.signed; \
         mv tee-pager.bin.signed ${B}/bl32.bin; \
         cp tee.elf ${B}/bl32.elf; \
Signature · 1 line
2.7.4
#2 lore raw

PATCH 3/3 conf/machine: also build optee-os for legacy HS platforms

In reply to Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

Add build dependency on optee-os for legacy HS platforms in non-Arago setups.

---
 conf/machine/am437x-hs-evm.conf | 2 ++
 conf/machine/am57xx-hs-evm.conf | 2 ++
 conf/machine/dra7xx-hs-evm.conf | 2 ++
 3 files changed, 6 insertions(+)
conf/machine/am437x-hs-evm.conf +2 -0
index 0a8ca06..68b808d 100644
@@ -16,3 +16,5 @@ TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_CAT}/am4x"
 OPTEEMACHINE = "ti-am43xx"
 OPTEEFLAVOR = "am43xx"
 OPTEEOUTPUTMACHINE = "ti"
+
+EXTRA_IMAGEDEPENDS += "optee-os"
conf/machine/am57xx-hs-evm.conf +2 -0
index d4f6e09..5232cbd 100644
@@ -17,3 +17,5 @@ OPTEEMACHINE = "ti-am57xx"
 OPTEEFLAVOR = "am57xx"
 OPTEEOUTPUTMACHINE = "ti"
 OPTEEPAGER = "y"
+
+EXTRA_IMAGEDEPENDS += "optee-os"
conf/machine/dra7xx-hs-evm.conf +2 -0
index da4000f..4963008 100644
@@ -17,3 +17,5 @@ OPTEEMACHINE = "ti-dra7xx"
 OPTEEFLAVOR = "dra7xx"
 OPTEEOUTPUTMACHINE = "ti"
 OPTEEPAGER = "y"
+
+EXTRA_IMAGEDEPENDS += "optee-os"
Signature · 1 line
2.7.4
#3 lore raw
In reply to Denys Dmytriyenko

Hello

Quoted 24 lines · Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

As meta-arm/master now sets ${BUILD_DIR} to also include ${B} and release/debug.

---
  recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend +1 -1
index 2dc715c..c3e3c74 100644
@@ -8,7 +8,7 @@ TFA_SPD_k3 = "opteed"
 
  do_compile_append_am65xx-hs-evm() {
  	export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG}
-	( cd ${B}/${BUILD_DIR}/release/; \
+	( cd ${BUILD_DIR}; \
  		mv bl31.bin bl31.bin.unsigned; \
  		${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \
  	)

recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend do_compile_append_am65xx-hs-evm() { · line 22

Quoted 8 lines
recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend +1 -1
@@ -16,7 +16,7 @@ do_compile_append_am65xx-hs-evm() {
 
  do_compile_append_j7-hs-evm() {
  	export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG}
-	( cd ${B}/${BUILD_DIR}/release/; \
+	( cd ${BUILD_DIR}; \
  		mv bl31.bin bl31.bin.unsigned; \
  		${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \
  	)

All 3 applied to master

Dan