Skip to content

Commit 7798610

Browse files
mswarowskyVge0rge
authored andcommitted
[nrf fromtree] modules: tf-m: Remove building of PSA arch tests
This removed the CMake code that builds the TF-M arch tests within the TF-M CMakeFile. It will be moved to the tfm_integration/tfm_psa_test sample CMakeFile. Signed-off-by: Markus Swarowsky <[email protected]> (cherry picked from commit cac7f40) Signed-off-by: Markus Swarowsky <[email protected]>
1 parent 3821932 commit 7798610

File tree

2 files changed

+0
-80
lines changed

2 files changed

+0
-80
lines changed

modules/trusted-firmware-m/CMakeLists.txt

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,6 @@ if (CONFIG_BUILD_WITH_TFM)
6565
if (CONFIG_TFM_PROFILE)
6666
list(APPEND TFM_CMAKE_ARGS -DTFM_PROFILE=${CONFIG_TFM_PROFILE})
6767
endif()
68-
if (CONFIG_TFM_PSA_TEST_CRYPTO)
69-
set(TFM_PSA_TEST_SUITE CRYPTO)
70-
elseif (CONFIG_TFM_PSA_TEST_PROTECTED_STORAGE)
71-
set(TFM_PSA_TEST_SUITE PROTECTED_STORAGE)
72-
elseif (CONFIG_TFM_PSA_TEST_INTERNAL_TRUSTED_STORAGE)
73-
set(TFM_PSA_TEST_SUITE INTERNAL_TRUSTED_STORAGE)
74-
elseif (CONFIG_TFM_PSA_TEST_STORAGE)
75-
set(TFM_PSA_TEST_SUITE STORAGE)
76-
elseif (CONFIG_TFM_PSA_TEST_INITIAL_ATTESTATION)
77-
set(TFM_PSA_TEST_SUITE INITIAL_ATTESTATION)
78-
endif()
79-
if (DEFINED TFM_PSA_TEST_SUITE)
80-
list(APPEND TFM_CMAKE_ARGS -DTEST_PSA_API=${TFM_PSA_TEST_SUITE})
81-
endif()
8268
if (CONFIG_TFM_CMAKE_BUILD_TYPE_RELEASE)
8369
set(TFM_CMAKE_BUILD_TYPE "Release")
8470
elseif (CONFIG_TFM_CMAKE_BUILD_TYPE_MINSIZEREL)
@@ -182,17 +168,6 @@ if (CONFIG_BUILD_WITH_TFM)
182168
set(TFM_INTERFACE_INCLUDE_DIR ${TFM_BINARY_DIR}/api_ns/interface/include)
183169
set(TFM_INTERFACE_LIB_DIR ${TFM_BINARY_DIR}/api_ns/interface/lib)
184170

185-
if (TFM_PSA_TEST_SUITE)
186-
set(PSA_TEST_VAL_FILE ${TFM_BINARY_DIR}/tf-m-tests/app/psa_api_tests/val/val_nspe.a)
187-
set(PSA_TEST_PAL_FILE ${TFM_BINARY_DIR}/tf-m-tests/app/psa_api_tests/platform/pal_nspe.a)
188-
set(COMBINE_DIR_STORAGE storage)
189-
set(COMBINE_DIR_PROTECTED_STORAGE storage)
190-
set(COMBINE_DIR_INTERNAL_TRUSTED_STORAGE storage)
191-
set(COMBINE_DIR_CRYPTO crypto)
192-
set(COMBINE_DIR_INITIAL_ATTESTATION initial_attestation)
193-
set(PSA_TEST_COMBINE_FILE ${TFM_BINARY_DIR}/tf-m-tests/app/psa_api_tests/dev_apis/${COMBINE_DIR_${TFM_PSA_TEST_SUITE}}/test_combine.a)
194-
endif()
195-
196171
if(CONFIG_TFM_BL2)
197172
set(BL2_ELF_FILE ${TFM_BINARY_DIR}/bin/bl2.elf)
198173
set(BL2_BIN_FILE ${TFM_BINARY_DIR}/bin/bl2.bin)
@@ -253,26 +228,6 @@ if (CONFIG_BUILD_WITH_TFM)
253228
message(FATAL_ERROR "Unsupported ZEPHYR_TOOLCHAIN_VARIANT: ${ZEPHYR_TOOLCHAIN_VARIANT}")
254229
endif()
255230

256-
if (CONFIG_TFM_PARTITION_INITIAL_ATTESTATION AND CONFIG_TFM_QCBOR_PATH STREQUAL "")
257-
# TODO: Remove this when QCBOR licensing issues w/t_cose have been resolved,
258-
# or only allow it when 'QCBOR_PATH' is set to a local path where QCBOR has
259-
# been manually downloaded by the user before starting the build.
260-
message(FATAL_ERROR "CONFIG_TFM_PARTITION_INITIAL_ATTESTATION is not available "
261-
"with TF-M 1.7.0 due to licensing issues with a dependent library. This "
262-
"restriction will be removed once licensing issues have been resolved."
263-
)
264-
endif()
265-
266-
if (CONFIG_TFM_PSA_TEST_INITIAL_ATTESTATION AND CONFIG_TFM_QCBOR_PATH STREQUAL "")
267-
# TODO: Remove this when QCBOR licensing issues w/t_cose have been resolved,
268-
# or only allow it when 'QCBOR_PATH' is set to a local path where QCBOR has
269-
# been manually downloaded by the user before starting the build.
270-
message(FATAL_ERROR "CONFIG_TFM_PSA_TEST_INITIAL_ATTESTATION is not available "
271-
"with TF-M 1.7.0 due to licensing issues with a dependent library. This "
272-
"restriction will be removed once licensing issues have been resolved."
273-
)
274-
endif()
275-
276231
if (CONFIG_TFM_QCBOR_PATH STREQUAL "DOWNLOAD")
277232
# Change CMake cache type to string to avoid QCBOR_PATH=/absolute/path/DOWNLOAD being set.
278233
set(QCBOR_PATH_TYPE ":STRING")
@@ -296,13 +251,6 @@ if (CONFIG_BUILD_WITH_TFM)
296251
list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_DATA_SHARING=ON)
297252
endif()
298253

299-
if(TFM_PSA_TEST_SUITE)
300-
list(APPEND TFM_CMAKE_ARGS
301-
-DPSA_TOOLCHAIN_FILE=${CMAKE_CURRENT_LIST_DIR}/psa/GNUARM.cmake
302-
-DTOOLCHAIN=INHERIT
303-
)
304-
endif()
305-
306254
if(CONFIG_FPU AND CONFIG_FP_HARDABI)
307255
list(APPEND TFM_CMAKE_ARGS -DCONFIG_TFM_ENABLE_FP=ON)
308256
# Note: This is not a cmake option in TF-M.
@@ -405,15 +353,6 @@ if (CONFIG_BUILD_WITH_TFM)
405353
if (CONFIG_TFM_PARTITION_PLATFORM AND NOT CONFIG_TFM_PARTITION_PLATFORM_CUSTOM_REBOOT)
406354
zephyr_library_sources(src/reboot.c)
407355
endif()
408-
zephyr_library_sources_ifndef(CONFIG_TFM_PSA_TEST_NONE src/zephyr_tfm_psa_test.c)
409-
410-
if (TFM_PSA_TEST_SUITE)
411-
zephyr_library_link_libraries(
412-
${PSA_TEST_VAL_FILE}
413-
${PSA_TEST_PAL_FILE}
414-
${PSA_TEST_COMBINE_FILE}
415-
)
416-
endif()
417356

418357
zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_PLATFORM ${TFM_INTERFACE_SOURCE_DIR}/tfm_platform_api.c)
419358
zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_PROTECTED_STORAGE ${TFM_INTERFACE_SOURCE_DIR}/tfm_ps_api.c)

modules/trusted-firmware-m/src/zephyr_tfm_psa_test.c

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)