Skip to content

Commit c1688c6

Browse files
sigvartmhnvlsianpu
authored andcommitted
[nrf temphack] bootutil: loader: Fix multi-image variant builds
Seems multi-image dependencies are not supported for multi-image in NCS yet. This is a hack which reverts it to how it worked previously in MCUboot. So that Immutable bootloader + MCUBoot type of builds will work again. Ref. NCSDK-8681 Signed-off-by: Sigvart Hovland <[email protected]>
1 parent bbca448 commit c1688c6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

boot/bootutil/src/loader.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ boot_verify_dependencies(struct boot_loader_state *state)
14041404
if (rc == 0) {
14051405
/* All dependencies've been satisfied, continue with next image. */
14061406
BOOT_CURR_IMG(state)++;
1407-
} else {
1407+
} else if (rc == BOOT_EBADIMAGE) {
14081408
/* Cannot upgrade due to non-met dependencies, so disable all
14091409
* image upgrades.
14101410
*/
@@ -1413,7 +1413,10 @@ boot_verify_dependencies(struct boot_loader_state *state)
14131413
BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_NONE;
14141414
}
14151415
break;
1416-
}
1416+
} else {
1417+
/* Other error happened, images are inconsistent */
1418+
return rc;
1419+
}
14171420
}
14181421
return rc;
14191422
}

0 commit comments

Comments
 (0)