zephyr/subsys/dfu/boot
Ben Marsh 2419274073 subsys/dfu/boot: Fix image confirm for Direct XIP
Previously the boot_write_img_confirmed() function used the MCUboot
public API function boot_set_confirmed(), but this function is hardcoded
to set the confirmed flag of slot 0. This works for MCUboot swap modes
but not for Direct XIP, where applications can execute out of secondary
slots.

This commit changes boot_write_img_confirmed() to instead use
boot_set_next() which sets the confirmed flag for a given flash area
and works with Direct XIP.

DT_CHOSEN(zephyr_code_partition) is used to get the current partition.
The zephyr,code-partition chosen node must be defined.

This commit also adds the zephyr,code-partition chosen node to the
native_sim devicetree to allow the tests under tests/subsys/dfu to
build for this target.

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2024-02-06 21:00:36 +01:00
..
CMakeLists.txt modules: introduce MCUBOOT_BOOTUTIL module 2021-01-14 18:03:38 +01:00
mcuboot.c subsys/dfu/boot: Fix image confirm for Direct XIP 2024-02-06 21:00:36 +01:00
mcuboot_priv.h dfu: Switch from FLASH_AREA_ to FIXED_PARTITION_ macros 2022-09-06 09:56:37 +02:00
mcuboot_shell.c dfu: boot: mcuboot_shell: Prevent erasing MCUboot/app flash areas 2023-12-07 14:24:48 +00:00