File tree Expand file tree Collapse file tree 4 files changed +19
-14
lines changed
modules/trusted-firmware-m
samples/tfm_integration/psa_firmware Expand file tree Collapse file tree 4 files changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -347,15 +347,6 @@ if (CONFIG_BUILD_WITH_TFM)
347347 # To ensure that generated include files are created before they are used.
348348 add_dependencies (zephyr_interface tfm)
349349
350- # Set default image versions if not defined elsewhere
351- if (NOT DEFINED TFM_IMAGE_VERSION_S)
352- set (TFM_IMAGE_VERSION_S 0.0.0+0)
353- endif ()
354-
355- if (NOT DEFINED TFM_IMAGE_VERSION_NS)
356- set (TFM_IMAGE_VERSION_NS 0.0.0+0)
357- endif ()
358-
359350 if (CONFIG_TFM_BL2)
360351 set (PREPROCESSED_FILE_S "${TFM_BINARY_DIR} /bl2/ext/mcuboot/CMakeFiles/signing_layout_s.dir/signing_layout_s.o" )
361352 set (PREPROCESSED_FILE_NS "${TFM_BINARY_DIR} /bl2/ext/mcuboot/CMakeFiles/signing_layout_ns.dir/signing_layout_ns.o" )
@@ -390,7 +381,7 @@ if (CONFIG_BUILD_WITH_TFM)
390381 -k ${CONFIG_TFM_KEY_FILE_${SUFFIX} }
391382 --public -key-format ${TFM_PUBLIC_KEY_FORMAT}
392383 --align 1
393- -v ${TFM_IMAGE_VERSION_ ${SUFFIX} }
384+ -v ${CONFIG_TFM_IMAGE_VERSION_ ${SUFFIX} }
394385 ${pad_args}
395386 ${HEX_ADDR_ARGS_${SUFFIX} }
396387 ${ADD_${SUFFIX} _IMAGE_MIN_VER}
Original file line number Diff line number Diff line change @@ -173,6 +173,22 @@ config TFM_BL2_NOT_SUPPORTED
173173 Hidden option to mark the BL2, the MCUBoot included in TF-M, as not supported.
174174 Platforms that don't use BL2 should select this option.
175175
176+ config TFM_IMAGE_VERSION_S
177+ string "Version of the Secure Image"
178+ default "0.0.0+0"
179+ help
180+ MCUBoot may be configured to prevent rollback prevention based on image
181+ versions of both the secure firmware and non-secure firmware. This sets
182+ the secure firmware's version for rollback prevention.
183+
184+ config TFM_IMAGE_VERSION_NS
185+ string "Version of the Non-Secure Image"
186+ default "0.0.0+0"
187+ help
188+ MCUBoot may be configured to prevent rollback prevention based on image
189+ versions of both the secure firmware and non-secure firmware. This sets
190+ the non-secure firmware's version for rollback prevention.
191+
176192config TFM_BL2
177193 bool "Add MCUboot to TFM"
178194 depends on !TFM_BL2_NOT_SUPPORTED
Original file line number Diff line number Diff line change 22
33cmake_minimum_required (VERSION 3.13.1)
44
5- if (NOT TFM_IMAGE_VERSION_NS)
6- set (TFM_IMAGE_VERSION_NS 0.0.1+0)
7- endif ()
8-
95find_package (Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE} )
106
117project (tfm_psa_firmware)
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ CONFIG_BUILD_WITH_TFM=y
88CONFIG_TFM_BL2=y
99CONFIG_TFM_IPC=y
1010CONFIG_TFM_PARTITION_FIRMWARE_UPDATE=y
11+ CONFIG_TFM_IMAGE_VERSION_S="0.0.3"
12+ CONFIG_TFM_IMAGE_VERSION_NS="0.0.1"
1113
1214# The Zephyr CMSIS emulation assumes that ticks are ms, currently
1315CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
You can’t perform that action at this time.
0 commit comments