Skip to content

Commit ecc2a19

Browse files
sigvartmhmbolivar-nordic
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]> (cherry picked from commit 2ce366a)
1 parent 8e09534 commit ecc2a19

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
@@ -1586,7 +1586,7 @@ boot_verify_dependencies(struct boot_loader_state *state)
15861586
if (rc == 0) {
15871587
/* All dependencies've been satisfied, continue with next image. */
15881588
BOOT_CURR_IMG(state)++;
1589-
} else {
1589+
} else if (rc == BOOT_EBADIMAGE) {
15901590
/* Cannot upgrade due to non-met dependencies, so disable all
15911591
* image upgrades.
15921592
*/
@@ -1595,7 +1595,10 @@ boot_verify_dependencies(struct boot_loader_state *state)
15951595
BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_NONE;
15961596
}
15971597
break;
1598-
}
1598+
} else {
1599+
/* Other error happened, images are inconsistent */
1600+
return rc;
1601+
}
15991602
}
16001603
return rc;
16011604
}

0 commit comments

Comments
 (0)