Skip to content

Commit

Permalink
[nrf noup] bootutil: loader: work-around for multi-image builds
Browse files Browse the repository at this point in the history
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 <sigvart.hovland@nordicsemi.no>
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
(cherry picked from commit 4ac7175)
(cherry picked from commit 3dfae64)
  • Loading branch information
sigvartmh authored and de-nordic committed May 26, 2023
1 parent 2394b5b commit 28e1f88
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions boot/bootutil/src/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,7 @@ boot_verify_dependencies(struct boot_loader_state *state)
if (rc == 0) {
/* All dependencies've been satisfied, continue with next image. */
BOOT_CURR_IMG(state)++;
} else {
} else if (rc == BOOT_EBADIMAGE) {
/* Cannot upgrade due to non-met dependencies, so disable all
* image upgrades.
*/
Expand All @@ -1611,7 +1611,10 @@ boot_verify_dependencies(struct boot_loader_state *state)
BOOT_SWAP_TYPE(state) = BOOT_SWAP_TYPE_NONE;
}
break;
}
} else {
/* Other error happened, images are inconsistent */
return rc;
}
}
return rc;
}
Expand Down

0 comments on commit 28e1f88

Please sign in to comment.