Skip to content

Commit

Permalink
[nrf noup] 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 <[email protected]>
(cherry picked from commit 4ce3844)
  • Loading branch information
sigvartmh authored and anangl committed Jun 28, 2024
1 parent 0fcc1f8 commit 843ee8e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions boot/bootutil/src/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,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 @@ -411,7 +411,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 Expand Up @@ -1755,7 +1758,6 @@ boot_swap_image(struct boot_loader_state *state, struct boot_status *bs)
}
#endif


/**
* Performs a clean (not aborted) image update.
*
Expand Down

0 comments on commit 843ee8e

Please sign in to comment.