Skip to content

Commit 8bbfb6c

Browse files
sigvartmhbjarki-andreasen
authored andcommitted
[nrf noup] loader: work-around for multi-image builds
Seems multi-image dependencies are not supported for multi-image in NCS yet. This is a workaround which reverts some lines to restore previous MCUboot behavior, so that Immutable bootloader + MCUBoot type builds will work. Ref. NCSDK-8681 Signed-off-by: Sigvart Hovland <[email protected]> (cherry picked from commit 4ce3844)
1 parent 7a0c70b commit 8bbfb6c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

boot/bootutil/src/loader.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ boot_verify_dependencies(struct boot_loader_state *state)
414414
if (rc == 0) {
415415
/* All dependencies've been satisfied, continue with next image. */
416416
BOOT_CURR_IMG(state)++;
417-
} else {
417+
} else if (rc == BOOT_EBADIMAGE) {
418418
/* Cannot upgrade due to non-met dependencies, so disable all
419419
* image upgrades.
420420
*/
@@ -423,7 +423,10 @@ boot_verify_dependencies(struct boot_loader_state *state)
423423
BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_NONE;
424424
}
425425
break;
426-
}
426+
} else {
427+
/* Other error happened, images are inconsistent */
428+
return rc;
429+
}
427430
}
428431
return rc;
429432
}
@@ -1821,7 +1824,6 @@ boot_swap_image(struct boot_loader_state *state, struct boot_status *bs)
18211824
}
18221825
#endif
18231826

1824-
18251827
/**
18261828
* Performs a clean (not aborted) image update.
18271829
*

0 commit comments

Comments
 (0)