Skip to content

Commit 90f4d66

Browse files
joerchanrlubos
authored andcommitted
tfm: Fix compilation error in provisioning with attestation enabled
Fix compilation error when TFM_NRF_PROVISIONING is enabled but the INITIAL_ATTESTATION partition is disabled. The TFM_NRF_PROVISIONING uses the SECURE_BOOT_STORAGE so select this dependency. The hal_attest.c file is used by both of these modules, so compile the source file in when either is enabled. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
1 parent ec203c8 commit 90f4d66

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

modules/trusted-firmware-m/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ config TFM_NRF_PROVISIONING
419419
bool "Provision the device"
420420
depends on !TFM_PROFILE_TYPE_MINIMAL
421421
select TFM_INITIAL_ATTESTATION_KEY
422+
select SECURE_BOOT_STORAGE
422423
help
423424
Provision the TF-M image. When enabled, TF-M must be in the PSA
424425
provisioning lifecycle state in order to boot. See provisioning

modules/trusted-firmware-m/tfm_boards/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ target_include_directories(platform_s
4141
target_sources(platform_s
4242
PRIVATE
4343
common/tfm_hal_platform.c
44-
$<$<BOOL:${TFM_PARTITION_INITIAL_ATTESTATION}>:${CMAKE_CURRENT_SOURCE_DIR}/common/attest_hal.c>
44+
$<$<OR:$<BOOL:${TFM_PARTITION_INITIAL_ATTESTATION}>,$<BOOL:${NRF_PROVISIONING}>>:${CMAKE_CURRENT_SOURCE_DIR}/common/attest_hal.c>
4545
common/assert.c
4646
$<$<NOT:$<BOOL:${PLATFORM_DEFAULT_OTP}>>:${CMAKE_CURRENT_SOURCE_DIR}/common/dummy_otp.c>
4747
$<$<NOT:$<BOOL:${PLATFORM_DEFAULT_SYSTEM_RESET_HALT}>>:${CMAKE_CURRENT_SOURCE_DIR}/common/tfm_hal_reset_halt.c>

0 commit comments

Comments
 (0)