Skip to contentSkip to conversation

arm/trusted-firmware-m: use relative paths for SRC_URI destsuffix

PATCH Applied Ross Burton 2 participants 5 messages Jan 24, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 arm/trusted-firmware-m: use relative paths for SRC_URI destsuffix

It's not recommended to use ${S} in SRC_URI as S contains references to the version which results in a circular list of variable lookups.

destsuffix is relative to WORKDIR and defaults to git/, so use relative paths with the same result.

---
 .../trusted-firmware-m/trusted-firmware-m_1.5.0.bb     | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.5.0.bb +5 -5
index fe3f729c..302fd2cd 100644
@@ -15,11 +15,11 @@ LIC_FILES_CHKSUM = "file://license.rst;md5=07f368487da347f3c7bd0fc3085f3afa \
                     file://../mbedtls/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
                     file://../mcuboot/LICENSE;md5=b6ee33f1d12a5e6ee3de1e82fb51eeb8"
 
-SRC_URI  = "git://git.trustedfirmware.org/TF-M/trusted-firmware-m.git;protocol=https;branch=${SRCBRANCH_tfm};name=tfm;destsuffix=${S} \
-            git://git.trustedfirmware.org/TF-M/tf-m-tests.git;protocol=https;branch=release/1.5.x;name=tfm-tests;destsuffix=${S}/../tf-m-tests \
-            git://github.com/ARMmbed/mbedtls.git;protocol=https;branch=master;name=mbedtls;destsuffix=${S}/../mbedtls \
-            git://github.com/mcu-tools/mcuboot.git;protocol=https;branch=main;name=mcuboot;destsuffix=${S}/../mcuboot \
-            file://cbor2.patch;patchdir=${S}/../mcuboot \
+SRC_URI  = "git://git.trustedfirmware.org/TF-M/trusted-firmware-m.git;protocol=https;branch=${SRCBRANCH_tfm};name=tfm;destsuffix=git/tfm \
+            git://git.trustedfirmware.org/TF-M/tf-m-tests.git;protocol=https;branch=release/1.5.x;name=tfm-tests;destsuffix=git/tf-m-tests \
+            git://github.com/ARMmbed/mbedtls.git;protocol=https;branch=master;name=mbedtls;destsuffix=git/mbedtls \
+            git://github.com/mcu-tools/mcuboot.git;protocol=https;branch=main;name=mcuboot;destsuffix=git/mcuboot \
+            file://cbor2.patch;patchdir=../mcuboot \
             "
 
 # The required dependencies are documented in tf-m/config/config_default.cmake
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/4 arm-bsp/trusted-firmware-m: use SRCPV in the corstone1000 overrides

corstone1000 currently has a git snapshot of TF-M, so that the version number is managable use SRCPV instead of SRCREV.

---
 .../trusted-firmware-m/trusted-firmware-m-corstone1000.inc    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc +2 -2
index c0bce148..0e25fbe7 100644
@@ -13,8 +13,8 @@ SRCREV_tfm = "49a28600f9dd640638f667273ef15acb6d1a8e1c"
 SRCREV_mbedtls = "d65aeb37349ad1a50e0f6c9b694d4b5290d60e49"
 SRCREV_mcuboot = "29099e1d17f93ae1d09fe945ad191b703aacd3d8"
 
-PV = "1.5.0+git${SRCREV_tfm}"
-SRCREV_FORMAT = "tfm_mcuboot_tfm-tests_mbedtls"
+PV = "1.5.0+git${SRCPV}"
+SRCREV_FORMAT = "tfm"
 
 # The install task signs the TF-A BL2 and FIP binaries.
 # So they need to be copied to the sysroot. Hence the dependencies below:
Signature · 1 line
2.25.1
#2 lore raw

PATCH 3/4 arm-bsp/optee-os: use SRCPV in the corstone1000 overrides

In reply to Ross Burton

corstone1000 currently has a git snapshot of optee-os, so that the version number is managable use SRCPV instead of SRCREV.

Also fix whitespace in SRC_URI.

---
 .../recipes-security/optee/optee-os_corstone1000_common.inc   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-arm-bsp/recipes-security/optee/optee-os_corstone1000_common.inc +2 -2
index 6e81316b..e17467fe 100644
@@ -1,6 +1,6 @@
 SRC_URI = "git://git.trustedfirmware.org/OP-TEE/optee_os.git;protocol=https;branch=psa-development"
 SRCREV = "f9de2c9520ed97b89760cc4c99424aae440b63f4"
-PV .= "+git${SRCREV}"
+PV .= "+git${SRCPV}"
 
 DEPENDS += "python3-pycryptodomex-native dtc-native"
 
@@ -10,7 +10,7 @@ SRC_URI:append = " \
                   file://0001-plat-corstone1000-add-corstone1000-platform.patch \
                   file://0002-plat-corstone1000-reserve-3MB-CVM-memory-for-optee.patch \
                   file://0003-plat-corstone1000-add-a-rule-in-Makefile-to-SP_MAKEF.patch \
-		  file://0004-plat-corstone1000-increase-OPTEE-core-heap-size.patch \
+                  file://0004-plat-corstone1000-increase-OPTEE-core-heap-size.patch \
                   file://0005-Fix-add-missing-error-check-during-SP-init.patch \
                    "
 
Signature · 1 line
2.25.1
#3 lore raw

PATCH 4/4 arm/psa-arch-tests: set PV correctly

In reply to Ross Burton

Don't use SRCREV in the PV, but use SRCPV as this truncates the SHA.

Also bump to 1.2+git, as the psa-arch-tests project does tag releases.

---
 .../recipes-security/trusted-services/psa-arch-tests_git.bb     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-arm/recipes-security/trusted-services/psa-arch-tests_git.bb +1 -1
index ff38f7d0..0e7213a1 100644
@@ -8,7 +8,7 @@ SRC_URI:append = " ${SRC_URI_PSA}"
 
 SRCREV_FORMAT="ts_psa"
 SRCREV_psa = "6e1549dde62d12c92fc2df90ebbbe2d2d77cc76a"
-PV = "0.0+git${SRCREV_psa}"
+PV = "1.2+git${SRCPV}"
 
 PSA_APPLICATION_NAME = "psa-api-test"
 TS_ENVIRONMENT_LINUX = "arm-linux"
Signature · 1 line
2.25.1
Applied
#4 lore raw
In reply to Ross Burton
Quoted 5 lines · Ross Burton

It's not recommended to use ${S} in SRC_URI as S contains references to the version which results in a circular list of variable lookups.

destsuffix is relative to WORKDIR and defaults to git/, so use relative paths with the same result.

Applied, thanks!

[1/4] arm/trusted-firmware-m: use relative paths for SRC_URI destsuffix

      commit: 841179266847669f71cb2ea66d55bd62ec28249b
[2/4] arm-bsp/trusted-firmware-m: use SRCPV in the corstone1000 overrides
      commit: 82d91ee3ac1dce0a314414e5ead8cb898caf0236
[3/4] arm-bsp/optee-os: use SRCPV in the corstone1000 overrides
      commit: 1fbdea98ce2738dda827af070e0156b907f97422
[4/4] arm/psa-arch-tests: set PV correctly
      commit: ed737688f26131a63d67622ed4f8cc21055d7dfc

Best regards,

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