Skip to content

Commit 3dfae64

Browse files
sigvartmhtejlmand
authored andcommitted
[nrf noup] bootutil: 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]> Signed-off-by: Torsten Rasmussen <[email protected]> Signed-off-by: Jamie McCrae <[email protected]> (cherry picked from commit 8f299e8) (cherry picked from commit 8c85b65) (cherry picked from commit 4ac7175) Signed-off-by: Dominik Ermel <[email protected]>
1 parent d584ea0 commit 3dfae64

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
@@ -1602,7 +1602,7 @@ boot_verify_dependencies(struct boot_loader_state *state)
16021602
if (rc == 0) {
16031603
/* All dependencies've been satisfied, continue with next image. */
16041604
BOOT_CURR_IMG(state)++;
1605-
} else {
1605+
} else if (rc == BOOT_EBADIMAGE) {
16061606
/* Cannot upgrade due to non-met dependencies, so disable all
16071607
* image upgrades.
16081608
*/
@@ -1611,7 +1611,10 @@ boot_verify_dependencies(struct boot_loader_state *state)
16111611
BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_NONE;
16121612
}
16131613
break;
1614-
}
1614+
} else {
1615+
/* Other error happened, images are inconsistent */
1616+
return rc;
1617+
}
16151618
}
16161619
return rc;
16171620
}

0 commit comments

Comments
 (0)