Skip to content

flame: native install split and policy tracking - #17

Closed
wirelessjoe wants to merge 2 commits into
derekross:mainfrom
wirelessjoe:feature/flame-permanent-install
Closed

wirelessjoe wants to merge 2 commits into
derekross:mainfrom
wirelessjoe:feature/flame-permanent-install

Conversation

@wirelessjoe

@wirelessjoe wirelessjoe commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Rebased onto current main 671b089, resolving the conflicts in the image tools, device docs, tests and SSH helper. This combined draft now tracks the requested split; review and land the focused replacements rather than this combined diff.

Part Replacement State
(a) Boot plumbing #56 Draft; runtime needed before use
(b) Runtime and hooks #55 Draft; fresh deployment/smoke gate
(c) SSH options #57 Ready for review
(d) GPT proposal #58 Draft; maintainer policy hold
(e) Runbook/results/ABL assessment #59 Ready for review

The runtime must be available before native boot/root use. The SSH changes and basic recovery documentation are independent of the held GPT proposal. All five are based directly on main, and all ten pairwise merge checks passed.

Addressed the review points:

  • Preserve current main's SOC-compatible/AVB handling, serial-pinned Fastboot calls and shared SSH --fresh/--stop behavior.
  • Use shell 0.2.24 and first-boot 0.1.3, with matching minimum dependencies in device-flame 0.1.0.
  • Resolve unique boot_b and userdata PARTNAMEs and their parent LUN in both GPT read and final RO checks; test missing, duplicate and wrong-LUN cases.
  • Explain that rescue :2222 uses the same builder-supplied public key and exposes the real root read-write at /realroot.
  • Keep agent sign-in evidence concise and state recovery is the buttons alone because this handset's stock A does not boot.
  • Assess device-coral: descriptor, direct ABL bring-up notes and device matrix #52's direct-ABL recipe without importing its private-source hardware claims. The retained flame Image has text_offset=0; a published/reviewed kernel change and the LZ4/DTB/DTBO gates must pass before a flame boot test.

Policy remains unchanged. The GPT writer is isolated in draft #58 pending Derek's named exception. The proposed userdata flash has been held out of the rebased executable plumbing; no unsuffixed flash path is added. Direct ABL would not itself settle boot-success flags.

Validation: policy checks and tests/all passed; all three touched package suites passed with current jq behavior; real OpenSSH stdio checks and a separate read-only review passed. The full unrelated package run has four failures also reproduced on unmodified main in the older Debian/root harness, documented in the replacements. Optional fixture/tool skips remain skips. A fresh read-only phone-smoke attempt could not reach USB, so no refreshed package/payload hardware pass is claimed. Historical results remain dated and separate; the intermittent reset remains unresolved.

Companion source links pin the public review snapshot, retained on archive/flame-review-snapshot-20261026. No phone reboot, flash, driver/PMIC change or package deployment was performed during this review refresh.

@derekross derekross left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks, @wirelessjoe. This is a careful piece of work, and the write-up is unusually thorough. I went through it read-only:

  • Merges cleanly and doesn't touch other phones. Everything new is behind DEVICE=flame FLAME_NATIVE=1 or the flame-pinned uboot-ext4 profile. The omamobile-shell/firstboot changes act only when /usr/share/omamobile/flame-root exists, and the extra ufw rules are limited to usb0. tools/phone-ssh behaves as before with no variables set.
  • Tests: all the tests it adds or touches pass on the branch (storage-guard, boot-method, flame-probe, flame-images, phone-ssh, the flame package, firstboot and the three flame-*.py).
  • Clean diff: no identifiers or blobs, the sources are fine to cite, and nothing proprietary is bundled. The Chrome flags only merge when Chrome is already installed.

Two parts need a policy decision on my side before they can land anywhere in the repo:

  1. device/flame/native/boot_success_apply.py writes GPT LBAs 1, 2, last-1 and last with SCSI WRITE(16) through SG_IO on a partition node whose read-only flag is still set. That addresses the whole LUN, outside boot_b and userdata. It's well guarded: backup first, byte-exact plan, readback, run by hand only. Even so, it is a write past the storage guard, and AGENTS.md §1 rules that out today.
  2. fastboot flash userdata in cmd_flash is the first flash without a slot suffix in bin/omamobile. It's gated (FLAME_ERASE_USERDATA=flame, the product/unlock/slot checks, the capacity check), and userdata is ours, but the rules say never to run one.

I'll come back on both. If they're accepted, they get a named flame-only exception in AGENTS.md.

Meanwhile, could you split this up? At 59 files it's hard to review as one PR, and the low-risk parts could land now:

  • (a) the bin/omamobile/build-rootfs boot-method plumbing plus tests/flame-images;
  • (b) the omamobile-device-flame package and the firstboot/shell hooks;
  • (c) the tools/phone-ssh options (not flame-specific, so a PR of its own);
  • (d) the boot-success GPT tooling and BOOT-PLAN.md, kept separate so it can wait for the decision above;
  • (e) the native README/RESULTS docs.

Smaller things:

  • read_gpt.py hardcodes sda7 and sda15, but BOOT-PLAN §4 says LUN letters change between boots. It fails closed, but please resolve both by PARTNAME.
  • The native init's second dropbear on 172.16.42.1:2222 stays up after switch_root. Please note which authorized_keys it uses.
  • RESULTS.md has a lot of detail on ChatGPT/Codex sign-in sessions. For a public repo, a line saying an agent app signed in and ran a prompt is enough.
  • Since this handset's stock A doesn't boot, please say clearly in DEVICES.md that recovery relies on the buttons alone.

Thanks again for pushing the Pixel 4 this far!

@derekross

Copy link
Copy Markdown
Owner

Hi @wirelessjoe, a short follow-up to my review from Monday, for when you pick this up again:

  • Version clash: main has since shipped a different omamobile-shell 0.2.10 (the Canvas frame budget fix), so the shell change here needs 0.2.11, and omamobile-device-flame's depends should require omamobile-shell>=0.2.11. Otherwise a plain 0.2.10 satisfies it without the flame hook.
  • Conflict: the branch now conflicts with main in tests/all.
  • Rescue SSH: from native/build, the :2222 rescue uses the same builder-supplied key.pub as the initramfs, and it has the real root bind-mounted read-write at /realroot. A sentence about both in the README answers my earlier question.
  • PARTNAME: the hardcoded sda15 in boot_success_apply.py's RO-flag check needs the same PARTNAME fix as read_gpt.py.

The split I suggested still stands. (a) the boot-method plumbing, (b) the package and hooks and (c) the phone-ssh options can land on their own while I decide on the GPT tool and the userdata flash. Thanks!

derekross added a commit that referenced this pull request Oct 26, 2026
* DEVICES: status as of 2026-10-26, from today's merged pull requests

The matrix and the wanted list had fallen behind what merged since
2026-10-22:

- Pixel Fold buttons, no -> works (volume and power): the volume keys
  (linux-omarchy-mobile#11, felix NOTES 2026-10-22) and the power key
  (#41: event0 reports KEY_POWER, logind ignores it, the phone stays up).
- Pixel Fold GPU, no -> testing: Panthor bound and glmark2 ran on the
  cover (#5), but #41's smoke test found no render node, so not on by
  default. A new felix NOTES entry records both, since the 2026-10-22
  entry still says the power key is not described.
- Pixel Fold touch: still WIP; links the cover touch reports (#48, in
  review).
- Pixel 9a boot: still WIP; "private kernel" is now "SoC patches merging,
  board DTS not public" (#18-#31, #34, #46 merged; issue #28).
- Wanted: the Pixel 7a reached first light (#43, issue #36; descriptor
  in omarchy-mobile#37/#38); the Pixel 6 Pro boots our kernel to
  Hyprland on the G78 (#2, #3; package in #41); the Pixel 8 Pro's UFS
  plan and the zuma DT are in review (omarchy-mobile#42, kernel #13);
  the Pixel 11 Pro Fold has a tracking issue (#40).

CAMERA-PLAN's status line still said the telephoto is "out of focus";
it is fixed-focus, sharp at a distance (2026-10-26, as DEVICES says).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* README, ROADMAP, CONTRIBUTING: status as of 2026-10-26

- README: a 2026-10-26 entry for omamobile-shell 0.2.17 and 0.2.18
  (#43, #46: home pill, recents on swipe and hold, Power wakes a dark
  screen, the touch audit's quick wins), the reserved-memory overlap fix
  (linux-omarchy-mobile#58) and the community ports' merged steps. It
  now says Omarchy Mobile's own packages aren't hosted yet, since the
  2026-10-22 entry read as if `omarchy update` fetched them over Wi-Fi:
  pkgs.omamobile.org is set up (30052e8) but nothing is published. The
  first non-Pixel ports (#25, #47) are still in review, not running.
- ROADMAP: the updates row and OTA track name pkgs.omamobile.org as set
  up and empty; the telephoto's lens holds its I2C bus when driven
  (not "doesn't answer" or "NACKs"); the shell row gains #43 and #46;
  §3.7 no longer calls the installer "not started" while §1 has it in
  testing; §3.8 step 9 lists the ports under way.
- CONTRIBUTING §5.2: zuma and zumapro are no longer "not started"
  (zuma: kernel #15-#17, #49, #50; zumapro: #18-#28, #34, #46).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* DEVICES, CONTRIBUTING: the Pixel 8 Pro in the matrix, and the naming rule

husky's notes merged in #23 and its package and UFS plan in #42, so by
DEVICES.md's own rule it moves from Wanted into the matrix: boot WIP
(our kernel on slot B, the zuma DT in review as kernel #13), storage
testing (UFS at HS-G4 behind the guard, Arch on userdata, UFS-PLAN
U1-U3), a simple-framebuffer console, USB and SSH. It also makes the
website's "under way on N more phones" count it.

CAMERA-PLAN's older "telephoto lens works" entry is marked superseded
by the fixed-focus finding, and kept as the record of that test.

The rule that public copy describes a base by its parts and doesn't
name other mobile Linux projects was only written in the website's
repository. It is in CONTRIBUTING §6.3 and AGENTS.md now, with the
exception for licensed sources (raised by #47).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

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

Copy link
Copy Markdown
Owner

Hi @wirelessjoe, a status note while this is in draft. I still owe you my decision on the two writes (the GPT attribute write in boot_success_apply.py and the unsuffixed fastboot flash userdata); I'll post it separately. It now matters for the Pixel 4 XL as well (#52), which has the same slot-flag question.

Meanwhile, main has moved, so the branch needs a rebase:

  • Conflicts in bin/omamobile, docs/DEVICES.md, tests/all and tools/phone-ssh. phone-ssh gained a shared connection (OMAMOBILE_SSH_SHARE=1) and --fresh, so your host, key and known-hosts options need to sit on top of those.
  • Versions: main is at omamobile-shell 0.2.23 and omamobile-firstboot 0.1.2, so the hooks here need 0.2.24 and 0.1.3 (or later), with omamobile-device-flame depending on omamobile-shell>=0.2.24.

The split from my review still stands, and (a) the boot-method plumbing, (b) the package and hooks and (c) the phone-ssh options can land without waiting for me. The smaller points (PARTNAME in read_gpt.py and boot_success_apply.py, the :2222 rescue's key and /realroot, a shorter agent-sign-in section, and "recovery is the buttons alone" in DEVICES.md) still apply.

One thing you may find useful: #52 boots a header-v2 boot.img straight from the c2f2-0.5-8906123 bootloader on the Pixel 4 XL, without U-Boot (its BRINGUP-M1 lists the three things ABL needs). If that holds on the Pixel 4, it could remove the U-Boot stage and the header-prefix erase. Thanks for your patience!

wirelessjoe and others added 2 commits October 26, 2026 18:42
Rebase the native development proposal onto current main and prepare the
five focused review branches. Preserve SOC-compatible and AVB
validation, serial-pinned Fastboot writes and fresh/shared SSH support.
Resolve GPT partition names, clarify rescue-key authority and buttons-
only recovery, shorten agent evidence, and assess the direct-ABL
candidate without new hardware claims. Keep userdata flashing out and
mark the GPT writer pending the maintainer policy exception.

Co-Authored-By: Codex <noreply@openai.com>
Quote explicit known-host paths for OpenSSH and isolate masters by
canonical paths and file contents. Link unavailable companions to
the immutable rebased review snapshot and state runtime ordering.

Co-Authored-By: Codex <noreply@openai.com>
@wirelessjoe
wirelessjoe force-pushed the feature/flame-permanent-install branch from 600238b to 448877b Compare October 26, 2026 22:46
@wirelessjoe wirelessjoe changed the title flame: add opt-in permanent install with boot, display and app fixes flame: native install split and policy tracking Oct 26, 2026
derekross added a commit that referenced this pull request Oct 26, 2026
…lags as a named exception

Two decisions the Qualcomm ports (#17/#55-#59 flame, #52 coral, #25
alioth) were waiting on:

- AGENTS.md said never to run an unsuffixed fastboot flash, but our own
  tools/install-phone already flashes userdata that way behind its guards.
  The rule now says so: userdata has no slots, and it is flashed only
  through install-phone.
- On the Pixel 4 family the A/B slot flags live in GPT attributes, so
  marking slot B bootable is a partition-table write the storage guard
  can't block. It is allowed only as a narrow exception named per device
  in CONTRIBUTING §3.1 (LUN, sectors, bit, CRCs), done by hand once per
  boot-image install, with the flags recorded before and after, a
  rollback for a corrupted GPT and a way back. Never automatic. No device
  has an entry yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derekross

Copy link
Copy Markdown
Owner

Thanks, @wirelessjoe, for turning this around so fast, and for the split: it makes this much easier to review. I checked that the five new PRs together give exactly this branch, so I'll review them and close this one once they've landed, pointing at #58 for the GPT question. My answers on the two writes are in #58 (the GPT bit) and below (userdata).

On fastboot flash userdata: our own tools/install-phone already flashes userdata this way, behind its guarded flash() (serial pinned, typed codename, allowlist, dry run), and CONTRIBUTING lists userdata as ours. So the rule in AGENTS.md was worded more strictly than what we actually do. The fix is up as #60: no unsuffixed flash except userdata, and only through install-phone. For flame, that means a uboot-ext4 branch in install-phone later, rather than a second userdata writer in bin/omamobile. Thanks for taking it out of the split in the meantime.

derekross added a commit that referenced this pull request Oct 26, 2026
…lags as a named exception (#60)

* AGENTS, CONTRIBUTING: userdata through install-phone; Qualcomm slot flags as a named exception

Two decisions the Qualcomm ports (#17/#55-#59 flame, #52 coral, #25
alioth) were waiting on:

- AGENTS.md said never to run an unsuffixed fastboot flash, but our own
  tools/install-phone already flashes userdata that way behind its guards.
  The rule now says so: userdata has no slots, and it is flashed only
  through install-phone.
- On the Pixel 4 family the A/B slot flags live in GPT attributes, so
  marking slot B bootable is a partition-table write the storage guard
  can't block. It is allowed only as a narrow exception named per device
  in CONTRIBUTING §3.1 (LUN, sectors, bit, CRCs), done by hand once per
  boot-image install, with the flags recorded before and after, a
  rollback for a corrupted GPT and a way back. Never automatic. No device
  has an entry yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* DEVICES: the PinePhone Pro's codename and starting point

The Wanted row had "-" as its codename, which omamobile.org prints next
to the SoC ("-, Rockchip RK3399S"). It takes mainline's board name,
pinephone-pro, and names that device tree, already in our kernel, as the
starting point (promised on #47).

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

Closing this one, as said earlier: it was split into #55, #56, #58 and #59, which carry the work forward. Thanks!

@derekross derekross closed this Nov 7, 2026
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