Commit 7abfe4fa authored by Jerzy Kasenberg's avatar Jerzy Kasenberg Committed by Fabio Utzig
Browse files

boot: mynewt: Add build version comparison



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: default avatarJerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
parent e486b533
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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
+8 −0
Original line number Diff line number Diff line
@@ -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