Browse Source

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>
pull/83253/head
Ederson de Souza 3 months ago committed by Benjamin Cabé
parent
commit
e420b21834
  1. 1
      scripts/ci/check_compliance.py
  2. 5
      share/sysbuild/image_configurations/BOOTLOADER_image_default.cmake
  3. 2
      share/sysbuild/image_configurations/MAIN_image_default.cmake
  4. 13
      share/sysbuild/images/bootloader/Kconfig

1
scripts/ci/check_compliance.py

@ -1101,6 +1101,7 @@ flagged. @@ -1101,6 +1101,7 @@ flagged.
"SEL",
"SHIFT",
"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_WATCH", # Issue 13749
"SOME_BOOL",

5
share/sysbuild/image_configurations/BOOTLOADER_image_default.cmake

@ -12,7 +12,8 @@ set(bootmodes CONFIG_SINGLE_APPLICATION_SLOT @@ -12,7 +12,8 @@ set(bootmodes CONFIG_SINGLE_APPLICATION_SLOT
CONFIG_BOOT_SWAP_USING_MOVE
CONFIG_BOOT_DIRECT_XIP
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)
set(bootmode CONFIG_SINGLE_APPLICATION_SLOT)
@ -30,6 +31,8 @@ elseif(SB_CONFIG_MCUBOOT_MODE_RAM_LOAD) @@ -30,6 +31,8 @@ elseif(SB_CONFIG_MCUBOOT_MODE_RAM_LOAD)
set(bootmode CONFIG_BOOT_RAM_LOAD)
elseif(SB_CONFIG_MCUBOOT_MODE_FIRMWARE_UPDATER)
set(bootmode CONFIG_BOOT_FIRMWARE_LOADER)
elseif(SB_CONFIG_MCUBOOT_MODE_SINGLE_APP_RAM_LOAD)
set(bootmode CONFIG_SINGLE_APPLICATION_SLOT_RAM_LOAD)
endif()
foreach(loopbootmode ${bootmodes})

2
share/sysbuild/image_configurations/MAIN_image_default.cmake

@ -41,5 +41,7 @@ if(SB_CONFIG_BOOTLOADER_MCUBOOT) @@ -41,5 +41,7 @@ if(SB_CONFIG_BOOTLOADER_MCUBOOT)
set_config_int(${ZCMAKE_APPLICATION} CONFIG_FLASH_SIZE 0)
elseif(SB_CONFIG_MCUBOOT_MODE_FIRMWARE_UPDATER)
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()

13
share/sysbuild/images/bootloader/Kconfig

@ -126,6 +126,19 @@ config MCUBOOT_MODE_FIRMWARE_UPDATER @@ -126,6 +126,19 @@ config MCUBOOT_MODE_FIRMWARE_UPDATER
mechanism defined for entering the slot1_partition which is a dedicated firmware updater
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
config SIGNATURE_TYPE

Loading…
Cancel
Save