Skip to content

AGENTS, device/tegu: a fallback to slot A on the 9a costs the Linux root - #125

Merged
derekross merged 6 commits into
derekross:mainfrom
W4HO-ham:agents-slot-b-rule
Oct 30, 2026
Merged

derekross merged 6 commits into
derekross:mainfrom
W4HO-ham:agents-slot-b-rule

Conversation

@W4HO-ham

Copy link
Copy Markdown
Contributor

The 9a lost its Linux root twice (10-26 and today). After omamobile flash (fastboot --set-active=b), slot B is unmarked, and nothing on the 9a marks it again. Every boot burns an ABL retry, and the initramfs USB safety net burns them fast. At zero, ABL boots stock Android, which reformats and encrypts userdata. This adds the rule to the boot-chain gotchas: mark B successful on the first good boot after a flash, and never boot an untested image while it's unmarked.

The 9a lost its root twice: after an omamobile flash, slot B stays
unmarked, every boot (and the initramfs USB safety net) burns an ABL
retry, and at zero ABL boots stock Android, which reformats userdata.
Mark B successful on the first good boot after a flash.
@derekross

Copy link
Copy Markdown
Owner

Thanks for writing this up, @W4HO-ham, and I'm sorry the palmtop lost its root twice. You're right that this belongs in AGENTS.md: the rest of our docs treat "slot B runs out of retries, ABL boots stock on slot A" as the safe way back (CONTRIBUTING §3.4, "Slot fallback"), and on the 9a it hasn't been safe. The mechanism you describe matches tegu's notes: the retry byte goes down by one on every ordinary unmarked boot (the 0x34 table in NOTES), omamobile flash does run fastboot --set-active=b (bin/omamobile line 788), and the initramfs safety net crashes a boot that gets no USB host in about 65 s (45 s wait, 20 s warning), so a bad image uses up the retries in a few minutes. Policy and CI both pass, and it merges cleanly.

I can't merge the line as it is yet, though. A safety rule in AGENTS.md is something every agent and contributor follows word for word, so it has to point at things they can read, and it has to agree with the approvals and records we already have. Four things:

1. Both references point at private files. docs/HANDOFF.md isn't in the repository (the link is dead on GitHub), and logs/tegu-userdata-restoration-20261026/mark-slot-b-successful.py is under logs/, which is gitignored, so nobody else has that script. Please link the tegu record instead (see 2). If the script is needed, it goes through review in its own PR.

2. The two losses need a dated record in tegu's notes. At the moment nothing on main (or in #100) records the 10-26 or 10-28 events apart from a mention of "HANDOFF, 10-26 slot A fallback" in #100's MODEM-PLAN. Please add a short device/tegu/NOTES.md entry for each one: the kernel release (uname -r) of the image that failed, how slot B was written (flash or push), fastboot getvar slot-successful:b, slot-unbootable:b and slot-retry-count:b right after the --set-active=b if you have them, how many boots it took to reach slot A, what stock showed on screen, and how you got back. The AGENTS line can then link that entry, the way the other gotchas do. Since stock booted twice, please also note whether a fresh read-only backup of efs, efs_backup, modem_userdata and persist was taken after each (CONTRIBUTING §3.3); if not, that comes before any more modem work.

3. "Stock reformats and encrypts userdata" disagrees with your own records. #100's MODEM-PLAN correction (2026-10-27, night) says that after the 10-26 fallback "stock Android on slot A can't mount its data and stops in recovery", and that "the factory reset it would need wipes the Arch install". That is the behaviour I'd expect: Android's recovery offers "Try again" or "Factory data reset" and doesn't wipe on its own. The difference changes the rule. If stock stops at a recovery prompt, the gotcha should say never choose Factory data reset; power off, get to fastboot with Volume Down + Power, and --set-active=b, and the install survives. If stock really wiped userdata with nobody choosing anything on 10-28, that's a new and serious finding, and the notes entry should show it: what was on screen, and whether anyone, or any tool, touched the recovery menu. Which was it on each day?

4. The fix it prescribes is a devinfo write, and it needs to stay inside what was approved. AGENTS §1 forbids devinfo writes, and CONTRIBUTING §3.2 allows exactly one write outside the allowlist, the boot-success marker. On #24 I approved one operation for the 9a: omamobile-bootctl mark-successful for slot B only, after a fresh full devinfo backup whose checksum matches live storage right before the write, with a laptop log, a watchdog and the read-only state restored and checked afterwards (tegu NOTES, "Approved B-success operation after layout review"; BRINGUP-M1: "Only this marking operation is agreed"). The new line turns that into a standing "after every flash" step, drops those conditions, and names a different tool I haven't seen. Please word it as the approved operation with its conditions, and link the NOTES section. And for the record: which tool marked slot B on 10-26 and 10-28, were the backup and the before and after bytes 0x30-0x37 taken, and could you add them to the notes entry? If it was the Python script, please hold off on using it again until we've looked at it together.

One more thing, about wording. "Never boot an untested image while B is unmarked" can't be followed together with "after every omamobile flash": a flash always clears the flag, so the first boot of a freshly flashed image is always both unmarked and untested. If you mean "use flash only with a known-good image set, mark B on that boot, then try new images with push, which doesn't call --set-active", please say that. Also mention the other side: with B marked, ABL no longer falls back, so a broken pushed image means fastboot by the buttons (CONTRIBUTING §3.4 already says this for cheetah). Also, how many retries does the 9a's ABL give after --set-active=b? From your table it looks like three, and that number is worth having in the rule.

Longer term, I think the proper fix is a boot-success marker in tegu's device package, the same mechanism cheetah uses and the one write CONTRIBUTING already allows, now that the 3.15 layout is agreed. Then nobody has to remember a manual step after every flash. That's a separate PR and my call to make, so please don't fold it into this one. I'll think about it once the notes are in.

Once 1-4 are addressed (most of it is a notes entry plus a reworded line), I'm happy to merge this. Thanks again for raising it rather than just restoring and moving on.

@W4HO-ham W4HO-ham changed the title AGENTS: an unmarked slot B on the Pixel 9a ends in a wiped userdata AGENTS, device/tegu: a fallback to slot A on the 9a costs the Linux root Oct 28, 2026
@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Thanks for the careful read. Pushed 8c66e8d:

  1. Links. The line now links only device/tegu/NOTES.md (the new entry, plus the "Approved B-success operation after layout review" section). HANDOFF and the logs/ script are gone from it.
  2. Records. NOTES has one dated entry covering both days: the release, how B was written (flash, then push rounds on 10-28), what we know of the retries, what stock showed and how the root came back. On each day a fresh read-only backup of efs, efs_backup, modem_userdata, persist, modem_a/b, devinfo and metadata was taken before anything else (10-28: efs, efs_backup, modem_userdata, persist, devinfo and metadata differ from 10-26). I didn't capture fastboot getvar slot-* on either day, apart from current-slot: a on 10-28, and the entry says so.
  3. Recovery prompt or wipe. Both. Each time the palmtop ended in stock recovery (sideload-only adbd: every adb command answered error: closed; on 10-26, USB 18d1:4ee7). But by then userdata's filesystem magic was already overwritten with non-zero data, before anyone chose anything. On 10-26 the restore notes record it, and on 10-28 the start of userdata read as random data. Dave doesn't remember the 10-28 screen, and nobody tapped anything. The MODEM-PLAN correction you quoted was written that night, before we'd looked at userdata. So the rule says a fallback costs the root.
  4. Marking. Both days it was omamobile-bootctl mark-successful for B, the binary built statically from packages/omamobile-device-cheetah/src/omamobile-bootctl.c (pinned hashes in the entry). A laptop script drove it: a fresh full devinfo snapshot checked against live storage right before the write, the tool's dry run (exactly one byte), a 30 s timed read-only restore, an 8192-byte readback against the predicted image, and a fresh SSH check of the flags. The before and after bytes 0x30-0x37 are in the entry, and only 0x35 changed each time. I won't use that harness again until we've looked at it together. If you'd rather I run the bare tool by hand next time, that's fine too.

The line is reworded as you suggested: flash only a known-good set, mark B on that boot with the approved operation and its conditions, then push new images. With B marked, ABL doesn't fall back, so a broken push means fastboot by the buttons. The 9a's ABL gives three tries after --set-active=b (from the 10-28 dumps), and the rule says so. I'll leave the boot-success marker to you.

derekross added a commit that referenced this pull request Oct 28, 2026
L-279 to L-293: the 9a's slot B hold and what made devinfo writable
(#125), per-device flags checked by building both command lines
(#101), env defaults in the shared build library and CI waiting for
approval (#79), GLib retry paths and radio stops checked at the
controller (#99), silent re-pushes and stacks with several tops (the
tegu stack), and two of our own: merge only after every check has
finished (#126), and an empty diff is checked for empty inputs
(kernel #123).

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

Copy link
Copy Markdown
Owner

Thanks, @W4HO-ham. This is exactly the record I was hoping for, and it changes my mind on point 3: I'd assumed stock only stops at a recovery prompt, and your notes show userdata was already gone by the time it got there. The new entry is clear and honest about what wasn't captured, the link now points at something everyone can read, and the reworded line is the one I'd have written myself: flash only a known-good set, mark B on that boot, then push. I checked the details I could: bin/omamobile runs --set-active=b only in flash, never in push; the source hash you give for omamobile-bootctl.c matches the file on main (unchanged since 10-13); and "three tries" matches your 10-22 table (retry 2 after the first boot, 1 after the second). Policy and tests pass, and the branch merges cleanly with main.

A few things before I merge:

1. Two places still say stock "stops in recovery". device/tegu/MODEM-PLAN.md on main (the "Correction (2026-10-27, night)" bullet, around line 514) still says stock "can't mount its data and stops in recovery", and it cites "HANDOFF", which isn't in the repository. Since this PR is where the record lives, could you update that bullet here: stock overwrites userdata and then stops in recovery, linked to your new NOTES section instead of HANDOFF? #100 says the same thing in two new lines, and I've asked for those there.

2. What did the 10-26 boot run? The entry says the failing boot was "the Google-kernel RAM comparison". Nothing in tegu's notes describes that boot, and it matters for the cause. Was Google's kernel written to slot B with our initramfs (storage guard, USB safety net), or with stock's vendor ramdisk? If stock's first-stage init ran on slot B, it could have touched userdata itself before the fallback, and 10-26 wouldn't show what stock on slot A does. Please add a sentence on which images that boot used and how they were written (flash, or fastboot boot from RAM). Please also mark "stock's first stage had written over the start of userdata" as an inference ([I], the file's own convention), since nobody saw stock's boot. If 10-26 stays uncertain, 10-28 still carries the rule (our guarded initramfs, then stock), and the AGENTS line can say "on 10-28, and most likely on 10-26".

3. A few facts the entry implies but doesn't state:

  • On 10-28, slot B wasn't marked between the morning flash and the fallback, so every push round ran unmarked. That's the exact situation the rule prevents, so please say it outright. What was the morning flash recovering from?
  • On 10-26, how was slot B made active again after the fallback (flash?), and how was the recovery image written to userdata?
  • Your 10-26 "before" bytes have 00 at 0x34, so B was on its last try when it was marked. One more unmarked reboot would have fallen back again. That's worth a sentence: it shows how little room the three tries leave.
  • Was the watchdog armed for the 10-26 and 10-28 markings? The 10-22 record and the new AGENTS line both list it, but the harness steps in the entry don't.

4. The marking itself. Thanks for the full account. Both markings were fine: they're the operation I approved on #24, under its written conditions (the same tool, a fresh backup checked against live storage, one bit at 0x35, the bytes recorded), and I'm happy with how you did them. What I want to settle before the next one is the laptop script around the tool, which makes devinfo and its parent writable for 30 s. That's the part AGENTS §1 otherwise forbids, and running the bare tool by hand would mean a hand-typed blockdev --setrw, which is worse. So please don't mark B again until I've decided how marking works from here, and please don't put the script in this PR. B is marked now, and push leaves it marked, so in the meantime please use push only. If something forces a flash (which unmarks B), ask me first, so we can agree the marking before that boot rather than after it. I'll come back to you on that; the boot-success marker for tegu's package I mentioned is one option. Two small wording changes in the AGENTS line meanwhile, so an agent can't read it as standing permission: add "ask the human first" before the marking, and link the approved section directly (device/tegu/NOTES.md#approved-b-success-operation-after-layout-review-2026-10-22).

Merge order: this PR and #100 both add a section at the top of device/tegu/NOTES.md, so whichever lands second needs a rebase. The resolution is to keep both sections. I'd like to merge this one first, so #100 can link your entry.

Thanks again for turning a bad day into a rule the next 9a owner can follow.

derekross added a commit that referenced this pull request Oct 28, 2026
…wenty-sixth rounds (#127)

* docs/review: 19 lessons and 3 corrections from the twenty-fifth round

The confirmed candidates from round 25 (L-260 to L-278): the 9a slot B
marking as a devinfo question, cross-repository links, squash-merged
stacks and version files, stale hand-built prebuilts, and before-merge
Pixel 7 Pro runs on omamobile-int. C-16 to C-18 correct our own earlier
comments on kernel #98, kernel #80 and #74; L-241 is corrected in place.

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

* docs/review: 15 lessons from the twenty-sixth round

L-279 to L-293: the 9a's slot B hold and what made devinfo writable
(#125), per-device flags checked by building both command lines
(#101), env defaults in the shared build library and CI waiting for
approval (#79), GLib retry paths and radio stops checked at the
controller (#99), silent re-pushes and stacks with several tops (the
tegu stack), and two of our own: merge only after every check has
finished (#126), and an empty diff is checked for empty inputs
(kernel #123).

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

---------

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

Copy link
Copy Markdown
Contributor Author

Done in bb5acda:

  1. The MODEM-PLAN correction now says stock overwrites userdata before it reaches recovery, and links the NOTES entry instead of HANDOFF. I'll fix device/tegu, DEVICES, AGENTS: the 9a on 2026-10-27 and 10-28 #100's two lines when I rebase it after this merges.
  2. 10-26: the failing boot was Google's own kernel (6.1.134-android14-11-g2bae8aca899a-ab13800907), written to slot B by omamobile flash. It ran with a RAM-only filesystem assembled from our initramfs files, with PID 1 replaced by a static supervisor that opens no block device. So stock's first stage never ran on slot B. The overwrite is now marked [I], and the AGENTS line says "on 10-28, and most likely on 10-26".
  3. The facts you asked for:
    • 10-28: the morning flash was recovering from a test boot of kernel flame 0.1.0: hooks for shell 0.2.24 and firstboot 0.1.3 #55's head that hung on the Google logo. B wasn't marked after it, so every push round ran unmarked, and the entry says so.
    • 10-26: slot B came back by flash of the last good five images. The recovery image was streamed over USB SSH into userdata from our initramfs, with a readback hash and a read-only e2fsck.
    • B's last-try state at the 10-26 marking (0x34 00) has its own sentence.
    • The watchdog was systemd's 10 s runtime watchdog, running throughout. The script armed nothing beyond it.
  4. Agreed: no marking until you decide how it works, no script in this PR, push only from here, and I'll ask you before anything that needs a flash. The AGENTS line now says "after asking the human first" and links the approved section directly.

@derekross

Copy link
Copy Markdown
Owner

Thanks, @W4HO-ham, for working through all of that so quickly. I checked each point against bb5acda:

  1. "Stops in recovery": done. The MODEM-PLAN correction now says stock overwrites userdata before it reaches recovery, and it links your NOTES entry. HANDOFF is gone from tegu's files, and so is every "stops in recovery" on both branches.
  2. The 10-26 boot: done. Google's 6.1 kernel was written by flash, with a RAM-only PID 1 that opens no block device, so stock's first stage never ran on slot B. The overwrite is marked [I], and the AGENTS line says "on 10-28, and most likely on 10-26".
  3. The facts: all four are in. The unmarked push rounds after the morning flash and the kernel flame 0.1.0: hooks for shell 0.2.24 and firstboot 0.1.3 #55 hang behind that flash, the 10-26 recovery (flash of the last good five, then the image streamed from our initramfs with a readback hash and a read-only e2fsck), B on its last try at 0x34 00, and systemd's 10 s runtime watchdog.
  4. The marking: done. The line now says "after asking the human first" and links the approved section directly; the anchor resolves. Thanks for agreeing to the interim plan too: no marking, push only, and asking me before anything that needs a flash. I'll come back to you on how marking works from here.

Policy and tests pass on this head, and it still merges cleanly with main.

One small thing before I merge, and it came from the rewrite. The 10-26 paragraph used to start with our kernel's release, and the 10-28 paragraph still begins "The same kernel, with a new DTB". Now that 10-26 names only Google's 6.1 kernel, "the same kernel" reads as Google's kernel on 10-28 too. 10-28 is the day that carries the rule, because it ran our own kernel and initramfs, so please name the release there (7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, if that's the one) and say it booted our usual initramfs, with the storage guard and the USB safety net. A few words will do.

One optional question, if you remember: on 10-26 Google's kernel ran without our safety net, so what used up B's three tries? Watchdog resets, or restarts by the buttons? It would round off the 10-26 account, but I won't hold the merge for it.

When I merge, I'll write the squash message myself. The default would carry your first commit's text ("stock reformats userdata", "mark B successful on the first good boot after a flash"), and the line you ended up with says something different.

After that, this goes in first and #100 follows.

W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Oct 29, 2026
…was masked

Review: the status says it works on the owner's integration kernel, with LHBM open as derekross/linux-omarchy-mobile#126 and the DSI reads as derekross#125, and the fprintd mask came from the palmtop's private bring-up root. The G3 next step is on the charger.
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Oct 29, 2026
… H5 scripts, the meter rule and rollbacks

The maintainer's review of the runbook: H2 now copies and enables the early read (and H6 removes it), H1 checks the I2C device nodes and that the DTB dead-man is unarmed and disables it, the meter rule covers any reset with the drive attached, and H4 and H5 have rollback lines and a word on pstore. H5 says plainly that no SSH is guaranteed after the drive-for-laptop swap, what can bring the link back, and the forced restart that boots like H3.

The scripts that run while the laptop is out are published next to the early read and started detached with systemd-run: H4's unbinds the charger 20 s after the drive enumerates and logs VBUS and CHG_CNFG_00; H5's resets without a shutdown, and only when the early read is armed and a drive has enumerated. The early read loads i2c-dev itself, since it runs before systemd-modules-load, and waits for the root to be read-write.

The DTB paragraph records the gn3 build's sha256 and that it isn't derekross#127 byte for byte; the node comparison against a derekross#127 build is the open step. "settled on derekross#125" is "being settled".
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Oct 29, 2026
…fter, the code by commit

The runbook stops if slot B isn't marked successful and doesn't mark it (a devinfo write on the 9a, derekross#125). S1 needs the NFC stop-poll hook active or polling stopped by hand, with the kernel's derekross#131 state and the rule that stays, a Rollback line and pstore after a cycle that doesn't come back. S2 snapshots regulator_summary before and diffs it after, stops if more than the four rails changed, records stock's consumers of them (none in its DT: no phandle on any of the four, the GNSS three on the PMIC's channel mux, LDO15S a spare), keeps the modem off in that boot and stays away from a G3 session. The push wording says what bin/omamobile push writes and that only vendor_kernel_boot differs. The module, the bring-up DT and the S2 change are linked by commit on the fork's tegu-sleep-bringup branch, and the CPU_INFORM hints of 10-28 are credited to the bring-up module that wrote them over the PMU SMC. The measurements link derekross#100's NOTES entry.
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Oct 29, 2026
…oot, S1's command and column

S2 says it turns LDO15S off on purpose for one boot against FINGERPRINT-PLAN's rule (that plan gets the matching note once derekross#138 is on main), and step 3 keeps omamobile-fp, the trusted app and storageproxyd stopped before the push and until the rollback, since F6c still writes secure objects. S1 names its command, power-ab with derekross#157's systemd suspend mode (rtcwake -m no plus systemctl suspend, so the NFC hook runs), reads charge_now, column 7, because the 9a's gauge has no charge_counter, and waits for derekross#157. Also: derekross#125's rules are being settled; the four rails read disabled with or without the unused-rail cleanup; stock's source grepped for the four rail names (DT sources and the register header only, no module asks by name); a Polling read before each run; nothing starts the modem at boot, so nothing to mask.
@derekross

Copy link
Copy Markdown
Owner

A gentle ping on my 00:53Z ask, since #100, #131 and #136 all wait on this one: in the 10-28 paragraph of NOTES (around line 46), could you replace "The same kernel" with the kernel release that boot ran (uname -r) and say which initramfs it used (ours from bin/omamobile initramfs, or your own)? I'd rather you confirm the release than guess it from your other entries. Once that's in, #125 merges and the three behind it follow.

derekross pushed a commit that referenced this pull request Oct 29, 2026
* device/tegu: SLEEP-PLAN, an audit of the s2idle drain

The 9a sleeps and wakes, but its drain is high. This audits why from stock's device tree and a snapshot of the palmtop: no cluster or SICD idle states, the GNSS and fingerprint rails always on in the bring-up DTB, and MIF, with a measurement runbook.

* device/tegu SLEEP-PLAN: the firmware's PSCI has no OS-initiated mode

So cluster states on zumapro would be platform-coordinated, with a composite StateID; and the core state's rejection rate, read from cpuidle.

* device/tegu SLEEP-PLAN: start from what's measured

The cable-out s2idle figure (about 140 mA), MIF in sleep (about 57 mA saved), and the cluster power-down tries of 10-28 (cluster 0 hangs; clusters 1-2 save nothing measurable) were already measured; the candidates are re-ranked on them.

* device/tegu SLEEP-PLAN: S2's image, its expectation and rollback

* device/tegu SLEEP-PLAN: the review's preconditions, S2's before and after, the code by commit

The runbook stops if slot B isn't marked successful and doesn't mark it (a devinfo write on the 9a, #125). S1 needs the NFC stop-poll hook active or polling stopped by hand, with the kernel's #131 state and the rule that stays, a Rollback line and pstore after a cycle that doesn't come back. S2 snapshots regulator_summary before and diffs it after, stops if more than the four rails changed, records stock's consumers of them (none in its DT: no phandle on any of the four, the GNSS three on the PMIC's channel mux, LDO15S a spare), keeps the modem off in that boot and stays away from a G3 session. The push wording says what bin/omamobile push writes and that only vendor_kernel_boot differs. The module, the bring-up DT and the S2 change are linked by commit on the fork's tegu-sleep-bringup branch, and the CPU_INFORM hints of 10-28 are credited to the bring-up module that wrote them over the PMU SMC. The measurements link #100's NOTES entry.

* device/tegu SLEEP-PLAN: the fingerprint stack stays stopped in S2's boot, S1's command and column

S2 says it turns LDO15S off on purpose for one boot against FINGERPRINT-PLAN's rule (that plan gets the matching note once #138 is on main), and step 3 keeps omamobile-fp, the trusted app and storageproxyd stopped before the push and until the rollback, since F6c still writes secure objects. S1 names its command, power-ab with #157's systemd suspend mode (rtcwake -m no plus systemctl suspend, so the NFC hook runs), reads charge_now, column 7, because the 9a's gauge has no charge_counter, and waits for #157. Also: #125's rules are being settled; the four rails read disabled with or without the unused-rail cleanup; stock's source grepped for the four rail names (DT sources and the register header only, no module asks by name); a Polling read before each run; nothing starts the modem at boot, so nothing to mask.
…he initramfs

"The same kernel" is now the release string the day's run kit records, with the note that it names the tree rather than one build, and the initramfs that boot used: ours, packed by the kit.
@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Sorry for the wait on that one; it's in at 6890213. The 10-28 paragraph now names the release that boot ran, 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, taken from the day's run-kit record rather than my other entries, with the honest caveat that the string stays the same across that tree's builds (LOCALVERSION is fixed), so it names the tree; and the initramfs was ours, bin/omamobile initramfs with initramfs/init, packed by the kit (INITRAMFS_INIT=/initramfs/init in its device.conf). #100, #131 and #136 can follow as you planned.

@derekross

Copy link
Copy Markdown
Owner

Thanks, @W4HO-ham, and no need to apologise. The 10-28 paragraph now names 7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty from the day's run-kit record, and says the initramfs was ours (bin/omamobile initramfs, initramfs/init). Thanks also for saying plainly that the fixed LOCALVERSION means the string names the tree rather than one build. That's exactly what I asked for, and nothing else in the section still says "the same kernel". I went back through the whole thread, and every point from my three earlier comments is in. Policy and tests pass on 6890213, and it merges cleanly with main.

Before I merge, there's one sentence I want to change, and it's my own earlier wording I'm revisiting, not something you missed. Marking slot B is on hold until I've decided how it should work. The AGENTS line still presents the marking as the step after a flash ("after asking the human first, mark B with the one approved devinfo write …"). The hold only lives in this thread, though, and for another 9a owner reading AGENTS, "the human" is themselves. The conditions the line lists also leave out the part that's on hold: what makes devinfo writable. So I'd like the line to say what we agreed here: ask before any flash, use push only, and don't mark B for now. I'd replace the sentence from "So:" up to the links with:

So: flash only a known-good image set, and on the 9a ask the maintainer before any flash, because it unmarks B. Marking B successful is a devinfo write, and on the 9a it is on hold until the maintainer decides how it's done: don't mark B, and don't run omamobile-bootctl or anything that makes devinfo writable. With B marked, try new images with push, which doesn't call --set-active and leaves the mark alone; ABL then no longer falls back, so a broken pushed image means fastboot by the buttons. With B unmarked, every boot spends one of the three tries: keep reboots few and don't test new images.

The two links stay, with the second one labelled "the operation approved on 2026-10-22, now on hold". When I come back with a decision on marking, the line changes again with it.

While I'm in there, one word in NOTES: "Marking B both days was the approved operation above". That section is below the new entry now, so "above" should be "below".

Since you've allowed maintainer edits, I'll push both changes to your branch myself and merge, unless you'd rather make them. If you do, just say so here. I'll write the squash message myself, as I said, so your first commit's wording doesn't land. Then #100, #131 and #136 follow in that order.

@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Please push both changes yourself and merge; your wording for the AGENTS line says what we agreed, and "below" is right for the NOTES section now. Thanks.

W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Oct 30, 2026
…nterrupt only, with its way back

From Derek's review of 2198e47. The H2b overlay no longer gives the boost its enable line: SGPIO7 is the RT9470's charge enable, and driving it with nothing managing the charger could start it charging beside the MAX77779; that line stays with kernel derekross#127, which must clear CHG_EN before taking it. H2b now reads the boost's FUNCTION and ICSTAT after the modprobe, as the H4 script does, and stops if ICSTAT shows charging. Its rollback says what to do when SSH doesn't come back after a forced restart: fastboot by the buttons and stop, no flash without Derek (derekross#125), so the step is risk medium; the header and the DTB paragraph say that H2b's push writes slot B's images through the normal path. The status line says H2b boots gn3 plus the overlay, step 1 is marked done by H2, the H5 script traps TERM so the swap timer's reboot disarms the early read too, the overlay's header says bring-up only, and the watchdog sentences record the reworked boost driver (6c5d97e18) as the follow-up asked for on derekross#131.
derekross and others added 2 commits October 30, 2026 08:39
…efore a flash

The AGENTS line presented the devinfo marking as the step after a flash.
The hold agreed in derekross#125 lived only in the thread, so say it in the line,
and label the approved operation as on hold. NOTES: the approved section
is now below the new entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	device/tegu/NOTES.md
@derekross
derekross merged commit 047eff9 into derekross:main Oct 30, 2026
2 checks passed
derekross pushed a commit that referenced this pull request Oct 30, 2026
Pixel 9a records from 2026-10-27 and 2026-10-28 in tegu NOTES: cameras,
NFC, USB-C, storage power, fingerprint and drain on 10-27; camera
switching, pstore, idle hints and sleep memory rate on 10-28; and what the
device table's claims rest on. MODEM-PLAN, AGENTS and the DEVICES row
follow those records.

NOTES keeps newest first: the 10-29 section, then the slot A fallbacks
from #125, then these three.

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

Copy link
Copy Markdown
Owner

Thanks, @W4HO-ham. I've pushed the AGENTS sentence we agreed (marking B on hold, push only, ask before any flash) and "below" in NOTES, and merged. main had moved under the branch last night (#153 added a 10-29 section at the top of tegu's NOTES), so I kept that section first and yours right after it. I'll come back to you on how marking works from here; until then, please keep to push.

derekross pushed a commit that referenced this pull request Nov 2, 2026
…ing (#307)

The 9a's row after today's merges, with a NOTES entry for the evening's boots that the new cells link to.

- **Wi-Fi, testing to works.** `omamobile-device-tegu` 0.2.4 (#238) starts it at boot now, through the shared gs201 host and zuma PHY (kernel #178 on #156, both in review) and brcmfmac (kernel #56, in review), with only the extractor's firmware. The NOTES entry has the boot, and the three rebinds with Bluetooth up after #178's FLR commit. The kernel parts are still in review, and the cell says so, as the display cells did.
- **Suspend, WIP to testing.** The power key now lights the lock screen on the first press (#268, #275). Thirty attended sleeps and a day of real use with auto-sleep on all woke (SLEEP-PLAN, #284). The cell still says that three test sleeps on 10-28 to 10-30 never woke and that sleep tests stay attended. If you'd rather keep WIP until that hang is understood, I'll revert just the word.
- **Display:** the display DT is merged, and brightness, DPMS off and on and the 60/120 Hz switch now have a dated record (kernel #125's boot, which also checks the panel ID).
- **Charging, Haptics, Torch, NFC:** kernel #161, #96, #104 and #105 are merged.
- **USB net:** the rescue also handles a replug the gadget didn't see (#280).

The NOTES entry lists each boot with its release: Wi-Fi from the package, the power-key wake, the replug, storage idle (kernel #99), the panel ID (kernel #125), the RTC without the PMIC interrupt (kernel #55), and the auto-sleep day. GNSS and Modem stay as they are until the SIM test on Tuesday. Docs only; `tools/pr-check` passes, and the diff has no identifiers.

Closes #307

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
* device/tegu: SLEEP-PLAN, an audit of the s2idle drain

The 9a sleeps and wakes, but its drain is high. This audits why from stock's device tree and a snapshot of the palmtop: no cluster or SICD idle states, the GNSS and fingerprint rails always on in the bring-up DTB, and MIF, with a measurement runbook.

* device/tegu SLEEP-PLAN: the firmware's PSCI has no OS-initiated mode

So cluster states on zumapro would be platform-coordinated, with a composite StateID; and the core state's rejection rate, read from cpuidle.

* device/tegu SLEEP-PLAN: start from what's measured

The cable-out s2idle figure (about 140 mA), MIF in sleep (about 57 mA saved), and the cluster power-down tries of 10-28 (cluster 0 hangs; clusters 1-2 save nothing measurable) were already measured; the candidates are re-ranked on them.

* device/tegu SLEEP-PLAN: S2's image, its expectation and rollback

* device/tegu SLEEP-PLAN: the review's preconditions, S2's before and after, the code by commit

The runbook stops if slot B isn't marked successful and doesn't mark it (a devinfo write on the 9a, derekross#125). S1 needs the NFC stop-poll hook active or polling stopped by hand, with the kernel's derekross#131 state and the rule that stays, a Rollback line and pstore after a cycle that doesn't come back. S2 snapshots regulator_summary before and diffs it after, stops if more than the four rails changed, records stock's consumers of them (none in its DT: no phandle on any of the four, the GNSS three on the PMIC's channel mux, LDO15S a spare), keeps the modem off in that boot and stays away from a G3 session. The push wording says what bin/omamobile push writes and that only vendor_kernel_boot differs. The module, the bring-up DT and the S2 change are linked by commit on the fork's tegu-sleep-bringup branch, and the CPU_INFORM hints of 10-28 are credited to the bring-up module that wrote them over the PMU SMC. The measurements link derekross#100's NOTES entry.

* device/tegu SLEEP-PLAN: the fingerprint stack stays stopped in S2's boot, S1's command and column

S2 says it turns LDO15S off on purpose for one boot against FINGERPRINT-PLAN's rule (that plan gets the matching note once derekross#138 is on main), and step 3 keeps omamobile-fp, the trusted app and storageproxyd stopped before the push and until the rollback, since F6c still writes secure objects. S1 names its command, power-ab with derekross#157's systemd suspend mode (rtcwake -m no plus systemctl suspend, so the NFC hook runs), reads charge_now, column 7, because the 9a's gauge has no charge_counter, and waits for derekross#157. Also: derekross#125's rules are being settled; the four rails read disabled with or without the unused-rail cleanup; stock's source grepped for the four rail names (DT sources and the register header only, no module asks by name); a Polling read before each run; nothing starts the modem at boot, so nothing to mask.
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…oot (derekross#125)

On 2026-10-28, and most likely on 2026-10-26, the Pixel 9a fell back to
stock on slot A after slot B, unmarked, used its three ABL tries, and stock
overwrote userdata before recovery could offer anything. tegu NOTES records
both days: what each boot ran, how B was recovered and marked, and the
bytes the approved devinfo write changed.

AGENTS gains the rule: flash only a known-good set and ask the maintainer
before any flash on the 9a; marking B is on hold until the maintainer
decides how it's done; with B marked, try new images with push only. The
MODEM-PLAN correction now says stock overwrites userdata before recovery
and links the NOTES entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…ss#100)

Pixel 9a records from 2026-10-27 and 2026-10-28 in tegu NOTES: cameras,
NFC, USB-C, storage power, fingerprint and drain on 10-27; camera
switching, pstore, idle hints and sleep memory rate on 10-28; and what the
device table's claims rest on. MODEM-PLAN, AGENTS and the DEVICES row
follow those records.

NOTES keeps newest first: the 10-29 section, then the slot A fallbacks
from derekross#125, then these three.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…ing (derekross#307)

The 9a's row after today's merges, with a NOTES entry for the evening's boots that the new cells link to.

- **Wi-Fi, testing to works.** `omamobile-device-tegu` 0.2.4 (derekross#238) starts it at boot now, through the shared gs201 host and zuma PHY (kernel derekross#178 on derekross#156, both in review) and brcmfmac (kernel derekross#56, in review), with only the extractor's firmware. The NOTES entry has the boot, and the three rebinds with Bluetooth up after derekross#178's FLR commit. The kernel parts are still in review, and the cell says so, as the display cells did.
- **Suspend, WIP to testing.** The power key now lights the lock screen on the first press (derekross#268, derekross#275). Thirty attended sleeps and a day of real use with auto-sleep on all woke (SLEEP-PLAN, derekross#284). The cell still says that three test sleeps on 10-28 to 10-30 never woke and that sleep tests stay attended. If you'd rather keep WIP until that hang is understood, I'll revert just the word.
- **Display:** the display DT is merged, and brightness, DPMS off and on and the 60/120 Hz switch now have a dated record (kernel derekross#125's boot, which also checks the panel ID).
- **Charging, Haptics, Torch, NFC:** kernel derekross#161, derekross#96, derekross#104 and derekross#105 are merged.
- **USB net:** the rescue also handles a replug the gadget didn't see (derekross#280).

The NOTES entry lists each boot with its release: Wi-Fi from the package, the power-key wake, the replug, storage idle (kernel derekross#99), the panel ID (kernel derekross#125), the RTC without the PMIC interrupt (kernel derekross#55), and the auto-sleep day. GNSS and Modem stay as they are until the SIM test on Tuesday. Docs only; `tools/pr-check` passes, and the diff has no identifiers.

Closes derekross#307

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