Build: Combine compile time MCUBoot switches
Remove multiple compile time MCUBoot switches and combine their
functionality into the 'MCUBOOT_UPGRADE_STRATEGY' switch.
Change-Id: Ibed68983ca0e2ed3c291d56514e8ad93ac0dbeba
Signed-off-by: David Vincze <david.vincze@arm.com>
diff --git a/platform/ext/musca_a.cmake b/platform/ext/musca_a.cmake
index f3bd20d..b0d0e0a 100644
--- a/platform/ext/musca_a.cmake
+++ b/platform/ext/musca_a.cmake
@@ -168,17 +168,14 @@
endif()
if (NOT BL2)
- message(STATUS "WARNING: BL2 is mandatory on target \"${TARGET_PLATFORM}\" Your choice was override.")
- set(BL2 True)
-endif()
-
-if (NOT MCUBOOT_RAM_LOADING)
- message(STATUS "WARNING: MCUBOOT_RAM_LOADING is mandatory on target \"${TARGET_PLATFORM}\" Your choice was override.")
- set(MCUBOOT_RAM_LOADING True)
-endif()
-
-if (MCUBOOT_NO_SWAP)
- message (FATAL_ERROR "MCUBOOT_NO_SWAP configuration is not supported on " ${TARGET_PLATFORM})
+ message(WARNING "BL2 is mandatory on target '${TARGET_PLATFORM}'. Your choice was overriden.")
+ set(BL2 True)
+ set(MCUBOOT_UPGRADE_STRATEGY "RAM_LOADING")
+else() #BL2 is True
+ if (NOT ${MCUBOOT_UPGRADE_STRATEGY} STREQUAL "RAM_LOADING")
+ message(WARNING "RAM_LOADING upgrade strategy is mandatory on target '${TARGET_PLATFORM}'. Your choice was overriden.")
+ set(MCUBOOT_UPGRADE_STRATEGY "RAM_LOADING")
+ endif()
endif()
if (NOT DEFINED BUILD_BOOT_SEED)