Skip to content

flame: isolate boot-success proposal and resolve PARTNAME - #58

Draft
wirelessjoe wants to merge 1 commit into
derekross:mainfrom
wirelessjoe:proposal/flame-boot-success
Draft

wirelessjoe wants to merge 1 commit into
derekross:mainfrom
wirelessjoe:proposal/flame-boot-success

Conversation

@wirelessjoe

@wirelessjoe wirelessjoe commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Part (d) of the requested split of #17, following Derek's current review. Based directly on current main 671b089; conflicts with the old proposal have been resolved.

Isolate the constrained four-sector SG_IO proposal and BOOT-PLAN. Both snapshot and final RO checks resolve unique boot_b/userdata PARTNAMEs and their common LUN, with missing/duplicate/wrong-LUN fixtures. Policy hold: this writes outside partition boundaries through SG_IO and cannot land or run until Derek approves a named AGENTS.md exception. No automatic caller or userdata flash is added.

Device and build

  • Phone: Pixel 4 (flame) for the historical bring-up; this revision is host-validated. No phone is contacted by these tests.
  • Kernel: historical handset 7.0.0-sm8150; no new hardware boot claimed.
  • Packages: None.

Checks

  • tools/pr-check origin/main
  • tests/all
  • Area prefixes, version bumps where applicable, AI Co-Authored-By and no AI Signed-off-by

Policy/tests/all and synthetic GPT, readback, stale-plan, write-order/failure and PARTNAME fixtures passed. No real block device was opened. Tests do not settle or bypass the policy decision.

The full unrelated package run in the older Debian/root harness has four failures also reproduced on unmodified main (mirror, mmd, sensors and speaker-tuning). Touched package suites pass with current jq behavior. Optional QML/Lua/root-image/provisioning fixture checks report skips. This is not a claim that every package test passed in that harness; CI uses Arch and a normal user.

On the phone

No hardware changes in this review refresh. A read-only attempt to collect a current tools/phone-smoke report could not reach the connected USB endpoint, so no fresh report is attached. Historical results stay explicitly separate from the exact new source/build. Native boot and runtime deployment remain owner-approved gates; the signed complete root and Android rollback cycle have not been repeated.

The original #17 retains the historical discussion and an immutable source snapshot; companion links and merge ordering are listed there. No firmware, calibration, identifiers, credentials or binary images are published. The earlier intermittent runtime reset remains unexplained.

Companions: runtime #55, boot #56, ssh #57, metadata #58, docs #59. Runtime #55 must be available before native boot/root use; the metadata proposal #58 stays held for policy.

Keep the SG_IO write proposal separate and explicitly blocked pending
the maintainer's named policy exception. Resolve boot_b, userdata and
their common LUN by unique PARTNAME for both snapshot and final RO
checks. Synthetic fixtures test discovery, rejection and the constrained
four-sector transaction; no block device is opened.

Co-Authored-By: Codex <noreply@openai.com>
@derekross

Copy link
Copy Markdown
Owner

Thanks for isolating this and for the PARTNAME work; resolving boot_b and userdata on one verified LUN, with the missing, duplicate and wrong-LUN cases tested, is exactly what I asked for. Here's my decision on the write itself.

I'm accepting a narrow exception for flame, because the alternative is that the Pixel 4 can't have a persistent install at all, and your design is as small as such a write can be: one bit and two checksums, by hand, once after each loader write, never automatic. The general rule is up as #60 (AGENTS.md and CONTRIBUTING §3.1: a per-device entry naming the LUN, the sectors, the bit and the CRCs, never automatic). Before flame gets its entry and this merges, I'd like three things in BOOT-PLAN:

  1. The rollback for a corrupted GPT. Both copies also describe persist and the other partitions on that LUN, so "preserve both snapshots" isn't quite a rollback. Which tool restores the tables, from which file, and who runs it?
  2. A way back. Stock on slot A doesn't boot on this handset, so recovery is the buttons and fastboot alone. Either restore stock on slot A first (your own call, with the factory image), or say in the plan that you accept buttons-only recovery for this step.
  3. The slot flags. slot-successful, slot-unbootable and slot-retry-count for both slots, before and after the run you did on the 19th. These aren't identifiers, and they're the evidence the next Qualcomm port (the Pixel 4 XL in device-coral: descriptor, direct ABL bring-up notes and device matrix #52) will need for its own entry.

The exception will name flame, this file, the four sectors and the one bit, and nothing else inherits it; other devices get their own entry once they've measured their own layout. I'll keep this as a draft until those are in. Thanks for your patience on this one.

@derekross

Copy link
Copy Markdown
Owner

The decision you've been waiting for is in: the GPT slot-flag write is allowed as a narrow, named, manual exception, and it's written into AGENTS.md §1 and CONTRIBUTING §3.1 (merged on the 26th in #60, which is why I'm late telling you here). In short:

  • Only the success bit of boot_b's entry plus the CRCs it changes, by hand, once per install of slot B's boot image. Never from a service, a hook or anything that runs at boot, and never automatic: the storage guard can't block this write, so a human runs it with the plan open.
  • The device's entry in CONTRIBUTING §3.1 names the LUN, the four sectors (LBAs 1, 2, last-1 and last), the attribute bit and the CRCs it rewrites. No other device or tool inherits the exception; coral gets its own entry once its notes show its own layout and flags.
  • The plan records the slot flags before and after, the rollback for a corrupted GPT and who runs it, and the way back: stock restored on slot A first, or your explicit acceptance here that recovery is buttons-only on this handset.

So for this PR: keep the proposal as the manual procedure (a snapshot, backup copy, read-back, dead-man and watchdog, as you wrote it), add the §3.1 entry with those four sectors and the bit, the rollback section, and the before/after flags, and say which of the two "way back" options applies to your phone. With that it can leave draft. #56 (the opt-in plumbing) still merges separately once this is settled; #55, #57 and #59 don't depend on it.

derekross added a commit that referenced this pull request Oct 30, 2026
The matrix and the Wanted list against what has merged since #140, with
each pull request's state checked on GitHub today:

- Pixel 7 (panther): the GPU and haptics nodes (kernel #129, #130) were
  closed because they landed unchanged through kernel #134, merged with
  the touchscreen node and s2idle by default; device-panther 0.1.1 (#145)
  carries the GPU's always-on rule, the feedbackd rule and the sleep.conf
  drop-in. GPU and Haptics stay "testing" and now cite #134, #145 and the
  2026-10-28 notes. Touch stays WIP: kernel #134's body records touches
  driving Hyprland and the PIN screen, but the driver fixes (kernel #133)
  and the kernel option with the touch notes (#149) are still in review.
  Suspend: "no" with the s2idle default named, since the notes say it
  hasn't run.
- Pixel 6 Pro (raven): Haptics "no" -> "works": HAPTICS-TORCH-PLAN H5
  passed (2026-10-28/29), cs40l25-vibra and the node merged as kernel
  #114, feedbackd's rule in device-raven 0.1.27 (#113). Display names
  its open kernel PR, #116.
- Pixel 7a (lynx): Bluetooth "no" -> WIP: the merged WIFI-PLAN (#133)
  records it scanning through its own UART; kernel #98 and #98 are in
  review. The Wanted line says so too.
- Pixel 7 Pro (cheetah) detail: Boot names the AVB footers a chained
  vbmeta_b needs (NOTES 2026-10-28 and 10-29, #104); Suspend describes
  the merged tier 1 auto-sleep (#64, off by default behind the
  omamobile-sleep toggle, P0-P5 on 2026-10-26) in place of the old
  "until S8" text. Nothing from the open #171, #172, #174-#176.
- Wanted: coral's #52 is merged, so its line no longer says "in review";
  flame gets a line for its native install in review (#55, #56, #58,
  #59, split out of #17); the OnePlus 13 (dodge) is listed with #111 and
  kernel #115, both open.

The Pixel 9a row and the Pixel 9 family line are left to #165. Every
status word still parses with the website's parseCell.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@derekross

Copy link
Copy Markdown
Owner

A friendly check-in: this has had no activity for about 11 days and now conflicts with main. If you're still working on the flame port, a rebase onto main will get it moving again, and I'm happy to review. If I don't hear back within a week I'll close it to keep the queue tidy; it can be reopened any time.

robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
The matrix and the Wanted list against what has merged since derekross#140, with
each pull request's state checked on GitHub today:

- Pixel 7 (panther): the GPU and haptics nodes (kernel derekross#129, derekross#130) were
  closed because they landed unchanged through kernel derekross#134, merged with
  the touchscreen node and s2idle by default; device-panther 0.1.1 (derekross#145)
  carries the GPU's always-on rule, the feedbackd rule and the sleep.conf
  drop-in. GPU and Haptics stay "testing" and now cite derekross#134, derekross#145 and the
  2026-10-28 notes. Touch stays WIP: kernel derekross#134's body records touches
  driving Hyprland and the PIN screen, but the driver fixes (kernel derekross#133)
  and the kernel option with the touch notes (derekross#149) are still in review.
  Suspend: "no" with the s2idle default named, since the notes say it
  hasn't run.
- Pixel 6 Pro (raven): Haptics "no" -> "works": HAPTICS-TORCH-PLAN H5
  passed (2026-10-28/29), cs40l25-vibra and the node merged as kernel
  derekross#114, feedbackd's rule in device-raven 0.1.27 (derekross#113). Display names
  its open kernel PR, derekross#116.
- Pixel 7a (lynx): Bluetooth "no" -> WIP: the merged WIFI-PLAN (derekross#133)
  records it scanning through its own UART; kernel derekross#98 and derekross#98 are in
  review. The Wanted line says so too.
- Pixel 7 Pro (cheetah) detail: Boot names the AVB footers a chained
  vbmeta_b needs (NOTES 2026-10-28 and 10-29, derekross#104); Suspend describes
  the merged tier 1 auto-sleep (derekross#64, off by default behind the
  omamobile-sleep toggle, P0-P5 on 2026-10-26) in place of the old
  "until S8" text. Nothing from the open derekross#171, derekross#172, derekross#174-derekross#176.
- Wanted: coral's derekross#52 is merged, so its line no longer says "in review";
  flame gets a line for its native install in review (derekross#55, derekross#56, derekross#58,
  derekross#59, split out of derekross#17); the OnePlus 13 (dodge) is listed with derekross#111 and
  kernel derekross#115, both open.

The Pixel 9a row and the Pixel 9 family line are left to derekross#165. Every
status word still parses with the website's parseCell.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants