Skip to content

Commit

Permalink
[nrf toup] kconfig: add config for mcuboot version
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
hakonfam authored and carlescufi committed Jun 4, 2019
1 parent 0a5c298 commit 8cb0e49
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ if(CONFIG_BOOTLOADER_MCUBOOT)
--key ${MCUBOOT_BASE}/${CONFIG_BOOT_SIGNATURE_KEY_FILE}
--header-size $<TARGET_PROPERTY:partition_manager,MCUBOOT_HEADER_SIZE>
--align ${DT_FLASH_WRITE_BLOCK_SIZE}
--version 0.1 # TODO configurable?
--slot-size $<TARGET_PROPERTY:partition_manager,MCUBOOT_SLOT_SIZE>
--version ${CONFIG_MCUBOOT_IMAGE_VERSION}
--slot-size $<TARGET_PROPERTY:partition_manager,MCUBOOT_SLOT_SIZE>
--pad-header
)

Expand Down
10 changes: 10 additions & 0 deletions zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ config MCUBOOT_BUILD_STRATEGY_FROM_SOURCE

endchoice

config MCUBOOT_IMAGE_VERSION
string "Image version"
default "0.0.0+0"
help
Value to be passed as 'version' argument to 'imgtool.py' when
creating signed image. Note that no semantics are connected to
this variable. It does not provide downgrade prevention, and is only
valuable for debugging purposes. Format: maj.min.rev+build with
latter parts optional.

endif # BOOTLOADER_MCUBOOT

config BOOT_SIGNATURE_KEY_FILE
Expand Down

0 comments on commit 8cb0e49

Please sign in to comment.