Skip to content

Commit 8cb0e49

Browse files
hakonfamcarlescufi
authored andcommitted
[nrf toup] kconfig: add config for mcuboot version
Make it easier for the user to change the mcuboot version by extracting this as a kconfig variabl. Signed-off-by: Håkon Øye Amundsen <[email protected]>
1 parent 0a5c298 commit 8cb0e49

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

zephyr/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ if(CONFIG_BOOTLOADER_MCUBOOT)
3737
--key ${MCUBOOT_BASE}/${CONFIG_BOOT_SIGNATURE_KEY_FILE}
3838
--header-size $<TARGET_PROPERTY:partition_manager,MCUBOOT_HEADER_SIZE>
3939
--align ${DT_FLASH_WRITE_BLOCK_SIZE}
40-
--version 0.1 # TODO configurable?
41-
--slot-size $<TARGET_PROPERTY:partition_manager,MCUBOOT_SLOT_SIZE>
40+
--version ${CONFIG_MCUBOOT_IMAGE_VERSION}
41+
--slot-size $<TARGET_PROPERTY:partition_manager,MCUBOOT_SLOT_SIZE>
4242
--pad-header
4343
)
4444

zephyr/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ config MCUBOOT_BUILD_STRATEGY_FROM_SOURCE
3333

3434
endchoice
3535

36+
config MCUBOOT_IMAGE_VERSION
37+
string "Image version"
38+
default "0.0.0+0"
39+
help
40+
Value to be passed as 'version' argument to 'imgtool.py' when
41+
creating signed image. Note that no semantics are connected to
42+
this variable. It does not provide downgrade prevention, and is only
43+
valuable for debugging purposes. Format: maj.min.rev+build with
44+
latter parts optional.
45+
3646
endif # BOOTLOADER_MCUBOOT
3747

3848
config BOOT_SIGNATURE_KEY_FILE

0 commit comments

Comments
 (0)