Skip to content

Commit eb94206

Browse files
KarlKTorpnordicjm
authored andcommitted
Allow bootstrapping for multiple images
When bootstrapping all images could have the primary slot erased Signed-off-by: Karl Kristian Dyrholm Torp <[email protected]>
1 parent d59ae34 commit eb94206

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

boot/bootutil/src/loader.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -1929,8 +1929,7 @@ boot_prepare_image_for_update(struct boot_loader_state *state,
19291929
rc = boot_read_image_headers(state, !boot_status_is_reset(bs), bs);
19301930
#ifdef MCUBOOT_BOOTSTRAP
19311931
/* When bootstrapping it's OK to not have image magic in the primary slot */
1932-
if (rc != 0 && (BOOT_CURR_IMG(state) != BOOT_PRIMARY_SLOT ||
1933-
boot_check_header_erased(state, BOOT_PRIMARY_SLOT) != 0)) {
1932+
if (rc != 0 && boot_check_header_erased(state, BOOT_PRIMARY_SLOT) != 0) {
19341933
#else
19351934
if (rc != 0) {
19361935
#endif

0 commit comments

Comments
 (0)