zephyr/subsys/dfu
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
..
boot subsys/dfu/boot: Fix image confirm for Direct XIP 2024-02-06 21:00:36 +01:00
img_util
CMakeLists.txt
Kconfig