diff --git a/boot/boot_serial/src/boot_serial.c b/boot/boot_serial/src/boot_serial.c index a9c0630c87..4c9df65bf7 100644 --- a/boot/boot_serial/src/boot_serial.c +++ b/boot/boot_serial/src/boot_serial.c @@ -290,7 +290,7 @@ bs_list(char *buf, int len) zcbor_list_start_encode(cbor_state, 5); image_index = 0; IMAGES_ITER(image_index) { -#ifdef MCUBOOT_SERIAL_IMG_GRP_IMAGE_STATE +#if defined(MCUBOOT_SERIAL_IMG_GRP_IMAGE_STATE) || defined(MCUBOOT_SWAP_USING_OFFSET) int swap_status = boot_swap_type_multi(image_index); #endif diff --git a/boot/zephyr/Kconfig b/boot/zephyr/Kconfig index be66515576..37d84e905d 100644 --- a/boot/zephyr/Kconfig +++ b/boot/zephyr/Kconfig @@ -397,6 +397,7 @@ config BOOT_VALIDATE_SLOT0_ONCE config BOOT_PREFER_SWAP_OFFSET bool "Prefer the newer swap offset algorithm" + default y if SOC_FAMILY_NORDIC_NRF help If y, the BOOT_IMAGE_UPGRADE_MODE will default to using "offset" instead of "scratch". This is a separate bool config option, because Kconfig doesn't allow defaults to be @@ -404,7 +405,6 @@ config BOOT_PREFER_SWAP_OFFSET config BOOT_PREFER_SWAP_MOVE bool "Prefer the newer swap move algorithm" - default y if SOC_FAMILY_NORDIC_NRF default y if !$(dt_nodelabel_enabled,scratch_partition) help If y, the BOOT_IMAGE_UPGRADE_MODE will default to using