Skip to content

Sync boot LUN before reset#129

Open
adeebshihadeh wants to merge 1 commit into
masterfrom
sync-boot-lun
Open

Sync boot LUN before reset#129
adeebshihadeh wants to merge 1 commit into
masterfrom
sync-boot-lun

Conversation

@adeebshihadeh

Copy link
Copy Markdown
Contributor

qdl can leave a device unbootable if the GPT A/B metadata and UFS boot LUN disagree. The observed disk state was GPT marking _b active/bootable while the UFS boot LUN still pointed at LUN 1. ABL then fails before Linux:

Active Slot _b is bootable, retry count 6
Boot lun: 1 and BootableSlot: _b do not match
Err: line:1527 FindBootableSlot() status: Device Error

Fastboot avoids this through SetActiveSlot(): even when the requested slot is already active, it checks the UFS boot LUN and rewrites it to match the slot (_a -> 1, _b -> 2). Normal qdl flash scripts do not call setactiveslot; they flash and then reset, so the mismatch survives.

This syncs the UFS boot LUN from the detected active slot before reset. If no A/B slot metadata is present, reset proceeds unchanged.

Tested:

  • bun test
  • bun run build
  • bun run lint
  • hardware: active _b reset now sends setbootablestoragedrive value=2; ABL logs Booting from slot (_b) instead of the mismatch error.

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.

1 participant