boot/zephyr: Kconfig changes supporting single image DFU
Modifications to Kconfig that add option for selection of single image
DFU and disable incompatible options.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
diff --git a/boot/zephyr/Kconfig b/boot/zephyr/Kconfig
index 6776647..e2af99e 100644
--- a/boot/zephyr/Kconfig
+++ b/boot/zephyr/Kconfig
@@ -58,6 +58,14 @@
menu "MCUBoot settings"
+config SINGLE_IMAGE_DFU
+ bool "Single image application"
+ default n
+ help
+ Single image area is used for application which means that
+ uploading a new application overwrites the one that previously
+ occupied the area.
+
choice
prompt "Signature type"
default BOOT_SIGNATURE_TYPE_RSA
@@ -150,6 +158,7 @@
every boot, but can mitigate against some changes that are
able to modify the flash image itself.
+if !SINGLE_IMAGE_DFU
config BOOT_UPGRADE_ONLY
bool "Overwrite image updates instead of swapping"
default n
@@ -171,7 +180,9 @@
This allows a swap upgrade without using a scratch partition,
but is currently limited to all sectors in both slots being of
the same size.
+endif
+if !SINGLE_IMAGE_DFU
config BOOT_BOOTSTRAP
bool "Bootstrap erased the primary slot from the secondary slot"
default n
@@ -221,6 +232,7 @@
back when swapping from the primary slot to the secondary slot. The
encryption mechanism used in this case is ECIES using primitives
described under "ECIES-X25519 encryption" in docs/encrypted_images.md.
+endif
config BOOT_MAX_IMG_SECTORS
int "Maximum number of sectors per image slot"
@@ -379,6 +391,7 @@
config UPDATEABLE_IMAGE_NUMBER
int "Number of updateable images"
default 1
+ range 1 1 if SINGLE_IMAGE_DFU
help
Enables support of multi image update.