Skip to content

boot: zephyr: kconfig: Default to swap using offset for nRF devices #2266

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nordicjm
Copy link
Collaborator

Defaults to the new swap using offset mode

Defaults to the new swap using offset mode

Signed-off-by: Jamie McCrae <[email protected]>
@nordicjm nordicjm requested a review from de-nordic as a code owner April 17, 2025 07:53
Fixes an issue with swap using offser with serial recovery by
changing an #ifdef

Signed-off-by: Jamie McCrae <[email protected]>
@@ -397,14 +397,14 @@ config BOOT_VALIDATE_SLOT0_ONCE

config BOOT_PREFER_SWAP_OFFSET
bool "Prefer the newer swap offset algorithm"
default y if SOC_FAMILY_NORDIC_NRF
Copy link
Contributor

@butok butok Apr 23, 2025

Choose a reason for hiding this comment

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

Can we make it default for all platforms?
By adding: default y if !$(dt_nodelabel_enabled,scratch_partition)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's not been made the default for all platforms due to the sector size requirements, if a device has equal sizes for slot 0 and slot 1 then it will work (but is not ideal) but if it has the swap using move ideal setup of slot 0 being larger than slot 1, it will fail, so has been left as swap using move for default for now

Copy link
Contributor

Choose a reason for hiding this comment

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

if a device has equal sizes for slot 0 and slot 1 then it will work (but is not ideal)

Using optimized slot sizes is broken with the latest mcuboot: zephyrproject-rtos/zephyr#88850
It seems, I need to switch to equal slot sizes (at least for NXP) to make it work for all modes, even if it's not optimal.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That has been fixed efa3039 but has not been pulled into zephyr yet

Copy link
Contributor

Choose a reason for hiding this comment

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

That has been fixed efa3039 but has not been pulled into zephyr yet

Great! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants