Skip to content

Commit

Permalink
boot: mynewt: Add build version comparison
Browse files Browse the repository at this point in the history
For downgrade prevention it's possible to use build number
for grater control.
So far only Zephyr has this option in Kconfig now
option is also available in mynewt.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
  • Loading branch information
kasjer authored and utzig committed Jul 17, 2023
1 parent e486b53 commit 7abfe4f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
#else
#define MCUBOOT_IMAGE_NUMBER 1
#endif
#if MYNEWT_VAL(BOOTUTIL_VERSION_CMP_USE_BUILD_NUMBER)
#define MCUBOOT_VERSION_CMP_USE_BUILD_NUMBER
#endif
#if MYNEWT_VAL(BOOT_SERIAL)
#define MCUBOOT_SERIAL 1
#endif
Expand Down
8 changes: 8 additions & 0 deletions boot/mynewt/mcuboot_config/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ syscfg.defs:
- version
- security_counter
value: none
BOOTUTIL_VERSION_CMP_USE_BUILD_NUMBER:
description: >
Use build number while comparing image version.
By default, the image version comparison relies only on version major,
minor and revision. Enable this option to take into account the build
number as well.
This only affect builds with BOOTUTIL_DOWNGRADE_PREVENTION set to version.
value: 0
BOOTUTIL_HW_ROLLBACK_PROT:
description: >
Prevent undesirable/malicious software downgrades. When this option is
Expand Down

0 comments on commit 7abfe4f

Please sign in to comment.