Skip to content

Commit 1eaac4e

Browse files
de-nordicnvlsianpu
andcommitted
zephyr: Added MCUBOOT_CHECK_HEADER_LOAD_ADDRESS Kconfig
Allows to enable MCUboot config MCUBOOT_CHECK_HEADER_LOAD_ADDRESS. Co-authored-by: Andrzej Puzdrowski <[email protected]> Signed-off-by: Dominik Ermel <[email protected]>
1 parent 98cae9a commit 1eaac4e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

boot/zephyr/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,6 +1308,14 @@ config USB_DEVICE_PRODUCT
13081308
config MCUBOOT_BOOTUTIL_LIB_OWN_LOG
13091309
bool
13101310

1311+
config MCUBOOT_CHECK_HEADER_LOAD_ADDRESS
1312+
bool "Use load address to verify application is in proper slot"
1313+
help
1314+
The bootloader will use the load address, from the image header,
1315+
to verify that binary is in slot designated for its execution.
1316+
When not selected reset vector, read from image, is used for
1317+
the same purpose.
1318+
13111319
config MCUBOOT_VERIFY_IMG_ADDRESS
13121320
bool "Verify reset address of image in secondary slot"
13131321
depends on UPDATEABLE_IMAGE_NUMBER > 1

boot/zephyr/include/mcuboot_config/mcuboot_config.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,12 @@
307307
#define MCUBOOT_FIND_NEXT_SLOT_HOOKS
308308
#endif
309309

310+
#ifdef CONFIG_MCUBOOT_CHECK_HEADER_LOAD_ADDRESS
311+
#define MCUBOOT_CHECK_HEADER_LOAD_ADDRESS 1
312+
#else
313+
#define MCUBOOT_CHECK_HEADER_LOAD_ADDRESS 0
314+
#endif
315+
310316
#ifdef CONFIG_MCUBOOT_VERIFY_IMG_ADDRESS
311317
#define MCUBOOT_VERIFY_IMG_ADDRESS
312318
#endif

0 commit comments

Comments
 (0)