mcuboot: Kconfig options for single app slot RAM loading mode

MCUboot has a configuration for single application slot RAM loading, in
which the single loader (or a hook thereof) can load an application from
an arbitrary flash location to RAM. Applications that are to be loaded
in this way need to specify, in their mcuboot header, the load address
in RAM they are meant to be loaded.

This patch adds a new Kconfig for this mode. The load address used comes
from devicetree chosen property "mcuboot,ram-load-dev", if it exists,
and if not, "zephyr,sram".

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
This commit is contained in:
Ederson de Souza 2024-06-28 16:10:42 -07:00 committed by Benjamin Cabé
commit c9a18fd487
3 changed files with 31 additions and 1 deletions

View file

@ -254,6 +254,21 @@ config MCUBOOT_BOOTLOADER_MODE_FIRMWARE_UPDATER
a dedicated firmware updater application used to update the slot0_partition
application.
config MCUBOOT_BOOTLOADER_MODE_SINGLE_APP_RAM_LOAD
bool "MCUboot has been configured in single app RAM load mode"
select MCUBOOT_BOOTLOADER_MODE_HAS_NO_DOWNGRADE
select MCUBOOT_BOOTLOADER_NO_DOWNGRADE
help
MCUboot can load the image to RAM from an arbitrary location. In this mode,
MCUboot will copy the image to RAM and begin execution from there. The image
must be linked to execute from RAM, the address that it is copied to is
specified using the load-addr argument when running imgtool.
Note that while not used directly, a slot0_partition must be defined in the
DT, as it is used to get information about size of the image to be loaded.
This option automatically selects MCUBOOT_BOOTLOADER_NO_DOWNGRADE as it is
not possible to swap back to older version of the application. In fact, none
of the swap operations are supported in this mode.
endchoice # MCUBOOT_BOOTLOADER_MODE
config MCUBOOT_BOOTLOADER_MODE_HAS_NO_DOWNGRADE