Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ Each entry gives the gotcha, then the reason or the fix. Details are in the link
- **ABL ignores the `vendor_boot` cmdline:** put kernel arguments in `/chosen/bootargs`. ABL appends `console=null`, so a panic is invisible: use `panic=10`. [BRINGUP-M1](device/cheetah/BRINGUP-M1.md)
- **ABL leaves both cluster watchdogs running:** the phone resets at about 60 s of uptime unless `s3c2410_wdt` takes them over at probe.
- **ABL picks the base DTB by `soc_id`:** `bin/omamobile images` ships both silicon revisions. It also needs an empty `/ect` node and `/chosen/bootargs`, and applies a DPM overlay that needs label stubs (build with `-@`).
- **Pixel 9a: a fallback to slot A costs the Linux root.** `fastboot --set-active=b` (which `bin/omamobile flash` runs) clears B's successful flag and gives B three ABL tries; every boot uses one, and the initramfs USB safety net (no USB host in about 65 s: panic) uses them fast. At zero ABL boots stock on slot A, and stock overwrote `userdata` on 10-28, and most likely on 10-26, before anyone could choose anything in recovery. 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. [tegu NOTES](device/tegu/NOTES.md#2026-10-26-and-2026-10-28-slot-a-fallbacks-that-cost-userdata); the operation approved on 2026-10-22, now on hold: [NOTES](device/tegu/NOTES.md#approved-b-success-operation-after-layout-review-2026-10-22).
- **`reboot -f` and busybox `reboot` hang:** use `reboot-to <reason>` (`LINUX_REBOOT_CMD_RESTART2`). ABL often ignores the `bootloader` reason anyway.
- **Reserved memory on gs201 is `#address-cells = <2>`, `#size-cells = <1>`,** so each `reg`/`alloc-ranges` entry is 12 bytes. A 16-byte value is silently ignored, and the pool lands anywhere. The display pool's `alignment` must be two cells too, or `of_reserved_mem` rejects it. `/proc/device-tree` shows the raw property, so it *looks* right. [WIFI-BATTERY-PLAN](device/cheetah/WIFI-BATTERY-PLAN.md) 9.x, [NOTES](device/cheetah/NOTES.md)
- **Check every stock `reserved-memory` region against `/proc/iomem`:** five were plain System RAM in our kernel, and firmware writes into them at runtime.
Expand Down
7 changes: 4 additions & 3 deletions device/tegu/MODEM-PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,10 @@ startNmea 25; callbacks location 4, NMEA 5).
POWER_OFF), Kepler still faulted on engine start; after six faults gnssd
gave up ("chppPlatformNotifierWait in STATE_PERMANENT_FAILURE").
- Correction (2026-10-27, night): a stock reference can't come from this
palmtop. Arch is on `userdata`, so stock Android on slot A can't mount its
data and stops in recovery (HANDOFF, 10-26 slot A fallback). It needs a
second 9a, or a factory reset and a reinstall. Was: boot slot A once with
palmtop. Arch is on `userdata`, and stock Android on slot A overwrites
`userdata` before it reaches recovery
([NOTES, 2026-10-26 and 2026-10-28](NOTES.md#2026-10-26-and-2026-10-28-slot-a-fallbacks-that-cost-userdata)),
so booting it loses the Linux root. It needs a second 9a. Was: boot slot A once with
root and capture `logcat -b all` and dmesg while an app gets a fix (gnssd, the HAL, CPIF's gnss
lines, the timemark device it opens), then compare; or decode the fault
dump. Then the NMEA FIFO into omamobile-gnss-nmea, as cheetah.
Expand Down
82 changes: 82 additions & 0 deletions device/tegu/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,88 @@ resets) and are in [MODEM-PLAN](MODEM-PLAN.md) under "G3, twenty-fourth to
thirty-fourth tries" and "The CP link hang". Not a GNSS matter: if a boot
with nothing but Bluetooth starting resets again at that time, start here.

## 2026-10-26 and 2026-10-28: slot A fallbacks that cost userdata

Both times slot B was active but **not marked successful**, so each boot
used up one ABL retry. After `fastboot --set-active=b` the 9a's ABL gives
B **three** tries (10-28: retry 3 after the flash, 1 after two boots, from
the devinfo dumps below). A boot that never reaches the USB host is crashed
by the initramfs safety net about 65 s in, so a bad image uses up the tries
within minutes, and ABL then boots stock on slot A.

**2026-10-26.** The failing boot was a comparison run of Google's own
kernel (`6.1.134-android14-11-g2bae8aca899a-ab13800907`), written to slot B
by `omamobile flash` (so `--set-active=b`). 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. Stock's own first stage didn't
run on slot B. It never brought up USB.
Fastboot (buttons) then showed A selected and B at retry 0. Stock's own
boot wasn't captured. Afterwards `userdata`'s ext4 and F2FS magics were
gone, with non-zero data in their place, `e2fsck -fn` failed, and `persist`
had changed. [I] Stock on slot A wrote over the start of `userdata`; nobody
saw its boot. At 16:35 MST the palmtop sat in stock recovery (USB 18d1:4ee7,
sideload-only adbd: every adb command answered `error: closed`). Nobody
chose anything in recovery. A fresh read-only backup of efs, efs_backup,
modem_userdata, persist, modem_a/b, devinfo and metadata was taken
(off-repo). Slot B came back by `omamobile flash` of the last good five
images (which set it active again). The root came back by streaming the
verified 10-25 recovery image over USB SSH into `userdata` from our
initramfs, with a readback hash and a read-only `e2fsck`. B was then on its
last try (byte 0x34 `00` in the "before" row below): one more unmarked
reboot would have fallen back again.

**2026-10-28.** Kernel `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty`
(the release the day's run kit records; the string stays the same across
that tree's builds, so it names the tree, not one build) with our initramfs
(`bin/omamobile initramfs`, `initramfs/init`, packed by the kit), and a new
DTB (the TCPC as a dual-role port with a link to dwc3's role switch). In the morning, slot B was
written by `omamobile flash`, recovering from a test boot of kernel #55's
head that hung on the Google logo, and it was **not marked** afterwards.
Every `push` round after that ran unmarked, so the tries ran out on the
first round that failed. That's the situation the rule is there to prevent. The DTB round lost USB on its boot (`push`: "no SSH after
reboot"), and a few minutes later the palmtop was on stock. adb answered
`error: closed` again, the same sideload-only adbd as 10-26. The owner
doesn't remember what the screen showed, and nobody tapped anything.
Afterwards `userdata` read as non-zero data with no filesystem magic (the
first 64 KiB looks random), and the root wouldn't mount. Fastboot by the
buttons, `omamobile flash` of the last good images, the 10-25 recovery
image streamed to `userdata` and read back against its sha256, then a boot.
Fresh read-only backup of the same eight partitions, taken before the boot:
efs, efs_backup, modem_userdata, persist, devinfo and metadata differed
from the 10-26 backup, modem_a/b didn't. `fastboot getvar slot-*` wasn't
captured either day, apart from `current-slot: a` on 10-28.

So stock doesn't just stop at a recovery prompt: on both days `userdata`
was overwritten before anyone could choose anything. Treat a fallback to
slot A as losing the Linux root.

**Marking B both days** was the approved operation below, `omamobile-bootctl
mark-successful` for B. The binary was built statically from
`packages/omamobile-device-cheetah/src/omamobile-bootctl.c` (source sha256
`89d03460…`, binary `f44936d5…`), driven by a laptop script that:

1. reads a fresh full `devinfo` snapshot and checks its sha256 against live
storage right before the write;
2. runs the tool's dry run, which must plan exactly one byte;
3. arms a 30 s timed read-only restore, writes, reads back all 8192 bytes
against the predicted image, and checks the read-only flags over a fresh
SSH login.

systemd's 10 s runtime watchdog was running throughout (the bring-up checks
for it). The script didn't arm anything beyond that.

The laptop keeps the command log. The 10-28 harness copy differed from the
10-26 one only in its baseline paths (slot A's bytes are read live).

| Moment | Bytes 0x30–0x37 |
| --- | --- |
| 10-26, before | `02 1a 00 00 00 14 00 00` |
| 10-26, after | `02 1a 00 00 00 16 00 00` |
| 10-28, before | `02 1a 00 00 01 14 00 00` |
| 10-28, after | `02 1a 00 00 01 16 00 00` |

Only byte 0x35 changed (bit 0x02), and slot A was untouched.

## 2026-10-26: audio (speakers, microphones, A2DP) with omamobile-audio 0.5.0

Kernel `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty`: the private
Expand Down