Skip to contentSkip to conversation

arm/trusted-firmware-m: upgrade to 1.4.1

PATCH Superseded Ross Burton 1 participant 5 messages Nov 11, 2021

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 arm/trusted-firmware-m: upgrade to 1.4.1

Extract the TF-M branch name as a variable, as BSPs may wish to use intermediate SHAs.

---
 ...mware-m_1.4.0.bb => trusted-firmware-m_1.4.1.bb} | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
 rename meta-arm/recipes-bsp/trusted-firmware-m/{trusted-firmware-m_1.4.0.bb => trusted-firmware-m_1.4.1.bb} (93%)
meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.4.1.bb renamed from meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.4.0.bb +7 -6
similarity index 93%
rename from meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.4.0.bb
rename to meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.4.1.bb
index 14fcbb1b..549926bb 100644
@@ -15,19 +15,20 @@ 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=master;name=tfm;destsuffix=${S} \
-            git://git.trustedfirmware.org/TF-M/tf-m-tests.git;protocol=https;branch=master;name=tfm-tests;destsuffix=${S}/../tf-m-tests \
+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=TF-Mv1.4.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 \
             "
 
 # The required dependencies are documented in tf-m/config/config_default.cmake
-# TF-Mv1.4.0
-SRCREV_tfm = "7ef9178adad866d48e3af42d8a3129dfab792ed8"
+# TF-Mv1.4.1
+SRCBRANCH_tfm = "TF-Mv1.4.x"
+SRCREV_tfm = "dd1fe44448db0f1750794cd9cf5596033f90f6f9"
 # mbedtls-3.0.0
 SRCREV_mbedtls = "8df2f8e7b9c7bb9390ac74bb7bace27edca81a2b"
-# TF-Mv1.4.0
-SRCREV_tfm-tests = "e1a8c9fb8394b1f6ea66d2611c070915b0d4b573"
+# TF-Mv1.4.1
+SRCREV_tfm-tests = "60faad2ead1b967ec8e73accd793d3ed0e5c56bd"
 # TF-Mv1.4-integ
 SRCREV_mcuboot = "4f8091318b4026d14af9e5a7036825bff62fb612"
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/5 arm-bsp/trusted-firmware-m: update corstone1000 customisations for 1.4.1 update

This BSP sets an intermediate SHA that is newer than the 1.4.1, but the branch needs specifying now.

Also remove SRCREV_FORMAT, the PV doesn't include SRCPV so it isn't being used.

---
 .../trusted-firmware-m/trusted-firmware-m-corstone1000.inc     | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc +1 -2
index 997859cf..ae28dd7e 100644
@@ -13,10 +13,9 @@ INSANE_SKIP:${PN} = "arch"
 TFM_PLATFORM_IS_FVP ?= "TRUE"
 EXTRA_OECMAKE += "-DPLATFORM_IS_FVP=${TFM_PLATFORM_IS_FVP}"
 
+SRCBRANCH_tfm = "master"
 SRCREV_tfm = "ccd82e35f539c0d7261b2935d6d30c550cfc6736"
 
-SRCREV_FORMAT = "tfm_mcuboot_tfm-tests_mbedtls"
-
 # The install task signs the TF-A BL2 and FIP binaries.
 # So they need to be copied to the sysroot. Hence the dependencies below:
 do_prepare_recipe_sysroot[depends]+= "virtual/trusted-firmware-a:do_populate_sysroot"
Signature · 1 line
2.25.1
#2 lore raw

PATCH 3/5 arm-bsp/trusted-firmware-m: remove meaningless PACKAGECONFIGs

In reply to Ross Burton

The corstone1000 customisations override the test-* PACKAGECONFIGs to always disable the tests, even when they're enabled.

The proper way to do this is to not enable the tests in the first place, and the tests are not enabled.

---
 .../trusted-firmware-m/trusted-firmware-m-corstone1000.inc     | 3 ---
 1 file changed, 3 deletions(-)
meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc +0 -3
index ae28dd7e..62f5998e 100644
@@ -4,9 +4,6 @@ COMPATIBLE_MACHINE = "(corstone1000)"
 
 TFM_DEBUG = "1"
 
-PACKAGECONFIG[test-secure] = "-DTEST_S=OFF,-DTEST_S=OFF"
-PACKAGECONFIG[test-nonsecure] = "-DTEST_NS=OFF,-DTEST_NS=OFF"
-
 INSANE_SKIP:${PN} = "arch"
 
 ## Default is the FVP ##
Signature · 1 line
2.25.1
#3 lore raw

PATCH 4/5 arm-bsp/trusted-firmware-m: clean up corestone1000 do_install

In reply to Ross Burton

No point checking that a directory exists before installing from it, as it will fail immediately anyway if the files are not present.

---
 .../trusted-firmware-m/trusted-firmware-m-corstone1000.inc  | 6 ------
 1 file changed, 6 deletions(-)
meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc +0 -6
index 62f5998e..530968c3 100644
@@ -21,11 +21,6 @@ do_prepare_recipe_sysroot[depends]+= "virtual/trusted-firmware-a:do_populate_sys
 require trusted-firmware-m-sign-host-images.inc
 
 do_install() {
-  if [ ! -d "${B}/install/outputs/ARM/CORSTONE1000" ]
-  then
-    bbfatal "'${B}/install/outputs/ARM/CORSTONE1000' output folder not found!"
-  fi
-
   install -D -p -m 0644 ${B}/install/outputs/ARM/CORSTONE1000/tfm_s_signed.bin ${D}/firmware/tfm_s_signed.bin
   install -D -p -m 0644 ${B}/install/outputs/ARM/CORSTONE1000/bl2_signed.bin ${D}/firmware/bl2_signed.bin
   install -D -p -m 0644 ${B}/install/outputs/ARM/CORSTONE1000/bl1.bin ${D}/firmware/bl1.bin
@@ -41,5 +36,4 @@ do_install() {
       ${RECIPE_SYSROOT}/firmware/${TFA_FIP_BINARY}
 
   sign_host_image ${TFA_FIP_BINARY} ${RECIPE_SYSROOT}/firmware ${TFA_FIP_RE_IMAGE_LOAD_ADDRESS} ${TFA_FIP_RE_SIGN_BIN_SIZE}
-
 }
Signature · 1 line
2.25.1
#4 lore raw

PATCH 5/5 arm-bsp/trusted-firmware-m: remove INSANE_SKIP in corstone1000

In reply to Ross Burton

The build is successful without this, so presumably it's obsolete.

---
 .../trusted-firmware-m/trusted-firmware-m-corstone1000.inc    | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc +1 -3
index 530968c3..9114905b 100644
@@ -4,9 +4,7 @@ COMPATIBLE_MACHINE = "(corstone1000)"
 
 TFM_DEBUG = "1"
 
-INSANE_SKIP:${PN} = "arch"
-
-## Default is the FVP ##
+# Default is the FVP
 TFM_PLATFORM_IS_FVP ?= "TRUE"
 EXTRA_OECMAKE += "-DPLATFORM_IS_FVP=${TFM_PLATFORM_IS_FVP}"
 
Signature · 1 line
2.25.1