Skip to content

Commit 32d3ac0

Browse files
joerchanVge0rge
authored andcommitted
[nrf fromtree] modules: Update source, lib and include path for TF-M interface files
Update source lib and include path for TF-M interface files. Signed-off-by: Joakim Andersson <[email protected]> Signed-off-by: Markus Swarowsky <[email protected]> (cherry picked from commit a14f42a) Signed-off-by: Markus Swarowsky <[email protected]>
1 parent 6d3fe26 commit 32d3ac0

File tree

10 files changed

+21
-24
lines changed

10 files changed

+21
-24
lines changed

boards/arm/b_u585i_iot02a/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ endif()
1010
if(CONFIG_BUILD_WITH_TFM)
1111
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
1212
#Execute post build script postbuild.sh
13-
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/postbuild.sh ${COMPILER_FULL_PATH}
13+
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/api_ns/postbuild.sh ${COMPILER_FULL_PATH}
1414
)
1515
endif()

boards/arm/b_u585i_iot02a/doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,14 +346,14 @@ can be generated using ``b_u585i_iot02a_ns`` as build target.
346346
347347
$ west build -b b_u585i_iot02a_ns path/to/source/directory
348348
349-
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/postbuild.sh`` bash script
349+
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/api_ns/postbuild.sh`` bash script
350350
is run automatically in a post-build step to make some required flash layout changes.
351351

352352
Once the build is completed, run the following script to initialize the option bytes.
353353

354354
.. code-block:: bash
355355
356-
$ build/tfm/regression.sh
356+
$ build/tfm/api_ns/regression.sh
357357
358358
Finally, to flash the board, run:
359359

boards/arm/nucleo_l552ze_q/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ endif()
1010
if (CONFIG_BUILD_WITH_TFM)
1111
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
1212
#Execute post build script postbuild.sh
13-
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/postbuild.sh ${COMPILER_FULL_PATH}
13+
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/api_ns/postbuild.sh ${COMPILER_FULL_PATH}
1414
)
1515
endif()

boards/arm/nucleo_l552ze_q/doc/nucleol552ze_q.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ can be generated using ``nucleo_l552ze_q_ns`` as build target.
338338
339339
$ west build -b nucleo_l552ze_q_ns path/to/source/directory
340340
341-
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/postbuild.sh`` bash script
341+
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/api_ns/postbuild.sh`` bash script
342342
is run automatically in a post-build step to make some required flash layout changes.
343343

344344
Once the build is completed, run the following script to initialize the option bytes.

boards/arm/nucleo_u575zi_q/doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ can be generated using ``nucleo_u575zi_q_ns`` as build target.
308308
309309
$ west build -b nucleo_u575zi_q_ns path/to/source/directory
310310
311-
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/postbuild.sh`` bash script
311+
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/api_ns/postbuild.sh`` bash script
312312
is run automatically in a post-build step to make some required flash layout changes.
313313

314314
Once the build is completed, run the following script to initialize the option bytes.

boards/arm/nucleo_u5a5zj_q/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ endif()
99
if(CONFIG_BUILD_WITH_TFM)
1010
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
1111
#Execute post build script postbuild.sh
12-
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/postbuild.sh ${COMPILER_FULL_PATH}
12+
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/api_ns/postbuild.sh ${COMPILER_FULL_PATH}
1313
)
1414
endif()

boards/arm/nucleo_u5a5zj_q/doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ can be generated using ``nucleo_u5a5zj_q_ns`` as build target.
342342
343343
$ west build -b nucleo_u5a5zj_q_ns path/to/source/directory
344344
345-
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/postbuild.sh`` bash script
345+
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/api_ns/postbuild.sh`` bash script
346346
is run automatically in a post-build step to make some required flash layout changes.
347347

348348
Once the build is completed, run the following script to initialize the option bytes.

boards/arm/stm32l562e_dk/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ endif()
1010
if(CONFIG_BUILD_WITH_TFM)
1111
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
1212
#Execute post build script postbuild.sh
13-
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/postbuild.sh ${COMPILER_FULL_PATH}
13+
COMMAND $<TARGET_PROPERTY:tfm,TFM_BINARY_DIR>/api_ns/postbuild.sh ${COMPILER_FULL_PATH}
1414
)
1515
endif()

boards/arm/stm32l562e_dk/doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ can be generated using ``stm32l562e_dk_ns`` as build target.
340340
341341
$ west build -b stm32l562e_dk_ns path/to/source/directory
342342
343-
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/postbuild.sh`` bash script
343+
Note: When building the ``*_ns`` image with TF-M, ``build/tfm/api_ns/postbuild.sh`` bash script
344344
is run automatically in a post-build step to make some required flash layout changes.
345345

346346
Once the build is completed, run the following script to initialize the option bytes.

modules/trusted-firmware-m/CMakeLists.txt

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,12 @@ if (CONFIG_BUILD_WITH_TFM)
181181
set(TFM_TEST_REPO_PATH ${ZEPHYR_CURRENT_MODULE_DIR}/../tf-m-tests)
182182
set(PSA_ARCH_TESTS_PATH ${ZEPHYR_CURRENT_MODULE_DIR}/../psa-arch-tests)
183183

184-
set(VENEERS_FILE ${TFM_BINARY_DIR}/secure_fw/s_veneers.o)
184+
set(TFM_INTERFACE_SOURCE_DIR ${TFM_BINARY_DIR}/api_ns/interface/src)
185+
set(TFM_INTERFACE_INCLUDE_DIR ${TFM_BINARY_DIR}/api_ns/interface/include)
186+
set(TFM_INTERFACE_LIB_DIR ${TFM_BINARY_DIR}/api_ns/interface/lib)
187+
185188
set(TFM_API_NS_PATH ${TFM_BINARY_DIR}/tf-m-tests/app/libtfm_api_ns.a)
186189
set(PLATFORM_NS_FILE ${TFM_BINARY_DIR}/platform/ns/libplatform_ns.a)
187-
set(TFM_GENERATED_INCLUDES ${TFM_BINARY_DIR}/generated/interface/include)
188-
set(TFM_INTERFACE_SOURCE_DIR ${TFM_BINARY_DIR}/install/interface/src)
189190

190191
if (TFM_PSA_TEST_SUITE)
191192
set(PSA_TEST_VAL_FILE ${TFM_BINARY_DIR}/tf-m-tests/app/psa_api_tests/val/val_nspe.a)
@@ -213,9 +214,7 @@ if (CONFIG_BUILD_WITH_TFM)
213214
set(TFM_S_NS_SIGNED_BIN_FILE ${TFM_BINARY_DIR}/bin/tfm_s_ns_signed.bin)
214215

215216
set(BUILD_BYPRODUCTS
216-
${VENEERS_FILE}
217217
${TFM_API_NS_PATH}
218-
${TFM_GENERATED_INCLUDES}/psa_manifest/sid.h
219218
${PSA_TEST_VAL_FILE}
220219
${PSA_TEST_PAL_FILE}
221220
${PSA_TEST_COMBINE_FILE}
@@ -232,13 +231,15 @@ if (CONFIG_BUILD_WITH_TFM)
232231
${TFM_NS_SIGNED_BIN_FILE}
233232
${TFM_S_NS_SIGNED_BIN_FILE}
234233

234+
${TFM_INTERFACE_LIB_DIR}/s_veneers.o
235+
235236
${TFM_INTERFACE_SOURCE_DIR}/tfm_attest_api.c
236237
${TFM_INTERFACE_SOURCE_DIR}/tfm_crypto_api.c
237238
${TFM_INTERFACE_SOURCE_DIR}/tfm_fwu_api.c
238239
${TFM_INTERFACE_SOURCE_DIR}/tfm_its_api.c
239240
${TFM_INTERFACE_SOURCE_DIR}/tfm_platform_api.c
240241
${TFM_INTERFACE_SOURCE_DIR}/tfm_ps_api.c
241-
${TFM_INTERFACE_SOURCE_DIR}/tfm_psa_ns_api.c
242+
${TFM_INTERFACE_SOURCE_DIR}/tfm_tz_psa_ns_api.c
242243

243244
# Specific to nordic_nrf platform
244245
${TFM_INTERFACE_SOURCE_DIR}/tfm_ioctl_core_ns_api.c
@@ -433,7 +434,7 @@ if (CONFIG_BUILD_WITH_TFM)
433434
zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_INITIAL_ATTESTATION ${TFM_INTERFACE_SOURCE_DIR}/tfm_attest_api.c)
434435
zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_FIRMWARE_UPDATE ${TFM_INTERFACE_SOURCE_DIR}/tfm_fwu_api.c)
435436

436-
zephyr_library_sources(${TFM_INTERFACE_SOURCE_DIR}/tfm_psa_ns_api.c)
437+
zephyr_library_sources(${TFM_INTERFACE_SOURCE_DIR}/tfm_tz_psa_ns_api.c)
437438

438439
if(CONFIG_SOC_FAMILY_NRF)
439440
zephyr_library_sources_ifdef(CONFIG_TFM_PARTITION_PLATFORM ${TFM_INTERFACE_SOURCE_DIR}/tfm_ioctl_core_ns_api.c)
@@ -446,17 +447,13 @@ if (CONFIG_BUILD_WITH_TFM)
446447
)
447448
endif()
448449

449-
zephyr_include_directories(
450-
${TFM_GENERATED_INCLUDES}
451-
)
452-
453450
target_include_directories(tfm_api PRIVATE
454-
${TFM_BINARY_DIR}/install/interface/include
455-
${TFM_BINARY_DIR}/install/interface/include/crypto_keys
451+
${TFM_INTERFACE_INCLUDE_DIR}
452+
${TFM_INTERFACE_INCLUDE_DIR}/crypto_keys
456453
)
457454

458455
zephyr_library_link_libraries(
459-
${VENEERS_FILE}
456+
${TFM_INTERFACE_LIB_DIR}/s_veneers.o
460457
)
461458

462459
# To ensure that generated include files are created before they are used.

0 commit comments

Comments
 (0)