Lines Matching +full:kconfig +full:- +full:ext

1 # Copyright (c) 2019 - 2023 Linaro
2 # Copyright (c) 2020 - 2023 Nordic Semiconductor ASA
4 # SPDX-License-Identifier: Apache-2.0
6 # List of all partitions supported by TF-M
7 # Name must match name in 'trusted-firmware-m/tools/tfm_manifest_list.yaml'
19 # PSA API awareness for the Non-Secure application
22 list(APPEND TFM_CMAKE_ARGS -DCONFIG_TFM_SPM_BACKEND="SFN")
24 list(APPEND TFM_CMAKE_ARGS -DCONFIG_TFM_SPM_BACKEND="IPC")
27 list(APPEND TFM_CMAKE_ARGS -DTEST_S=ON)
28 list(APPEND TFM_CMAKE_ARGS -DTFM_S_REG_TEST:BOOL=ON)
31 list(APPEND TFM_CMAKE_ARGS -DTEST_NS=ON)
32 list(APPEND TFM_CMAKE_ARGS -DTFM_NS_REG_TEST:BOOL=ON)
35 list(APPEND TFM_CMAKE_ARGS -DBL2=TRUE)
36 list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_IMAGE_VERSION_S=${CONFIG_TFM_IMAGE_VERSION_S})
37 list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_IMAGE_VERSION_NS=${CONFIG_TFM_IMAGE_VERSION_NS})
38 list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_SIGNATURE_TYPE=${CONFIG_TFM_MCUBOOT_SIGNATURE_TYPE})
40 # TF-M's config/check_config.cmake requires MCUBOOT_BUILTIN_KEY=OFF for RSA
41 # and MCUBOOT_USE_PSA_CRYPTO for EC-P. The others are dependencies needed
44 list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_BUILTIN_KEY=OFF)
45 list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_HW_KEY=ON)
46 elseif (${CONFIG_TFM_MCUBOOT_SIGNATURE_TYPE} MATCHES "^EC-P")
47 list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_USE_PSA_CRYPTO=ON)
48 list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_BUILTIN_KEY=ON)
49 list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_HW_KEY=OFF)
54 list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_KEY_${SUFFIX}=${CONFIG_TFM_KEY_FILE_${SUFFIX}})
58 list(APPEND TFM_CMAKE_ARGS -DBL2=FALSE)
61 list(APPEND TFM_CMAKE_ARGS -DTFM_ISOLATION_LEVEL=${CONFIG_TFM_ISOLATION_LEVEL})
64 list(APPEND TFM_CMAKE_ARGS -DITS_NUM_ASSETS=${CONFIG_TFM_ITS_NUM_ASSETS})
67 list(APPEND TFM_CMAKE_ARGS -DITS_MAX_ASSET_SIZE=${CONFIG_TFM_ITS_MAX_ASSET_SIZE})
70 list(APPEND TFM_CMAKE_ARGS -DTFM_PROFILE=${CONFIG_TFM_PROFILE})
82 list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_IMAGE_NUMBER=${CONFIG_TFM_MCUBOOT_IMAGE_NUMBER})
86 list(APPEND TFM_CMAKE_ARGS -DTFM_DUMMY_PROVISIONING=ON)
88 list(APPEND TFM_CMAKE_ARGS -DTFM_DUMMY_PROVISIONING=OFF)
92 list(APPEND TFM_CMAKE_ARGS -DTFM_EXCEPTION_INFO_DUMP=ON)
94 list(APPEND TFM_CMAKE_ARGS -DTFM_EXCEPTION_INFO_DUMP=OFF)
112 list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_LOG_LEVEL=${TFM_BL2_LOG_LEVEL})
127 list(APPEND TFM_CMAKE_ARGS -DTFM_PARTITION_LOG_LEVEL=${TFM_PARTITION_LOG_LEVEL})
141 list(APPEND TFM_CMAKE_ARGS -DTFM_SPM_LOG_LEVEL=${TFM_SPM_LOG_LEVEL})
144 # Enable TFM partitions as specified in Kconfig
152 list(APPEND TFM_CMAKE_ARGS -D${partition}=${val})
203 # TODO: Add support for cross-compile toolchain variant
204 # TODO: Enforce GCC version check against TF-M compiler requirements
207 set(TFM_TOOLCHAIN_PREFIX "arm-zephyr-eabi")
208 set(TFM_TOOLCHAIN_PATH ${ZEPHYR_SDK_INSTALL_DIR}/arm-zephyr-eabi/bin)
211 set(TFM_TOOLCHAIN_PREFIX "arm-none-eabi")
215 set(TFM_TOOLCHAIN_PREFIX "arm-zephyr-eabi")
216 set(TFM_TOOLCHAIN_PATH ${XTOOLS_TOOLCHAIN_PATH}/arm-zephyr-eabi/bin)
226 "with TF-M due to licensing issues with a dependent library. This "
234 # Supply path to NXP HAL sources used for TF-M build
235 …set(TFM_PLATFORM_NXP_HAL_FILE_PATH ${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/platform/ext/target/nxp…
236 list(APPEND TFM_CMAKE_ARGS -DTFM_PLATFORM_NXP_HAL_FILE_PATH=${TFM_PLATFORM_NXP_HAL_FILE_PATH})
240 # Supply path to MCUboot for TF-M build
241 list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_PATH=${ZEPHYR_MCUBOOT_MODULE_DIR})
245 list(APPEND TFM_CMAKE_ARGS -DMCUBOOT_DATA_SHARING=ON)
249 list(APPEND TFM_CMAKE_ARGS -DCONFIG_TFM_ENABLE_FP=ON)
250 # Note: This is not a cmake option in TF-M.
253 list(APPEND TFM_CMAKE_ARGS -DCONFIG_TFM_FP_ARCH=${FPU_FOR_${GCC_M_CPU}})
255 list(APPEND TFM_CMAKE_ARGS -DCONFIG_TFM_ENABLE_FP=OFF)
258 list(APPEND TFM_CMAKE_ARGS -DTFM_TESTS_REVISION_CHECKS=OFF)
267 -G${CMAKE_GENERATOR}
268 -DTFM_TOOLCHAIN_FILE=${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/${TFM_TOOLCHAIN_FILE}
269 -DCROSS_COMPILE=${TFM_TOOLCHAIN_PATH}/${TFM_TOOLCHAIN_PREFIX}
270 -DCMAKE_BUILD_TYPE=${TFM_CMAKE_BUILD_TYPE}
271 -DTFM_PLATFORM=${CONFIG_TFM_BOARD}
272 -DCONFIG_TFM_BUILD_LOG_QUIET=ON
273 -DCONFIG_TFM_MEMORY_USAGE_QUIET=OFF
274 -DPython3_EXECUTABLE=${Python3_EXECUTABLE}
277-DMBEDCRYPTO_PATH=$<IF:$<BOOL:$<TARGET_PROPERTY:zephyr_property_target,TFM_MBEDCRYPTO_PATH>>,$<TAR…
278 -DCMSIS_PATH=${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/platform/ext/cmsis
287 # Set number of parallel jobs for TF-M build to 1.
288 # In some circumstances it has been experienced that building TF-M with
293 set(PARALLEL_JOBS -j 1)
304 BUILD_COMMAND ${CMAKE_COMMAND} --build . ${PARALLEL_JOBS}
305 INSTALL_COMMAND ${CMAKE_COMMAND} --install .
353 # A dependency on tfm_s.hex for zephyr.elf will not cause a Zephyr re-link when
356 # updated when there are changes in tfm itself, this again will trigger an re-link
360 # Non-Secure interface to request system reboot
396 …set(PREPROCESSED_FILE_S "${TFM_BINARY_DIR}/bl2/ext/mcuboot/CMakeFiles/signing_layout_s.dir/signing…
397 …set(PREPROCESSED_FILE_S_NS "${TFM_BINARY_DIR}/bl2/ext/mcuboot/CMakeFiles/signing_layout_s.dir/sign…
398 …set(PREPROCESSED_FILE_NS "${TFM_BINARY_DIR}/bl2/ext/mcuboot/CMakeFiles/signing_layout_ns.dir/signi…
399 set(TFM_MCUBOOT_DIR "${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/bl2/ext/mcuboot")
409 set(HEX_ADDR_ARGS_S "--hex-addr=${TFM_HEX_BASE_ADDRESS_S}")
413 set(HEX_ADDR_ARGS_NS "--hex-addr=${TFM_HEX_BASE_ADDRESS_NS}")
418 set(pad_args --pad --pad-header)
420 # Secure + Non-secure images are signed the same way as a secure only
430 ${CMAKE_COMMAND} -E env PYTHONPATH=${ZEPHYR_MCUBOOT_MODULE_DIR}/scripts
432 --layout ${layout_file}
433 -k ${CONFIG_TFM_KEY_FILE_${SUFFIX}}
434 --public-key-format ${TFM_PUBLIC_KEY_FORMAT}
435 --align 1
436 -v ${CONFIG_TFM_IMAGE_VERSION_${SUFFIX}}
440 -s ${CONFIG_TFM_IMAGE_SECURITY_COUNTER}
441 --measured-boot-record
442 -H ${CONFIG_ROM_START_OFFSET}
455 # Use the TF-M NS binary as the Non-Secure application firmware image
458 # Use the Zephyr binary as the Non-Secure application firmware image
466 -o ${MERGED_FILE}
480 -o ${S_NS_FILE}
487 -o ${MERGED_FILE}
507 #Create and sign for concatenated binary image, should align with the TF-M BL2
513 -o ${MERGED_FILE}