boot/zephyr: renamed single-image mode to single-application-slot mode
The terms "single-image boot" and the "single image application" of Zephyr are confused. It might be might be understood as one-pair image dual-bank mode in comparison to multi-image mode. This patch replaces CONFIG_SINGLE_IMAGE_DFU by CONFIG_SINGLE_APPLICATION_SLOT name, which makes this mode name unambiguous. fixes #800 Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no> fix
This commit is contained in:
parent
fe03109ab1
commit
fdff3e1ea0
|
@ -102,7 +102,7 @@ zephyr_library_sources(
|
|||
${BOOT_DIR}/bootutil/src/bootutil_misc.c
|
||||
)
|
||||
|
||||
if(CONFIG_SINGLE_IMAGE_DFU)
|
||||
if(CONFIG_SINGLE_APPLICATION_SLOT)
|
||||
zephyr_library_sources(
|
||||
${BOOT_DIR}/zephyr/single_loader.c
|
||||
)
|
||||
|
|
|
@ -58,8 +58,8 @@ config NRF_CC310_BL
|
|||
|
||||
menu "MCUBoot settings"
|
||||
|
||||
config SINGLE_IMAGE_DFU
|
||||
bool "Single image application"
|
||||
config SINGLE_APPLICATION_SLOT
|
||||
bool "Single slot bootloader"
|
||||
default n
|
||||
help
|
||||
Single image area is used for application which means that
|
||||
|
@ -163,7 +163,7 @@ config BOOT_VALIDATE_SLOT0
|
|||
every boot, but can mitigate against some changes that are
|
||||
able to modify the flash image itself.
|
||||
|
||||
if !SINGLE_IMAGE_DFU
|
||||
if !SINGLE_APPLICATION_SLOT
|
||||
choice
|
||||
prompt "Image upgrade modes"
|
||||
default BOOT_SWAP_USING_MOVE if SOC_FAMILY_NRF
|
||||
|
@ -206,7 +206,7 @@ config BOOT_DIRECT_XIP
|
|||
endchoice
|
||||
endif
|
||||
|
||||
if !SINGLE_IMAGE_DFU
|
||||
if !SINGLE_APPLICATION_SLOT
|
||||
config BOOT_BOOTSTRAP
|
||||
bool "Bootstrap erased the primary slot from the secondary slot"
|
||||
default n
|
||||
|
@ -424,7 +424,7 @@ config BOOT_INTR_VEC_RELOC
|
|||
config UPDATEABLE_IMAGE_NUMBER
|
||||
int "Number of updateable images"
|
||||
default 1
|
||||
range 1 1 if SINGLE_IMAGE_DFU
|
||||
range 1 1 if SINGLE_APPLICATION_SLOT
|
||||
help
|
||||
Enables support of multi image update.
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ int flash_area_id_from_multi_image_slot(int image_index, int slot)
|
|||
{
|
||||
switch (slot) {
|
||||
case 0: return FLASH_AREA_IMAGE_PRIMARY(image_index);
|
||||
#if !defined(CONFIG_SINGLE_IMAGE_DFU)
|
||||
#if !defined(CONFIG_SINGLE_APPLICATION_SLOT)
|
||||
case 1: return FLASH_AREA_IMAGE_SECONDARY(image_index);
|
||||
#if !defined(CONFIG_BOOT_SWAP_USING_MOVE)
|
||||
case 2: return FLASH_AREA_IMAGE_SCRATCH;
|
||||
|
@ -78,7 +78,7 @@ int flash_area_id_to_multi_image_slot(int image_index, int area_id)
|
|||
if (area_id == FLASH_AREA_IMAGE_PRIMARY(image_index)) {
|
||||
return 0;
|
||||
}
|
||||
#if !defined(CONFIG_SINGLE_IMAGE_DFU)
|
||||
#if !defined(CONFIG_SINGLE_APPLICATION_SLOT)
|
||||
if (area_id == FLASH_AREA_IMAGE_SECONDARY(image_index)) {
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -58,8 +58,8 @@
|
|||
#define MCUBOOT_OVERWRITE_ONLY_FAST
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SINGLE_IMAGE_DFU
|
||||
#define MCUBOOT_SINGLE_IMAGE_DFU 1
|
||||
#ifdef CONFIG_SINGLE_APPLICATION_SLOT
|
||||
#define MCUBOOT_SINGLE_APPLICATION_SLOT 1
|
||||
#else
|
||||
|
||||
#ifdef CONFIG_BOOT_SWAP_USING_MOVE
|
||||
|
@ -80,7 +80,7 @@
|
|||
#define MCUBOOT_SWAP_SAVE_ENCTLV 1
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_SINGLE_IMAGE_DFU */
|
||||
#endif /* CONFIG_SINGLE_APPLICATION_SLOT */
|
||||
|
||||
#ifdef CONFIG_LOG
|
||||
#define MCUBOOT_HAVE_LOGGING 1
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <devicetree.h>
|
||||
#include <mcuboot_config/mcuboot_config.h>
|
||||
|
||||
#ifndef CONFIG_SINGLE_IMAGE_DFU
|
||||
#ifndef CONFIG_SINGLE_APPLICATION_SLOT
|
||||
|
||||
#if (MCUBOOT_IMAGE_NUMBER == 1)
|
||||
/*
|
||||
|
@ -43,7 +43,7 @@
|
|||
#define FLASH_AREA_IMAGE_SCRATCH FLASH_AREA_ID(image_scratch)
|
||||
#endif
|
||||
|
||||
#else /* CONFIG_SINGLE_IMAGE_DFU */
|
||||
#else /* CONFIG_SINGLE_APPLICATION_SLOT */
|
||||
|
||||
#define FLASH_AREA_IMAGE_PRIMARY(x) FLASH_AREA_ID(image_0)
|
||||
#define FLASH_AREA_IMAGE_SECONDARY(x) FLASH_AREA_ID(image_0)
|
||||
|
@ -53,6 +53,6 @@
|
|||
*/
|
||||
#define FLASH_AREA_IMAGE_SCRATCH 0
|
||||
|
||||
#endif /* CONFIG_SINGLE_IMAGE_DFU */
|
||||
#endif /* CONFIG_SINGLE_APPLICATION_SLOT */
|
||||
|
||||
#endif /* __SYSFLASH_H__ */
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
(defined(CONFIG_XTENSA) && !defined(JEDEC_SPI_NOR_0_LABEL)) || \
|
||||
!defined(FLASH_ALIGN) || \
|
||||
!(FLASH_AREA_LABEL_EXISTS(image_0)) || \
|
||||
!(FLASH_AREA_LABEL_EXISTS(image_1) || CONFIG_SINGLE_IMAGE_DFU) || \
|
||||
(!defined(CONFIG_BOOT_SWAP_USING_MOVE) && !FLASH_AREA_LABEL_EXISTS(image_scratch) && !defined(CONFIG_SINGLE_IMAGE_DFU))
|
||||
!(FLASH_AREA_LABEL_EXISTS(image_1) || CONFIG_SINGLE_APPLICATION_SLOT) || \
|
||||
(!defined(CONFIG_BOOT_SWAP_USING_MOVE) && !FLASH_AREA_LABEL_EXISTS(image_scratch) && !defined(CONFIG_SINGLE_APPLICATION_SLOT))
|
||||
#error "Target support is incomplete; cannot build mcuboot."
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue