share/sysbuild: Support single app slot RAM load mode
Adds a new Kconfig to support MCUboot single application slot RAM load mode. Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
This commit is contained in:
parent
c9a18fd487
commit
e420b21834
4 changed files with 20 additions and 1 deletions
|
@ -1101,6 +1101,7 @@ flagged.
|
||||||
"SEL",
|
"SEL",
|
||||||
"SHIFT",
|
"SHIFT",
|
||||||
"SINGLE_APPLICATION_SLOT", # Used in sysbuild for MCUboot configuration
|
"SINGLE_APPLICATION_SLOT", # Used in sysbuild for MCUboot configuration
|
||||||
|
"SINGLE_APPLICATION_SLOT_RAM_LOAD", # Used in sysbuild for MCUboot configuration
|
||||||
"SOC_SERIES_", # Used as regex in scripts/utils/board_v1_to_v2.py
|
"SOC_SERIES_", # Used as regex in scripts/utils/board_v1_to_v2.py
|
||||||
"SOC_WATCH", # Issue 13749
|
"SOC_WATCH", # Issue 13749
|
||||||
"SOME_BOOL",
|
"SOME_BOOL",
|
||||||
|
|
|
@ -12,7 +12,8 @@ set(bootmodes CONFIG_SINGLE_APPLICATION_SLOT
|
||||||
CONFIG_BOOT_SWAP_USING_MOVE
|
CONFIG_BOOT_SWAP_USING_MOVE
|
||||||
CONFIG_BOOT_DIRECT_XIP
|
CONFIG_BOOT_DIRECT_XIP
|
||||||
CONFIG_BOOT_RAM_LOAD
|
CONFIG_BOOT_RAM_LOAD
|
||||||
CONFIG_BOOT_FIRMWARE_LOADER)
|
CONFIG_BOOT_FIRMWARE_LOADER
|
||||||
|
CONFIG_SINGLE_APPLICATION_SLOT_RAM_LOAD)
|
||||||
|
|
||||||
if(SB_CONFIG_MCUBOOT_MODE_SINGLE_APP)
|
if(SB_CONFIG_MCUBOOT_MODE_SINGLE_APP)
|
||||||
set(bootmode CONFIG_SINGLE_APPLICATION_SLOT)
|
set(bootmode CONFIG_SINGLE_APPLICATION_SLOT)
|
||||||
|
@ -30,6 +31,8 @@ elseif(SB_CONFIG_MCUBOOT_MODE_RAM_LOAD)
|
||||||
set(bootmode CONFIG_BOOT_RAM_LOAD)
|
set(bootmode CONFIG_BOOT_RAM_LOAD)
|
||||||
elseif(SB_CONFIG_MCUBOOT_MODE_FIRMWARE_UPDATER)
|
elseif(SB_CONFIG_MCUBOOT_MODE_FIRMWARE_UPDATER)
|
||||||
set(bootmode CONFIG_BOOT_FIRMWARE_LOADER)
|
set(bootmode CONFIG_BOOT_FIRMWARE_LOADER)
|
||||||
|
elseif(SB_CONFIG_MCUBOOT_MODE_SINGLE_APP_RAM_LOAD)
|
||||||
|
set(bootmode CONFIG_SINGLE_APPLICATION_SLOT_RAM_LOAD)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
foreach(loopbootmode ${bootmodes})
|
foreach(loopbootmode ${bootmodes})
|
||||||
|
|
|
@ -41,5 +41,7 @@ if(SB_CONFIG_BOOTLOADER_MCUBOOT)
|
||||||
set_config_int(${ZCMAKE_APPLICATION} CONFIG_FLASH_SIZE 0)
|
set_config_int(${ZCMAKE_APPLICATION} CONFIG_FLASH_SIZE 0)
|
||||||
elseif(SB_CONFIG_MCUBOOT_MODE_FIRMWARE_UPDATER)
|
elseif(SB_CONFIG_MCUBOOT_MODE_FIRMWARE_UPDATER)
|
||||||
set_config_bool(${ZCMAKE_APPLICATION} CONFIG_MCUBOOT_BOOTLOADER_MODE_FIRMWARE_UPDATER y)
|
set_config_bool(${ZCMAKE_APPLICATION} CONFIG_MCUBOOT_BOOTLOADER_MODE_FIRMWARE_UPDATER y)
|
||||||
|
elseif(SB_CONFIG_MCUBOOT_MODE_SINGLE_APP_RAM_LOAD)
|
||||||
|
set_config_bool(${ZCMAKE_APPLICATION} CONFIG_MCUBOOT_BOOTLOADER_MODE_SINGLE_APP_RAM_LOAD y)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -126,6 +126,19 @@ config MCUBOOT_MODE_FIRMWARE_UPDATER
|
||||||
mechanism defined for entering the slot1_partition which is a dedicated firmware updater
|
mechanism defined for entering the slot1_partition which is a dedicated firmware updater
|
||||||
application used to update the slot0_partition application.
|
application used to update the slot0_partition application.
|
||||||
|
|
||||||
|
config MCUBOOT_MODE_SINGLE_APP_RAM_LOAD
|
||||||
|
bool "Single app RAM load mode"
|
||||||
|
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
|
endchoice
|
||||||
|
|
||||||
config SIGNATURE_TYPE
|
config SIGNATURE_TYPE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue