Skip to content

Commit ed957d4

Browse files
committed
boot: zephyr: kconfig: Default to swap using offset
Defaults to the new swap using offset mode, excluding stm32 as these devices are already aligned to swap using move with extra sectors in slot0 Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
1 parent e1b4677 commit ed957d4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

boot/zephyr/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,14 +408,15 @@ config BOOT_VALIDATE_SLOT0_ONCE
408408

409409
config BOOT_PREFER_SWAP_OFFSET
410410
bool "Prefer the newer swap offset algorithm"
411+
default y if !$(dt_nodelabel_enabled,scratch_partition) && !SOC_FAMILY_STM32
411412
help
412413
If y, the BOOT_IMAGE_UPGRADE_MODE will default to using "offset" instead of "scratch".
413414
This is a separate bool config option, because Kconfig doesn't allow defaults to be
414415
overridden in choice options. Most devices should be using swap using offset mode.
415416

416417
config BOOT_PREFER_SWAP_MOVE
417418
bool "Prefer the newer swap move algorithm"
418-
default y if SOC_FAMILY_NORDIC_NRF
419+
depends on !BOOT_PREFER_SWAP_OFFSET
419420
default y if !$(dt_nodelabel_enabled,scratch_partition)
420421
help
421422
If y, the BOOT_IMAGE_UPGRADE_MODE will default to using

0 commit comments

Comments
 (0)