mcuboot
mcuboot copied to clipboard
Make RAM loading available for single loaders
Code for loading the image to RAM is currently under bootutil/loader.c. However, single loaders (used when one sets MCUBOOT_SINGLE_APPLICATION_SLOT) cannot use this file - a single loader in fact re-implements some of the methods of bootutil/loader.c.
This PR splits the bits of code related to RAM loading to another file inside bootutil (ram_load.c) and make them available on bootutil_priv.h, so that single loaders can simply reuse this code.
Note: these are basically the first four patches from #2044 - it seems that the multiple source bits of that PR are a bit controversial, so this PR focus on the RAM loading availability, which is hopefully less controversial.
Code for loading the image to RAM is currently under bootutil/loader.c. However, single loaders (used when one sets MCUBOOT_SINGLE_APPLICATION_SLOT) cannot use this file - a single loader in fact re-implements some of the methods of bootutil/loader.c.
Because single application slot has nothing to do with RAM load mode, they are two completely different modes, RAM load is it's own dual-slot system, single application image is a single flash image. If you want to add a single RAM slot mode then that's something that can be added as a distinct mode, not as modifying single application slot
v2:
- Have a separate Kconfig for RAM loading on single application slot
Code for loading the image to RAM is currently under bootutil/loader.c. However, single loaders (used when one sets MCUBOOT_SINGLE_APPLICATION_SLOT) cannot use this file - a single loader in fact re-implements some of the methods of bootutil/loader.c.
Because single application slot has nothing to do with RAM load mode, they are two completely different modes, RAM load is it's own dual-slot system, single application image is a single flash image. If you want to add a single RAM slot mode then that's something that can be added as a distinct mode, not as modifying single application slot
Ok - using a separate Kconfig instead of reusing the choice under !SINGLE_APPLICATION_SLOT.
v3:
CONFIG_SINGLE_APPLICATION_SLOT_RAM_LOADis not behindCONFIG_SINGLE_APPLICATION_SLOT.
v4:
CONFIG_SINGLE_APPLICATION_SLOT_RAM_LOADdoesn't selectCONFIG_SINGLE_APPLICATION_SLOTanymore. This means that there a bit more widespread changes, though.
@teburd Needs a signed off line from you
@teburd Needs a signed off line from you
Done
@teburd CI still failing on sign off
@nordicjm @nvlsianpu all commits with signed-off now (as the rebase I guess has changed the committer, which makes sense), CI passing, please re-review thanks!
@nvlsianpu any updates? Seems I'll need a rebase now but would like feedback that this is good to go
Latest rebase should fix the conflict that was introduced, the boot_enc_decrypt rename cause the rebase to show a conflict and that was fixed.
CI issues need to be fixed
They’ve been fixed again, please do review again when you can