Skip to content

sysbuild: Default to swap using offset for MCUboot #93310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions share/sysbuild/images/bootloader/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ if BOOTLOADER_MCUBOOT

choice MCUBOOT_MODE
prompt "Mode of operation"
default MCUBOOT_MODE_SWAP_USING_MOVE
# Should be removed if board dts is updated
default MCUBOOT_MODE_SWAP_USING_MOVE if SOC_FAMILY_STM32
Comment on lines +35 to +36
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice if comment contains a bit more info, for example.

# default MCUBOOT_MODE_SWAP_USING_MOVE should be removed if STM32 board dts is updated

especially because sometimes when code gets updated then developers forget to remove the comment, making other people puzzled on the meaning of the comment.

btw. you mention board dts, but checks againts STM32 SoC.
Is this in the board dts for all STM32, or in a soc dts ?

default MCUBOOT_MODE_SWAP_USING_OFFSET
help
The operating mode of MCUboot (which will also be propagated to the application).

Expand All @@ -45,7 +47,6 @@ config MCUBOOT_MODE_SINGLE_APP

config MCUBOOT_MODE_SWAP_USING_OFFSET
bool "Swap using offset"
select EXPERIMENTAL
help
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funnily this description isn't really helpful IMO. I would have expected to learn about the difference between USING_MOVE vs USING_OFFSET from the help texts. But they appear to be identical.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but it wouldn't hurt refer to it.

MCUboot expects slot0_partition and slot1_partition to be present in DT and application
will boot from slot0_partition. MCUBOOT_BOOTLOADER_NO_DOWNGRADE should also be selected
Expand Down