Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
7900f07
omamobile-device-tegu 0.2.10: start the modem and phone service at bo…
W4HO-ham Nov 3, 2026
48e5d18
omamobile-device-tegu 0.2.11: run the modem profile's check after the…
W4HO-ham Nov 3, 2026
9917441
omamobile-device-tegu 0.2.12, omamobile-modem-sit 0.3.24: keep the mo…
W4HO-ham Nov 3, 2026
23e0e0a
omamobile-device-tegu: queue sitd and the bridge at boot, and DEVICES…
W4HO-ham Nov 3, 2026
60309ef
omamobile-device-tegu: a deliberate restart after ONLINE doesn't cost…
W4HO-ham Nov 3, 2026
1fc8e5f
omamobile-device-tegu: start gnssd with the modem at boot, for Omarch…
W4HO-ham Nov 3, 2026
487ba3f
device/tegu TELEPHONY-PLAN: the boot start's first record (2.7)
W4HO-ham Nov 3, 2026
c097503
device/tegu TELEPHONY-PLAN: section 2's items 2 to 6 read as sentence…
W4HO-ham Nov 3, 2026
3613779
omamobile-device-tegu: a reboot with the modem up clears its latch
W4HO-ham Nov 3, 2026
3fb65a6
DEVICES, TELEPHONY-PLAN, omamobile-device-tegu: the 9a's modem and GN…
W4HO-ham Nov 3, 2026
1320bcf
device/tegu TELEPHONY-PLAN, omamobile-device-tegu README: the NV chec…
W4HO-ham Nov 4, 2026
926fec5
omamobile-device-tegu, device/tegu TELEPHONY-PLAN: a reboot-to clears…
W4HO-ham Nov 6, 2026
66fbbf6
omamobile-device-tegu: one unclean end with the modem up doesn't cost…
Nov 8, 2026
d12b411
omamobile-device-tegu 0.2.13, omamobile-modem 0.1.17: the latch goes …
W4HO-ham Nov 9, 2026
32361f7
device/tegu TELEPHONY-PLAN: the stop witness's shutdown test (2.7 ste…
W4HO-ham Nov 9, 2026
fb455a7
device/tegu TELEPHONY-PLAN: step 7's re-run on a kernel with the mode…
W4HO-ham Nov 9, 2026
6b12900
omamobile-modem, omamobile-device-tegu README: the stop's result is t…
W4HO-ham Nov 9, 2026
9c4f02c
Merge main; omamobile-modem 0.1.18, omamobile-modem-sit 0.3.34
W4HO-ham Nov 10, 2026
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
2 changes: 1 addition & 1 deletion device/tegu/MODEM-PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -1782,7 +1782,7 @@ Preconditions, as SLEEP-PLAN's:

| Piece | State | What it means here |
| --- | --- | --- |
| Modem to ONLINE | `/usr/local/bin/omamobile-tegu-modem-up` (M5, once per boot; refuses a second start; arms the sleep inhibitor `omamobile-tegu-modem-nosleep`; its source is [bringup/omamobile-tegu-modem-up](bringup/omamobile-tegu-modem-up)) | the start is this script, not `omamobile-modem.service`, which is `masked-runtime` on the palmtop; the transient unit's ExecStop (the profile's stop, which powers the CP off) runs at shutdown, so the way to stop the modem is an attended reboot, never a stop by hand |
| Modem to ONLINE | `omamobile-tegu-modem-up` from `omamobile-device-tegu` (#372; before it, a bring-up copy in `/usr/local/bin`): once per boot, refuses a second start and a boot that finds the latch, arms the sleep inhibitor `omamobile-tegu-modem-nosleep`; `omamobile-tegu-modem-boot` runs it at boot when enabled (TELEPHONY-PLAN 2.7) | the start is this script, not `omamobile-modem.service`, which is `masked-runtime` on the palmtop; the transient unit's ExecStop (the profile's stop, which powers the CP off) runs at shutdown, so the way to stop the modem is an attended reboot, never a stop by hand |
| NV safety | `pacman -Q` says `omamobile-modem` 0.1.4, but the profile files under `/usr/lib/omamobile-vendor` were copied by hand from newer trees (the 27th GNSS try ran 0.1.9's watcher; 0.1.4 predates the 9a's chroot support), so `pacman -Qkk omamobile-modem` is not clean; `/etc/omamobile/modem-nv.sha256` from the 2026-10-28 backup; the profile's `check` runs inside the start script | the NV checks live in that profile, so SIM-1 installs the package from main for real and records the version and the profile's sha256; a stock boot since 2026-10-28 would make `check` refuse; then a fresh read-only backup and a new checksum file come first (AGENTS.md §1) |
| The RIL | `omamobile-modem-sit` 0.3.3 installed 2026-10-29 (SIM-1), both units disabled; 0.3.4 (<https://github.com/derekross/omarchy-mobile/pull/156>) reads the CP state on one open file | 0.3.3's watcher opens and closes the boot device about thirty times a minute, and that cycles the CP link on the 9a (the 10-29 hangs); the run uses 0.3.4 (SIM-1). Its unit `Requires=omamobile-modem.service`, which is masked here, so `systemctl start omamobile-sitd` would fail until SIM-2's unit copy removes that requirement (done 2026-10-29) |
| The bridge for apps | `omamobile-mmd` not installed | not part of this test (T2 follows a passing run) |
Expand Down
150 changes: 129 additions & 21 deletions device/tegu/TELEPHONY-PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,39 +82,40 @@ Opt-in and attended at first, with sleep blocked for the boot.
policy. `-dd` is never the install method.
2. **One modem service.** *Partly in #372:* `omamobile-tegu-modem-up` is
packaged, with the explicit CP ONLINE check and an opt-in boot unit, and
#371 replaces the copied sitd unit with device drop-ins. *Target:* the
transient unit. Give it tegu's start (today the bring-up script
`/usr/local/bin/omamobile-tegu-modem-up` and its transient unit) with the
AoC's ordering, and drop the copied `/etc/systemd/system/omamobile-sitd.service`
and the transient-unit workaround. sitd starts only after an explicit
#371 replaces the copied sitd unit with device drop-ins. *Target:* tegu's
start as one modem service with the AoC's ordering, in place of the
transient unit `omamobile-tegu-modem-up` runs the profile in, and no
copied `/etc/systemd/system/omamobile-sitd.service` or transient-unit
workaround on any palmtop. sitd starts only after an explicit
"CP ONLINE" check: a unit being active isn't enough.
3. **Preflight before any hardware access:** *Target.* #372 runs the
profile's own check (NV read-only, unmounted, checksums of its RAM
copies), after the drivers load because it needs CPIF's ports; the
up-front NV-only check and the gaps below are still to do. the kernel, DT, firmware,
private provisioning and board properties present; the six NV and
firmware partitions found by `PARTNAME`, read-only, unmounted and
matching the checksums. Today's profile hashes five RAM copies, doesn't
up-front NV-only check and the gaps below are still to do: the kernel,
DT, firmware, private provisioning and board properties present, and the
six NV and firmware partitions found by `PARTNAME`, read-only, unmounted
and matching the checksums. Today's profile hashes five RAM copies, doesn't
hash `modem_b`, and exempts `persist` from its read-only check: the boot
preflight closes those gaps. A mismatch stops the start; the baseline is
never refreshed automatically.
4. **Two guards:** *Partly in #372:* a boot that has loaded CPIF refuses a
second start, and the latch is written and synced before any driver. *Target:*
keeping it from ONLINE until a clean shutdown. an atomic per-boot "attempted" marker, never cleared in
that boot, and a persistent failure latch written and synced before any
driver loads, kept through the whole phone-service start while this is
being qualified. No automatic CP or sitd restart, module unload, power
second start, and the latch is written and synced before any driver and
kept from ONLINE until the profile's unit stops at a shutdown (its
ExecStopPost, whatever the stop's result). *Target:* an atomic per-boot
"attempted" marker, never cleared in that boot, and the failure latch
kept through the whole phone-service start while this is being
qualified. No automatic CP or sitd restart, module unload, power
cycle or latch clearing.
5. **Sleep:** *Done in #372*, before the drivers and until the reboot. take and confirm the sleep inhibitor before the modem drivers
load, and hold it past sitd and the profile, until shutdown. Keep the
5. **Sleep:** *Done in #372:* the sleep inhibitor is taken and confirmed
before the modem drivers load, and held past sitd and the profile until
the reboot. Keep the
owner's auto-sleep setting as it is; the inhibitor blocks the sleep and
says why. No suspend hook that stops and restarts the modem. Low-battery
actions must not force an unqualified suspend.
6. **Failure stays visible:** *Partly in #372:* the stage is reported and
the latch stays after a failed start, with no retry. *Target:* the shutdown
order through one modem service. the failed stage reported, diagnostics left in
place, no retry. At shutdown, the established order: the phone service's
cleanup, the CP off, then rfsd.
the latch stays after a failed start, with no retry. *Target:*
diagnostics left in place, and the shutdown order through one modem
service: the phone service's cleanup, the CP off, then rfsd.

### 2.7 Enabling the boot start (gated runbook, #372)

Expand All @@ -125,13 +126,120 @@ successful, a kernel with linux-omarchy-mobile#172, an off-repo NV backup.
| --- | --- | --- | --- | --- |
| 1. Read-only / none | `uname -r`; `pacman -Q omamobile-device-tegu omamobile-modem omamobile-modem-sit omamobile-mmd`; `tools/nv-backup --check "$NV_BACKUP"` (laptop); `ls /var/lib/omamobile/modem-bringup-started` | The kernel and packages recorded, NV matches, no latch | NV mismatch, a latch present, B not marked | None |
| 2. Enable / low | `systemctl enable omamobile-tegu-modem-boot` | A wants link, nothing started | Anything starts | `systemctl disable omamobile-tegu-modem-boot` |
| 3. Cold boot / medium (the CP starts at boot, sleep blocked) | Power off, then on; after login: `journalctl -b -u omamobile-tegu-modem-boot`; `omamobile-sit status`; `systemd-inhibit --list`; `tools/phone-smoke` (laptop) | "modem OK: CP ONLINE", sitd running and registered, the inhibitor held, the latch present (it stays until a clean shutdown), phone-smoke clean | No ONLINE, a reset, a UFS or NV error, no inhibitor | `systemctl disable omamobile-tegu-modem-boot`, reboot; after a reset the latch keeps the next boot from starting the modem |
| 3. Cold boot / medium (the CP starts at boot, sleep blocked) | Power off, then on; after login: `journalctl -b -u omamobile-tegu-modem-boot`; `omamobile-sit status`; `systemd-inhibit --list`; `tools/phone-smoke` (laptop) | "modem OK: CP ONLINE", sitd running and registered, the inhibitor held, the latch present (it stays until the profile's unit stops at shutdown, or until the next boot after a `reboot-to`, which clears it from its note), phone-smoke clean | No ONLINE, a reset, a UFS or NV error, no inhibitor | `systemctl disable omamobile-tegu-modem-boot`, reboot; after a reset the latch keeps the next boot from starting the modem |
| 4. Clean shutdown / medium (one UFS handler pass expected on the 7 Pro's pattern) | `systemctl reboot`; after login: `journalctl -b -1 -k \| grep -c ufshcd_err_handler`; `ls /var/lib/omamobile/modem-bringup-started`; `tools/nv-backup --check` | The latch gone (clean stop), the CP up again at this boot, the UFS count recorded, NV matches | The latch still there after a clean reboot, I/O errors, NV mismatch | As step 3 |
| 5. A day's use / low | Calls, texts and data as usual | No reset, no latch left over | A reset or hang | As step 3 |

Record each run here with the date, `uname -r`, the package versions, the
phone-smoke report and the UFS count.

**2026-11-03, the palmtop** (the daily kernel
`7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty`; slot B marked
successful on 2026-10-31 with no fastboot write since; the kernel keeps the
PERIC0 GPIO bus clock critical, as #172
does; on the charger; `omamobile-device-tegu` 0.2.12, `omamobile-modem-sit`
0.3.36 and `omamobile-mmd` 0.1.4 from the pull requests above this one
(#376 to #380), `omamobile-gnss` 0.2.7 from main):

1. Read-only: `tools/nv-backup -d tegu --check` against the 2026-10-28
backup (#407): every NV partition the same. Passed.
2. Enabled `omamobile-tegu-modem-boot`. Passed.
3. `systemctl reboot` with the unit enabled: "modem OK: CP ONLINE", the
phone service and the bridge queued, IMS registered with nothing started
by hand, gnssd running, the latch reading `boot <id>` and `online`, the
inhibitor held. A GNSS session through the Location socket had 133 of 135
GGA sentences fixed (first fix 48 s). Passed.
4. A second `systemctl reboot` with the CP up: the profile's unit stopped
cleanly, the latch was removed and the next boot wrote its own; no
`ufshcd_err_handler` pass in the boot that shut down. Passed.
5. Later the same day (10:03), a `systemctl reboot` with the CP up left the
latch: the CP's power-off in ExecStop ended rfsd before systemd's
SIGINT, the profile's supervisor exited 1 ("CP OFFLINE", then
`Control process exited, status=1`), and the old ExecStopPost removed
the latch only on `SERVICE_RESULT=success`. The next boot (10:33)
refused the modem. Failed; fixed in this pull request's last commit
(ExecStopPost runs `omamobile-tegu-modem-up --stopped`, which removes
this boot's latch after ONLINE whatever the result). Re-run with the
fixed script: modem started and ONLINE, `systemctl reboot` at 10:43
("modem stopped (success): … removed"), the next boot ONLINE on its own,
and a second reboot at 10:47 removed that boot's latch too. Passed.
`tools/nv-backup -d tegu --check` against the same backup after the
day's reboots (these, two kernel pushes and two sysrq reboots after
sleep tests): every NV partition and `metadata` the same, `devinfo`
different, as after any boot-success mark (tegu NOTES, 2026-11-03).
Passed.
6. The `reboot-to` path (#403's `reboot-to` installed): in the evening,
with the CP ONLINE, `reboot-to omamobile`. The next boot logged "the
last boot with the modem up ended with reboot-to:
/var/lib/omamobile/modem-bringup-started removed", started the modem on
its own to "modem OK: CP ONLINE", and left no
`/var/lib/omamobile/deliberate-restart` behind. Passed. Whether the
CP's power-off or UFS logged anything is not observable after a
`reboot-to`: it skips systemd's shutdown, so the kernel's final
shutdown runs after the journal's last write, and the next boot's
`journalctl -b -1` ends before it. The `reboot-to` here was #403's,
built by hand on the palmtop; pacman puts the packaged one back when
#403's `omamobile-device-tegu` lands.
7. The stop witness (2026-11-08, `7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty` build #99, the
owner's sleep-test kernel; `omamobile-device-tegu` 0.2.13 and
`omamobile-modem` 0.1.17 from this branch, built on the palmtop; on the
charger, attended). Three rounds of `systemctl start
omamobile-tegu-modem-boot` (the unit's `--phone --gnss` path, the
bring-up modules), then `systemctl reboot`:
- Round 1: CP ONLINE 8 s after the start; the latch read `boot <id>`,
`invocation <id>`, `online`; sitd and the bridge active. At the reboot
82 s later the unit's stop logged "CP OFFLINE", then "modem stopped
(success, the CP OFFLINE before the daemons went):
/var/lib/omamobile/modem-bringup-started removed", and systemd
"Deactivated successfully": the first shutdown with the CP up whose
result was `success` (the rfsd hold). `journalctl -b -1 -k | grep -c
ufshcd_err_handler` 0, no UFS error on the next boot, no latch.
Passed.
- Round 2: ONLINE 9 s after the start; the carrier's welcome text
arrived in Messages through the bridge; 50 s after ONLINE the palmtop
reset on its own: the bootloader's record in the next boot's ramoops
reads "Reboot reason: 0xcbea - APC Watchdog Early", the console ends
with sitd bringing `rmnet0` up and cpif's AP2CP doorbell line
(`pcie_send_ap2cp_irq`), no panic, no stall report. The latch stayed,
and the two boots after it (one of them a clean `systemctl reboot`)
left it: the design's answer to a reset with the modem up.
- Round 3: the start found the other boot's ONLINE latch, moved it aside
(`modem-bringup-started.unclean-20261108T202217`), and went on to
ONLINE in 9 s (the one retry); 22 s later the same watchdog reset,
the console again ending on cpif's AP2CP doorbell. Two unclean ends
in a row: the latch and its copy now hold the modem off until a human
clears them.

The resets are the known G3-L1 hang, not this branch: the sleep-test
kernel the palmtop ran (#99, built from the integration tree as it
stands) has `zumapro_gpio_peric0` at `CLK_IGNORE_UNUSED`
(`/sys/kernel/debug/clk/zumapro_gpio_peric0/clk_flags`), without
kernel #172's `CLK_IS_CRITICAL`, which the daily Image carries
(`logs/tegu-clkfix-20261101`), and without kernel #150's SPI flush
order (gnssd's CHPP link showed the ACK timeouts of MODEM-PLAN G3).
With the modem's AP2CP lines toggling twice a second under GNSS, that
gate hung the SoC within minutes before #172, and round 1's 82 s were
the luck of the draw. The re-run the same night on #100 (#99 with
kernel #172 and #150, `zumapro_gpio_peric0` reading `CLK_IS_CRITICAL`):
the start first met the hold ("the last two boots with the modem up
ended without a clean stop ..."), the latch and its copy were removed
by hand as the message says, and the next start reached ONLINE in 8 s;
4.5 minutes later, sitd registered and the bridge active, no reset, no
UFS error-handler pass; `systemctl reboot`: "CP OFFLINE", "modem stopped
(success, the CP OFFLINE before the daemons went): ... removed",
"Deactivated successfully", no latch and no UFS error on the next boot.
Passed. (The bootloader's "Reboot reason" line in ramoops keeps the
last abnormal reason across clean reboots; its "power on source" tells
them apart: 0x20 after the watchdog resets, 0x80 after a clean reboot.)

`tools/phone-smoke` on the second boot: every required check ok (boot, the
storage guard, root, kernel health, USB, session), and display, GPU, lock,
touch, buttons, Wi-Fi, Bluetooth, battery, sound card, sensors, cameras and
thermal ok. It flagged a stale bring-up unit in `/etc/systemd/system` from
2026-10-28 (`omamobile-tegu-audio.service`, failing), now moved aside, and
new dmesg lines from NFC (an unknown notification opcode) and CPIF (packets
for a channel nobody has opened); neither came with a fault.

Qualification, attended and on the charger: boot to ONLINE, data and texts;
the inhibitor; NV and UFS unchanged; then shutdown and reboot on their own.
Suspend with the CP on needs its own tests, with NFC polling stopped, and
Expand Down
Loading