Skip to content

docs/design: add notes about swap algorithms #2412

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
Aug 14, 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
6 changes: 6 additions & 0 deletions docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ one of these two strategies.

### [Swap using scratch](#image-swap-using-scratch)

Please note that the swap-using-scratch algorithm may be removed in the coming
future.

When swap-using-scratch algorithm is used, in addition to the slots of
image areas, the bootloader requires a scratch area to allow for reliable
image swapping. The scratch area must have a size
Expand Down Expand Up @@ -280,6 +283,9 @@ The algorithm is enabled using the `MCUBOOT_SWAP_USING_OFFSET` option.

### [Swap using move (without using scratch)](#image-swap-no-scratch)

Please note that the swap-using-offset algorithm is preferred over swap-using-move
except when building for existing products already using the latter.

This algorithm is an alternative to the swap-using-scratch algorithm.
It uses an additional sector in the primary slot to make swap possible.
The algorithm works as follows:
Expand Down
Loading