Skip to content

Commit 8c85b65

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]> Signed-off-by: Torsten Rasmussen <[email protected]> Signed-off-by: Jamie McCrae <[email protected]> (cherry picked from commit 8f299e8)
1 parent 9d22930 commit 8c85b65

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
@@ -1594,7 +1594,7 @@ boot_verify_dependencies(struct boot_loader_state *state)
15941594
if (rc == 0) {
15951595
/* All dependencies've been satisfied, continue with next image. */
15961596
BOOT_CURR_IMG(state)++;
1597-
} else {
1597+
} else if (rc == BOOT_EBADIMAGE) {
15981598
/* Cannot upgrade due to non-met dependencies, so disable all
15991599
* image upgrades.
16001600
*/
@@ -1603,7 +1603,10 @@ boot_verify_dependencies(struct boot_loader_state *state)
16031603
BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_NONE;
16041604
}
16051605
break;
1606-
}
1606+
} else {
1607+
/* Other error happened, images are inconsistent */
1608+
return rc;
1609+
}
16071610
}
16081611
return rc;
16091612
}

0 commit comments

Comments
 (0)