Skip to content

Commit 372b97e

Browse files
Vge0rgerlubos
authored andcommitted
modules: tf-m: Add sdk t_cose/qcbor paths
Since TF-M v2.3 clones and patches the t_cose and qcbor libraries at build time we had to create forks with the patches applied. This adds the path to our forks to the TF-M build. Remove the old qcbor Kconfig and reference. Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
1 parent 8a5ad4d commit 372b97e

3 files changed

Lines changed: 8 additions & 13 deletions

File tree

modules/trusted-firmware-m/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ set_property(TARGET zephyr_property_target
110110
$<$<BOOL:${CONFIG_TFM_NRF_MRAMC_SERVICE}>:-DTFM_NRF_MRAMC_SERVICE=ON>
111111
$<$<BOOL:${CONFIG_NRF91_ANOMALY_36_WORKAROUND}>:-DCONFIG_NRF91_ANOMALY_36_WORKAROUND=ON>
112112
-DTFM_MCUBOOT_OFFSET=${CONFIG_TFM_MCUBOOT_HEADER_SIZE}
113+
-DQCBOR_PATH=${CONFIG_TFM_QCBOR_PATH}
114+
-DT_COSE_PATH=${CONFIG_TFM_T_COSE_PATH}
113115
)
114116

115117
if(CONFIG_TFM_PROFILE_TYPE_MINIMAL)

modules/trusted-firmware-m/Kconfig.tfm.defconfig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ endchoice
4646

4747
config TFM_QCBOR_PATH
4848
string
49-
default "$(ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR)/../qcbor"
49+
default "$(ZEPHYR_QCBOR_MODULE_DIR)"
50+
51+
config TFM_T_COSE_PATH
52+
string
53+
default "$(ZEPHYR_T_COSE_MODULE_DIR)"
5054

5155
config TFM_PARTITION_INITIAL_ATTESTATION
5256
bool

tests/tfm/tfm_psa_test/CMakeLists.txt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,6 @@ set(TFM_PSA_ARCHTEST_REPO_PATH ${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/../psa-ar
3232
set(TFM_TEST_DIR "${TFM_TEST_REPO_PATH}/tests_psa_arch/spe/partitions")
3333
set(PSA_ARCH_TESTS_CONFIG_FILE "${TFM_TEST_REPO_PATH}/tests_psa_arch/spe/config/config_test_psa_api.cmake")
3434

35-
if(CONFIG_TFM_PSA_TEST_INITIAL_ATTESTATION AND CONFIG_TFM_QCBOR_PATH STREQUAL "")
36-
# TODO: Remove this when QCBOR licensing issues w/t_cose have been resolved,
37-
# or only allow it when 'QCBOR_PATH' is set to a local path where QCBOR has
38-
# been manually downloaded by the user before starting the build.
39-
message(FATAL_ERROR "CONFIG_TFM_PSA_TEST_INITIAL_ATTESTATION is not available "
40-
"with TF-M 2.0.0 due to licensing issues with a dependent library. This "
41-
"restriction will be removed once licensing issues have been resolved."
42-
)
43-
endif()
44-
45-
46-
4735
if(CONFIG_TFM_PSA_TEST_CRYPTO)
4836
set(TFM_PSA_TEST_SUITE CRYPTO)
4937
elseif(CONFIG_TFM_PSA_TEST_PROTECTED_STORAGE)
@@ -128,6 +116,7 @@ ExternalProject_Add(tfm_psa_arch_test_app
128116
-DCROSS_COMPILE=${TFM_TOOLCHAIN_PATH}/${TFM_TOOLCHAIN_PREFIX}
129117
-DPSA_TOOLCHAIN_FILE=${TFM_BINARY_DIR}/api_ns/cmake/${TFM_TOOLCHAIN_NS_FILE}
130118
-DQCBOR_PATH${QCBOR_PATH_TYPE}=${CONFIG_TFM_QCBOR_PATH}
119+
-DT_COSE_PATH=${CONFIG_TFM_T_COSE_PATH}
131120
-DCMAKE_BUILD_TYPE=${tfm_ns_CMAKE_BUILD_TYPE}
132121
-DTEST_PSA_API=${TEST_PSA_API}
133122
-DZEPHYR_NRF_MODULE_DIR=${ZEPHYR_NRF_MODULE_DIR}

0 commit comments

Comments
 (0)