boot: zephyr: add config for swap without scratch
Add Zephyr option to enable building a bootloader that uses an
alternative swap algorithm, that first moves up all sectors in slot1 and
then directly swaps between slot0 and slot1.
Signed-off-by: Fabio Utzig <utzig@apache.org>
diff --git a/boot/zephyr/include/target.h b/boot/zephyr/include/target.h
index 99f6361..f156c32 100644
--- a/boot/zephyr/include/target.h
+++ b/boot/zephyr/include/target.h
@@ -35,8 +35,8 @@
!defined(FLASH_AREA_IMAGE_0_SIZE) || \
!defined(FLASH_AREA_IMAGE_1_OFFSET) || \
!defined(FLASH_AREA_IMAGE_1_SIZE) || \
- !defined(FLASH_AREA_IMAGE_SCRATCH_OFFSET) || \
- !defined(FLASH_AREA_IMAGE_SCRATCH_SIZE)
+ (!defined(CONFIG_BOOT_SWAP_USING_MOVE) && !defined(FLASH_AREA_IMAGE_SCRATCH_OFFSET)) || \
+ (!defined(CONFIG_BOOT_SWAP_USING_MOVE) && !defined(FLASH_AREA_IMAGE_SCRATCH_SIZE))
#error "Target support is incomplete; cannot build mcuboot."
#endif