Boot: Enable multi-image boot
This patch adds the capability to handle multiple firmware images,
to update them independently. It separates the completion of aborted
image swap operations and the update of images even more, as these
should be happening at different stages of the boot process according
to the design proposal of the multiple image support:
https://github.com/JuulLabs-OSS/mcuboot/pull/317.
Also update the code related to rollback protection and the saving of
the SW component's boot status info.
Change-Id: I0f2159f40b47077fe22391ffca0f0376218d1cb1
Signed-off-by: David Vincze <david.vincze@arm.com>
diff --git a/bl2/ext/mcuboot/MCUBootConfig.cmake b/bl2/ext/mcuboot/MCUBootConfig.cmake
index f0d8114..b01cb90 100644
--- a/bl2/ext/mcuboot/MCUBootConfig.cmake
+++ b/bl2/ext/mcuboot/MCUBootConfig.cmake
@@ -13,8 +13,8 @@
if (BL2)
add_definitions(-DBL2)
- set(MCUBOOT_IMAGE_NUMBER 1 CACHE STRING "Configure the number of separately updatable firmware images")
- set_property(CACHE MCUBOOT_IMAGE_NUMBER PROPERTY STRINGS "1")
+ set(MCUBOOT_IMAGE_NUMBER 2 CACHE STRING "Configure the number of separately updatable firmware images")
+ set_property(CACHE MCUBOOT_IMAGE_NUMBER PROPERTY STRINGS "1;2")
validate_cache_value(MCUBOOT_IMAGE_NUMBER STRINGS)
set(MCUBOOT_UPGRADE_STRATEGY "OVERWRITE_ONLY" CACHE STRING "Configure BL2 which upgrade strategy to use")