Skip to content

Commit

Permalink
Allow bootstrapping for multiple images
Browse files Browse the repository at this point in the history
Signed-off-by: Karl Kristian Dyrholm Torp <kdt@polytech.com>
  • Loading branch information
KarlKTorp committed Oct 28, 2024
1 parent 956311d commit cf1343d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions boot/bootutil/src/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1960,8 +1960,7 @@ boot_prepare_image_for_update(struct boot_loader_state *state,
rc = boot_read_image_headers(state, !boot_status_is_reset(bs), bs);
#ifdef MCUBOOT_BOOTSTRAP
/* When bootstrapping it's OK to not have image magic in the primary slot */
if (rc != 0 && (BOOT_CURR_IMG(state) != BOOT_PRIMARY_SLOT ||
boot_check_header_erased(state, BOOT_PRIMARY_SLOT) != 0)) {
if (rc != 0 && boot_check_header_erased(state, BOOT_PRIMARY_SLOT) != 0) {
#else
if (rc != 0) {
#endif
Expand Down

0 comments on commit cf1343d

Please sign in to comment.