Skip to content

Retry target after an unusable backup - #60

Merged
felipebalbi merged 1 commit into
OpenDevicePartnership:mcxa-secure-bootfrom
gjpmsft:personal/gepala/sbl-fallback-nor-readiness
Oct 28, 2026
Merged

felipebalbi merged 1 commit into
OpenDevicePartnership:mcxa-secure-bootfrom
gjpmsft:personal/gepala/sbl-fallback-nor-readiness

Conversation

@gjpmsft

@gjpmsft gjpmsft commented Oct 27, 2026 •

Copy link
Copy Markdown
  • Retry the target when the selected backup is unusable.
  • Record Attempting before boot so the app tracks its running/update slots correctly.

@gjpmsft
gjpmsft force-pushed the personal/gepala/sbl-fallback-nor-readiness branch from 9ae308f to 843dd0a Compare October 27, 2026 00:15
@gjpmsft gjpmsft changed the title Recover boot from unusable backup and busy NOR Retry target after an unusable backup Oct 27, 2026
@gjpmsft gjpmsft self-assigned this Oct 27, 2026
When the journal selects an unusable backup, try the distinct target
rather than aborting without checking it during this boot. Record
Attempting before handoff so the app tracks its running and update slots
correctly.
@gjpmsft
gjpmsft force-pushed the personal/gepala/sbl-fallback-nor-readiness branch from e1b2a47 to 23c9d23 Compare October 27, 2026 00:27
@gjpmsft
gjpmsft marked this pull request as ready for review October 27, 2026 00:29
@jerrysxie
jerrysxie requested a balanced review from Copilot October 27, 2026 00:49
@jerrysxie jerrysxie added this to EC Oct 27, 2026
@jerrysxie jerrysxie moved this to In Progress in EC Oct 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the bootloader recovery change.

No open issues 🎉

What changed in this PR

Adds a recovery path to the bootloader: when the selected backup cannot boot, it retries the target if the slots differ.

Changes:

  • Retry the target after a failed backup boot.
  • Record Attempting before retrying so the application identifies its running and update slots correctly.
  • Document the fallback behavior and once-per-boot candidate checks.
File Description
README.md Documents reverse fallback and slot tracking.
libs/​ec-slimloader/​src/​lib.rs Adds the target retry and preceding Attempting status update.

Review effort: Balanced

Comment thread libs/ec-slimloader/src/lib.rs
Comment thread libs/ec-slimloader/src/lib.rs
Comment thread libs/ec-slimloader/src/lib.rs

@felipebalbi felipebalbi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me but there is a small concern I would like to point out:

After this change, if both images fail we will ping-pong between Attempting -> Failed forever. This may cause extra wear on the particular page holding those states.

Not a super big deal, but it's a real flash wear concern.

@gjpmsft

gjpmsft commented Oct 27, 2026

Copy link
Copy Markdown
Author

Looks good to me but there is a small concern I would like to point out:

After this change, if both images fail we will ping-pong between Attempting -> Failed forever. This may cause extra wear on the particular page holding those states.

Not a super big deal, but it's a real flash wear concern.

Agreed, but we're in a state that is entirely unrecoverable at that point any way.

@felipebalbi
felipebalbi merged commit 1860501 into OpenDevicePartnership:mcxa-secure-boot Oct 28, 2026
9 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in EC Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants