Skip to content

reboot-to, omamobile-modem: a deliberate restart doesn't cost the next boot its modem - #403

Merged
derekross merged 14 commits into
derekross:mainfrom
W4HO-ham:reboot-to-deliberate-note
Nov 12, 2026
Merged

derekross merged 14 commits into
derekross:mainfrom
W4HO-ham:reboot-to-deliberate-note

Conversation

@W4HO-ham

@W4HO-ham W4HO-ham commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Part of #390, as proposed and agreed there.

reboot-to restarts at once, so systemd never stops omamobile-modem.service, its --stopped never removes modem-up, and the next boot takes the last one for a hang. Since omamobile-modem 0.1.19 (#634) that boot starts the modem all the same, but it counts as the one unclean end the guard allows: a second reboot-to before a clean stop holds the modem off until --retry. bin/omamobile push ends in reboot-to.

  • reboot-to (every device package's copy, kept identical to cheetah's) writes the boot ID it ends to /var/lib/omamobile/deliberate-restart before rebooting, through a temporary file, fsync and a synced rename. It's best effort: in the initramfs, where that folder doesn't exist, there's no note and nothing changes.
  • omamobile-modem-start doesn't count a modem-up marker that comes from the boot the note names: it removes the marker and the note, and starts. An unclean end already counted stays counted, as in the 9a's starter: the note keeps a push from being counted but doesn't end a streak, so a hang, a push and a second hang are held. A hang or a reset leaves no note, so it is still counted, and held at the second in a row. A note naming another boot clears nothing. The bring-up marker (a start that never reached ONLINE) isn't touched by the note.
  • AGENTS.md: the stop-the-modem-before-a-push rule says what the note changes. The rule stands, since the CP's ordered power-off and the NV capture still come only from the unit's stop.

The 9a's own start (#372, merged) checks the same note.

Tests: omamobile-modem's test/all (a note for the marker's boot clears the marker, isn't reported as a hang and keeps a counted copy, so a hang after it is held; a note from another boot leaves the first unclean end counted and the second held), every copy compiled with -Wall -Wextra -Werror, cheetah's copy linked the way bin/omamobile initramfs links it for a phone without bootctl (musl, no compiler builtins; reboot-to.c has no printf-family call, and device-cheetah's test holds it to that), the note function run on its own against a scratch folder (it writes this boot's ID), tests/packages, and tools/pr-check. Not yet run on a phone: robotosaith offered to run it on raven (a clean reboot, reboot-to, and a forced restart that should still be counted).

Versions are one above main for each touched package (omamobile-modem 0.1.21); they are the maintainer's to set at merge.

The inhibitor that outlives a failed start, robotosaith's second point on #390, is left for a separate small fix.

W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 3, 2026
… the next boot its modem

reboot-to (and so bin/omamobile push) skips the clean stop that removes the latch, so the next boot refused the modem as if the last one had hung (derekross#390). The latch now names its boot and records ONLINE, and a latch from a boot that reached ONLINE and ended with reboot-to (its note, derekross#403) is cleared with the note. A start that never reached ONLINE, or a note for another boot, still refuses.
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 3, 2026
… the next boot its modem

reboot-to (and so bin/omamobile push) skips the clean stop that removes the latch, so the next boot refused the modem as if the last one had hung (derekross#390). The latch now names its boot and records ONLINE, and a latch from a boot that reached ONLINE and ended with reboot-to (its note, derekross#403) is cleared with the note. A start that never reached ONLINE, or a note for another boot, still refuses.
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 3, 2026
… the next boot its modem

reboot-to (and so bin/omamobile push) skips the clean stop that removes the latch, so the next boot refused the modem as if the last one had hung (derekross#390). The latch now names its boot and records ONLINE, and a latch from a boot that reached ONLINE and ended with reboot-to (its note, derekross#403) is cleared with the note. A start that never reached ONLINE, or a note for another boot, still refuses.
@W4HO-ham
W4HO-ham force-pushed the reboot-to-deliberate-note branch from 3acd4c3 to 31280c9 Compare November 3, 2026 16:02
@W4HO-ham

W4HO-ham commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main after #398. The start script's new one-retry handling stays as it is; reboot-to's note now counts as a clean stop, so it removes the modem-up marker, its refused copies and the note, then the start goes on. A note from another boot changes nothing. The test runs both cases in their own folder, past the markers to the test stop point. omamobile-modem is 0.1.17.

@W4HO-ham
W4HO-ham force-pushed the reboot-to-deliberate-note branch from 31280c9 to 43ef04e Compare November 3, 2026 16:59
@W4HO-ham

W4HO-ham commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

CI caught that husky, felix, panther, lynx and raven carry their own copy of reboot-to.c, held to cheetah's by their tests. All seven copies now change the same way, each package one version up. On a phone without the modem stack the note is written and never read.

@derekross

Copy link
Copy Markdown
Owner

Thank you for this, and for agreeing the shape with robotosaith on #390 first. Writing the boot ID through a temporary file with fsync and a synced rename, and accepting only a marker from the boot the note names, keeps the refusal exactly where it matters. I walked the 7 Pro's cases through the start script: a hang or reset still refuses once and then holds, the hold flag and a held boot survive a push, a bring-up that never reached ONLINE still refuses, and a reboot-to with the modem up now behaves like a clean systemctl reboot. I also built the new reboot-to.c the way the initramfs builds it (Android clang, static musl) with -Wall -Wextra, and it links cleanly. Keeping all seven copies identical was the right call.

Two things before I merge:

  1. It needs a run on a phone. Since the 7 Pro's modem is now on by default, I'll do the cheetah run myself. If robotosaith runs it on raven as offered, that's welcome too. The cases: modem up, then reboot-to omamobile, and the next boot should log "ended with reboot-to" and reach ONLINE; modem up, then a forced restart, and the next boot should still refuse; then tools/phone-smoke.
  2. Fixes #390 would close the issue at merge, but its second point (the sleep inhibitor that outlives a failed start) is still open. Could you change it to "Part of The modem is skipped on the boot after reboot-to (or bin/omamobile push) #390", or open a small issue for the inhibitor and link it?

Smaller, no change needed from you: I'll write the squash subject with the versions (omamobile-modem 0.1.17 and the device packages). Your #371 and #372 claim the same device-cheetah and device-raven versions as this PR, and #371 and #407 the same device-tegu version, so the stack will move up one after this lands; I'll give the numbers on those PRs. One comment line in the start script would help the next reader: the note records that the restart was asked for, not that it finished, which leaves the same gap a clean systemctl reboot already has.

@W4HO-ham
W4HO-ham force-pushed the reboot-to-deliberate-note branch from 43ef04e to 06c9f87 Compare November 3, 2026 21:16
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 3, 2026
… the next boot its modem

reboot-to (and so bin/omamobile push) skips the clean stop that removes the latch, so the next boot refused the modem as if the last one had hung (derekross#390). The latch now names its boot and records ONLINE, and a latch from a boot that reached ONLINE and ended with reboot-to (its note, derekross#403) is cleared with the note. A start that never reached ONLINE, or a note for another boot, still refuses.
@W4HO-ham

W4HO-ham commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. The body now says "Part of #390" (the inhibitor point stays open there), and the start script has the comment line: the note records that the restart was asked for, not that it finished, the same gap a clean systemctl reboot has. Package tests pass. On the 9a, the same reboot-to case runs through #372's script, and I'll run it after the palmtop's sleep series as part of #372's item 3.

W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 3, 2026
… the next boot its modem

reboot-to (and so bin/omamobile push) skips the clean stop that removes the latch, so the next boot refused the modem as if the last one had hung (derekross#390). The latch now names its boot and records ONLINE, and a latch from a boot that reached ONLINE and ended with reboot-to (its note, derekross#403) is cleared with the note. A start that never reached ONLINE, or a note for another boot, still refuses.
@W4HO-ham

W4HO-ham commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

A 9a run of the same case (through #372's script, which reads the note the same way): CP ONLINE, then reboot-to omamobile with this PR's reboot-to built on the palmtop. The next boot cleared the latch ("ended with reboot-to") and brought the modem up on its own, with no UFS errors. The same evening, a push through the old reboot-to left a latch that the next boot refused, which is the case this fixes.

W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 4, 2026
… the next boot its modem

reboot-to (and so bin/omamobile push) skips the clean stop that removes the latch, so the next boot refused the modem as if the last one had hung (derekross#390). The latch now names its boot and records ONLINE, and a latch from a boot that reached ONLINE and ended with reboot-to (its note, derekross#403) is cleared with the note. A start that never reached ONLINE, or a note for another boot, still refuses.
@robotosaith

Copy link
Copy Markdown
Contributor

Ran on raven today: 7.3.0-rc6-omamobile-push1-ge1e6adb69bbf, with this PR's omamobile-modem-start on top of #389's head (local branch, omamobile-modem 0.1.17 as built; main's modem package has no raven board yet) and this PR's raven reboot-to.c built on the phone (gcc -Wall -Wextra -Werror) in place of the packaged one. Each case started with the CP ONLINE:

Restart Next boot
reboot-to omamobile "ended with reboot-to, as a clean stop does: /var/lib/omamobile/modem-up removed", CP ONLINE, note gone pass
clean systemctl reboot the unit stopped at shutdown, CP ONLINE, no note involved pass
forced restart (Power + Volume Up) "ended without a clean stop: a hang or a reset; skipping the modem on this boot", marker set aside as modem-up.refused-… pass

The case that started all this happened twice more today before the run: each bin/omamobile push ended with "ended without a clean stop … skipping" on the next boot. Afterwards the phone went back to its packaged reboot-to.

…t boot its modem

reboot-to restarts at once, so systemd never stops omamobile-modem.service, its --stopped never removes modem-up, and the next boot skipped the modem as if the last one had hung (derekross#390). bin/omamobile push ends this way. reboot-to now writes and syncs the boot ID it ends to /var/lib/omamobile/deliberate-restart before rebooting (best effort: nothing in the initramfs, where that folder doesn't exist). omamobile-modem-start treats a modem-up marker from the boot the note names as a clean stop: it removes the marker, its refused copies and the note, and starts. A hang or reset leaves no note and is still refused, and so is a bring-up that never reached ONLINE.

Every device package's copy of reboot-to.c changes the same way (cheetah, tegu, husky, felix, panther, lynx, raven), since their tests hold them to cheetah's; each package's version moves up one. On a phone without the modem stack the note is written and never read. The 9a's own start (derekross#372) will use the note too.
reboot-to noted every boot it ended, so a restart in a later boot without the modem replaced the note for the boot that had it up. On the palmtop on 2026-11-04 a boot with the CP ONLINE ended with a push while the boot unit was disabled for a sleep series; the next pushes rewrote the note, and when the unit was enabled again its start refused on that boot's latch as if it had hung. The note is now written only when this boot's modem marker (the 7 Pro's modem-up, the 9a's modem-bringup-started) names it. Checked with a build pointed at a scratch directory: no marker, no note; a marker naming this boot (either name), a note; a marker naming another boot, no note.
@W4HO-ham

W4HO-ham commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

One more commit, from this morning on the palmtop: reboot-to noted every boot it ended, so a reboot in a later boot without the modem replaced the note for the boot that had it up. A boot with the CP ONLINE ended with a push while the unit was disabled for a sleep series, the later pushes rewrote the note, and when the unit was enabled again it refused on that boot's latch as if it had hung. reboot-to now writes the note only when this boot's modem marker names it (modem-up on the 7 Pro, modem-bringup-started on the 9a). Rebased on main; the device and modem package tests pass.

@derekross

Copy link
Copy Markdown
Owner

Thank you, and thank you to robotosaith for the raven run. All three cases behaved exactly as intended: reboot-to counted as a clean stop, a clean reboot needed no note, and a forced restart was still refused and set aside. Your own 9a run through #372's script covered the strictest phone too. The body and the start-script comment are what I asked for.

What's left is on my side. I'll do the 7 Pro run I promised (the same three cases plus a smoke report) before I merge. At merge I'll set the versions: #416 shipped device-cheetah 0.1.44 since your last push, and #407 has since taken device-tegu 0.2.9, so I'll give each package the next free number. I'll write the squash subject and body with the full list of seven packages, since the description still mentions two copies. You don't need to push for any of this.

…unclean end

Main's 0.1.19 (derekross#634) starts the modem after one unclean end and holds it off after two in a row. The note still matters there: a reboot-to with the modem up would count as one of the two. The test now checks that a note naming another boot leaves the first unclean end counted and the second held, and that a note naming the marker's boot clears a counted copy too. AGENTS.md's stop-the-modem rule says what the note changes.
@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Merged up to main after #634 (5c6e722b). The note still has a job under 0.1.19's rule: without it a reboot-to with the modem up is counted as the one unclean end, and a second push before a clean stop holds the modem off. With it, a marker from the boot the note names is taken as a clean stop, counted copies included.

What changed here:

  • The test no longer expects a refusal at the first stale marker. A note naming another boot leaves the first unclean end counted and the start going on, and the second held; a note naming the marker's boot clears the marker and a counted copy and starts.
  • omamobile-modem is 0.1.20, one above main.
  • AGENTS.md's stop-the-modem rule had a sentence saying what this PR would do while it was open; it now says what the note changes, and that the rule stands (the CP's power-off and the NV capture still come only from the unit's stop).
  • The description is rewritten to match.

packages/omamobile-modem/test/all and tools/pr-check pass. #601 had a conflict in AGENTS.md with #634 too (the bullet next to its own) and is merged up.

@derekross

Copy link
Copy Markdown
Owner

Thank you for the akita copy, and for reworking the test and the AGENTS sentence so quickly after #634 changed the ground under this. The new test cases read well: a note for another boot changes nothing, and a note for the marker's boot gets past the markers.

Two things are still in the way, and one question.

  1. The snprintf line is still there. It was point 2 of my last comment and I think it got lost under the merges. reboot-to.c line 46 is unchanged, and I linked it again today the way bin/omamobile initramfs does for a phone without bootctl: undefined symbol: __extenddftf2, __netf2, __multf3, __addtf3, __fixunstfsi, from musl's vfprintf. With the line as strcpy(want, "boot "); strcat(want, id); it links. As it stands, the initramfs build stops for akita, felix, husky, panther, oriole, bluejay, kodiak and the others, and for your own 9a. Please change it in all eight copies, and add a line to a package test that the file calls nothing from the printf family, since CI doesn't build that path.
  2. omamobile-modem 0.1.20 was taken by omamobile-modem: a start refused before any driver loads releases the sleep block #424, which merged seconds after you merged main in, so the branch and main now say the same number and git merges that without a bump. It takes 0.1.21, in the AGENTS sentence too. I'll set the device packages' numbers at merge as before (the 9a's will be 0.2.16 after device/tegu, omamobile-device-tegu: the Pixel 9a's modem and GNSS from the published kernel's own drivers #594 and omamobile-device-tegu: the 9a's modem start skips where it can't run, and the record of it running by itself (opt-in kept; stacked on #372) #590).

The question: your 7 Pro branch lets the note clear the counted copies as well ("$UP".refused-*), so a hang, a push and then a second hang starts the modem again. The 9a's starter on main clears only the latch and the note and keeps its .unclean-* copy, so the same sequence is held there. A clean stop shows the CP powered off with the phone alive; the note only says a restart was asked for. I lean towards keeping the count on both phones, so that the note keeps a push from being counted but doesn't end a streak. What do you think? Whichever we pick, the two should match.

To answer what you raised: yes, I still want this after #634. It no longer saves a boot's modem, but it keeps two pushes in a row from holding it off, it keeps the one free unclean end for a real hang, and it gives the 9a's starter the note it already reads. The rule to stop the modem first stays, as your AGENTS text says.

After the fixes it's on me: the 7 Pro run (a reboot-to with the modem up, a clean reboot, a forced restart and a second in a row, and your second commit's case), the smoke report, and restaging the 7 Pro's boot files.

…e note keeps a counted unclean end

reboot-to.c is linked into the initramfs against musl with no compiler builtins when a device package has no bootctl, and musl's vfprintf needs them: with the snprintf line that link fails with undefined __addtf3, __extenddftf2 and seven more. The line is strcpy and strcat now, in all eight copies, and device-cheetah's test refuses a printf-family call in the file.

The note no longer removes the modem-up marker's counted copies. It keeps a deliberate restart from being counted as an unclean end, but it doesn't end a streak: a hang, a push and a second hang are held, as the 9a's starter already does. Main took 0.1.20, so this is 0.1.21.
@W4HO-ham

Copy link
Copy Markdown
Contributor Author

You're right, I lost your point 2 under the merges. I'm sorry; it is done now (2c426e5d).

  1. snprintf. I repeated your link first, with the host clang against the Alpine musl sysroot exactly as bin/omamobile initramfs does without bootctl: nine undefined symbols (__addtf3, __extenddftf2, __fixtfsi, __fixunstfsi, __floatsitf, __floatunsitf, __multf3, __netf2, __subtf3). With strcpy(want, "boot "); strcat(want, id); it links to a static aarch64 binary. All eight copies have the change and are byte for byte the same. device-cheetah's test/all now fails on any printf-family call in src/reboot-to.c (the other seven are held to that file by their own tests); I checked the pattern catches snprintf( and fprintf (.
  2. omamobile-modem is 0.1.21, in the AGENTS sentence too. The device packages' numbers are left where they fell.

Your question: keep the count. I agree, and it is changed: the note removes the marker and itself and no longer touches the .refused-* copies. Your reason is the right one: a clean stop has seen the CP off with the phone alive, the note has only seen a restart asked for. So the note keeps a push from being counted and that is all. A hang, a push and a second hang are held on the 7 Pro as on the 9a, and only a clean stop (or --retry) ends a streak. The test has that sequence: a counted copy, a note for the marker's boot (starts, copy kept), then a stale marker (held). The description says it the same way.

@derekross

Copy link
Copy Markdown
Owner

Thank you, that was quick, and all three points are done as I asked.

I checked this head (2c426e5d):

  • snprintf. Gone from all eight copies, which are byte for byte the same file. I linked it again the way bin/omamobile initramfs does for a phone without bootctl (musl, no compiler builtins) and it links to a static aarch64 binary, as main's does. The check in device-cheetah's test/all is the right place for it, since the other seven packages hold their copy to that one.
  • omamobile-modem 0.1.21, in the version file and in the AGENTS sentence.
  • The count. The note now removes the marker and itself and leaves the .refused-* copies, so a hang, a push and a second hang are held on the 7 Pro as on the 9a. The test has exactly that sequence, and the two starters now agree.

CI is green on this head, and I ran the nine touched packages' tests on the branch merged onto today's main (which has gained #594 since your push): all pass.

Nothing more is needed from you on the code. Two notes:

  1. omamobile-device-tegu is 0.2.14 on the branch and main took 0.2.14 with device/tegu, omamobile-device-tegu: the Pixel 9a's modem and GNSS from the published kernel's own drivers #594, so as it stands the 9a's package wouldn't get a new number. I'll set it at merge with the others. It will also conflict with omamobile-device-tegu: the 9a's modem start skips where it can't run, and the record of it running by itself (opt-in kept; stacked on #372) #590 and omamobile-device-tegu 0.2.15: one sleep state, so a refused sleep isn't tried twice (#619) #654 once one of them is in (they both write 0.2.15); when that happens, one more merge of main is all it needs, with the tegu number left wherever it falls.
  2. Your palmtop runs a hand-built device-tegu 0.2.17, and the published numbers are about to reach 0.2.16 or 0.2.17 with different contents. Once these are merged, please reinstall the package from the repository so the palmtop runs what is published.

The rest is mine: the 7 Pro run (a reboot-to with the modem up, a clean reboot, a forced restart and a second in a row, and your second commit's case), the smoke report, and restaging the 7 Pro's boot files. I'll post the results here and merge after them.

@W4HO-ham

Copy link
Copy Markdown
Contributor Author

Two pushes since your check, both from main moving:

packages/omamobile-device-oriole/test/all and tools/pr-check origin/main pass here.

The Pixel 6's package came to main with its own copy of reboot-to.c (derekross#222), held to the 7 Pro's by its test. This pull request changes that source (the note for a deliberate restart, no printf family), so the ninth copy gets the same file.
@W4HO-ham

Copy link
Copy Markdown
Contributor Author

In my comment just above, the oriole commit is 160c5fd0, not 0ea7d2f9: that one is only the merge of main. The first push went out without the file (its src path is ignored by a .gitignore rule, and the add was refused), and 160c5fd0 adds it.

@derekross

Copy link
Copy Markdown
Owner

Thank you for catching the Pixel 6 copy as soon as #222 landed, and for the correction a minute later about which commit carries it. I checked this head (160c5fd0): all nine copies are the same file, byte for byte the one I linked against musl yesterday, and the starter, its test and the AGENTS sentence are unchanged since my last check. On the branch merged onto today's main, the tests of omamobile-modem and the nine device packages pass, and CI is green.

Nothing more is needed from you on the code. For the record, so the numbers don't surprise anyone: main has since taken device-cheetah 0.1.51, and the branch says 0.1.51 as well, so as it stands the 7 Pro's package wouldn't get a new number; the same goes for husky (0.1.10), oriole (0.2.0) and tegu (0.2.16), whose source changes here without a bump. I'll set them at merge: cheetah 0.1.52, husky 0.1.11, oriole 0.2.1, tegu 0.2.17, and the others where your branch has them. Please don't chase them with another merge.

One thing to know about: #459 (the usage text for an option) changes seven of the same files and was written before the Pixel 8a and Pixel 6 copies existed, so the two can't both land as they are. I'll sort the order out on #459; if this one goes first, the option check there moves in front of the note, so that reboot-to --help writes nothing.

What's left is mine: the 7 Pro run (a reboot-to with the modem up, a clean reboot, a forced restart and a second in a row, and your second commit's case), the smoke report, and restaging the 7 Pro's boot files. I'll post the results here and merge after them.

@derekross

Copy link
Copy Markdown
Owner

The Pixel 7 Pro run is done, and every case behaves as the PR says. Omarchy 4.5.0-3, uname -r 7.3.0-rc6-omamobile-g1a9d1d4e9289, on 2026-11-11.

What ran. omamobile-modem 0.1.21 from this head (160c5fd0) merged onto today's main, built on the phone with tools/phone-install-package. reboot-to was this head's src/reboot-to.c (blob 7ba6f5a2) compiled on the phone as a separate binary and called by its path. I did not install the test omamobile-device-cheetah: that package carries the boot files, and this phone writes slot B itself when they change, so a test build of it could have put an unreleased boot image on the phone. The packaged /usr/bin/reboot-to stayed 0.1.51's throughout.

Case The next boot
reboot-to with the modem up, with one unclean end already counted "ended with reboot-to, on purpose: /var/lib/omamobile/modem-up removed, not counted as an unclean end"; CP ONLINE; the earlier modem-up.refused-* copy still there
a clean systemctl reboot marker and refused copy removed by the stop; CP ONLINE, nothing logged about the last boot
reboot-to with the modem up, from a clean state "on purpose", CP ONLINE, nothing counted
a forced restart (Power held) "ended without a clean stop: a hang or a reset", one refused copy, CP ONLINE all the same
a second forced restart "the one automatic retry is used up, the modem stays off"; the tile's reason "Off after a hang or reset (held)"
reboot-to in that held boot, modem off (your second commit) no note written; the marker still names the older boot; still held
markers removed, clean reboot CP ONLINE, registered on the network

After every boot: no UFS error-handler pass, no I/O or ext4 error, no failed unit other than the held modem's own. The radio partitions matched my backup before the run and after it (tools/nv-backup --check).

One thing I learned the hard way, and it belongs to #459 more than to this PR: reboot-to takes any argument as the reason. I ran the test binary with --help to read its usage and it restarted the phone, modem up. The note it wrote named the right boot, and the starter then on the phone (0.1.20) counted that restart as an unclean end, which is this PR's reason for existing, seen on the real phone. So #459's option check is wanted, and it has to come before the note.

tools/phone-smoke after the last boot, with the test omamobile-modem still installed:

phone-smoke: cheetah

Kernel 7.3.0-rc6-omamobile-g1a9d1d4e9289, tools at 2e2e2d98, 2026-11-12T03:41Z.

Check Result Detail
boot (required) ok kernel 7.3.0-rc6-omamobile-g1a9d1d4e9289, slot b, up 129s
storage guard (required) ok 55 partitions; only userdata and slot B's boot images writable
root (required) ok ext4 on userdata, 95G free
kernel health (required) ok no oops or BUG; 0 WARN, 42 error lines in dmesg (3 known, 39 new)
new dmesg errors not ok cpif: rx_demux: PCIE: ERR! N is not opened x11; cpif: pass_skb_to_demux: PCIE: N<N: ERR! N>recv_skb fail (N) x11; cpif: io_dev_recv_skb_single_from_link_dev: N<-PCIE: ERR! rx_demux fail (err N) x11
systemd units ok none failed
USB gadget (required) ok bound to 11210000.usb
display ok card2-DSI-1 connected, 1440x3120
GPU ok render node on panthor
session (required) ok Hyprland and the Omarchy shell running
lock ok PAM file present, the shell can lock (passwordPam true, locked true)
touch ok Synaptics TouchComm Touchscreen
buttons ok gpio-keys
Wi-Fi ok wlp1s0 on brcmfmac, link up
Bluetooth ok hci0, powered true
battery ok 100% Charging, 33 °C
sound cards ok googleaocsndcar
sensors ok Accelerometer AmbientLight Proximity
cameras skip no libcamera tools
thermal ok hottest zone 51 °C

The one "not ok" line is cpif's rx_demux … is not opened noise, which is in earlier boots too and belongs on the smoke test's known list.

The phone is back on the published omamobile-modem 0.1.20, and the test binary is removed.

What's left is mine at merge, as I said: the version numbers (cheetah 0.1.52, husky 0.1.11, oriole 0.2.1, tegu 0.2.17, and the modem and raven numbers against #389), restaging the 7 Pro's boot files, and the order with #459.

@derekross
derekross merged commit 107e026 into derekross:main Nov 12, 2026
2 checks passed
derekross added a commit that referenced this pull request Nov 12, 2026
…bers #403's reboot-to needs (#683)

#403 changed src/reboot-to.c in every device package, but four of them
had no new number on its branch: main had moved to the same one, or the
branch never bumped it. Without a new number the build keeps the old
package, so those phones would not get the reboot-to that notes a
deliberate restart.

Three of the four here. Their packages carry no boot image, so the bump
only rebuilds the binary.

device-cheetah stays at 0.1.51 on purpose. Its package carries the
Pixel 7 Pro's boot image, which release phones write to slot B at the
update, and the image's inputs have changed twice since the last one
that booted (#667): initramfs/init (#562) and reboot-to.c (#403). It
gets 0.1.52 once an image built from this tree has booted on the 7 Pro,
as 0.1.51 did.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
derekross added a commit that referenced this pull request Nov 12, 2026
…ounted (#684)

Every Pixel 7 Pro boot with the modem up logs a few dozen error lines
from CPIF: the modem sends on channels nothing on the phone opens (the
second SIM's stack, the OEM channels, the router), and CPIF logs three
lines for each message it drops. phone-smoke reported them as new errors
in every report, which hid any error that really was new (the #403 run's
report, 2026-11-11: 43 such lines in ten minutes, across oem_ipc0,
oem_ipc1, oem_ipc3, umts_ipc1 and umts_router).

They go in counted_errors, so the row still names and counts them, with
no ceiling. umts_ipc0 is left out on purpose: it is the phone service's
own channel, and a message dropped there stays a new error. Two test
cases cover both.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
robotosaith added a commit to robotosaith/omarchy-mobile that referenced this pull request Nov 12, 2026


derekross#403 merged and shipped omamobile-modem 0.1.21 and device-raven 0.1.35,
the numbers this branch also carried. The lines were equal, so the merge
of main raised no conflict, and the Pixel 6 Pro's package would have
kept its old build. Both take the next numbers. modem-sit stays at
0.3.35; other open pull requests claim it too, and it is set at merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
angelrenefm added a commit to angelrenefm/omarchy-mobile that referenced this pull request Nov 12, 2026
The option check now comes before note_deliberate_restart() and prints
with write(2); all nine copies identical, as in e296b53f (see its message
for what was tested).

I used AI help (Claude) to work on this.
chillerno1 added a commit to chillerno1/omarchy-mobile that referenced this pull request Nov 12, 2026
…after derekross#403

Upstream's reboot-to notes a deliberate restart for the modem's next start
(derekross#403, derekross#683). The Saga's copy must match the cheetah source (test/all), so
it takes the new file; the note is only written on a boot with the modem
up, which the Saga doesn't start yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
derekross added a commit that referenced this pull request Nov 12, 2026
… and #562's init reaches installed phones (#691)

The Pixel 7 Pro's package carries its boot image, and release phones
write it to slot B at the update. Two of the image's inputs changed since
0.1.51: initramfs/init (#562: the optional root label check, development
handover and RAM rescue keys, all unset for this phone) and reboot-to.c
(#403: it notes a deliberate restart). 0.1.51 was held until an image
built from this tree had booted on the phone.

It has, on 2026-11-12, by the path a release phone takes: the package
built with boot files staged from main on the release kernel
(7.3.0-rc6-omamobile-g1a9d1d4e9289) and installed with pacman. Against
0.1.51's initramfs exactly two files differ, init and reboot-to; the dtbo
is the same. The hook found four of slot B's five images already there
and wrote vendor_kernel_boot_b, verified, with the previous slot B saved.
After a clean restart the phone booted it: system running, no failed
unit, /run 0755, the root filesystem mounted without recovery, no UFS
error-handler pass, the modem ONLINE, and tools/phone-smoke passing.

With this the 7 Pro's packaged reboot-to is #403's too.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…he 7 Pro's modem starts at boot by default (derekross#574)

* AGENTS.md: stop the modem before a push or a reboot-to

reboot-to is a raw reboot syscall and bin/omamobile push ends in it, so
neither stops omamobile-modem.service. Its clean stop never runs, the
modem-up marker stays, and on the 7 Pro, where the modem starts at boot,
the next boot skips the modem once as if the last one had hung; a second
unclean end in a row holds it off until --retry. That happened on
2026-11-08 after a reboot-to bootloader taken to charge a flat battery.

Add a bullet to the push notes in section 2: stop the unit first, under
the human's go for the reboot, or use systemctl reboot when no reason is
needed; what the stop costs today (about 40 s, logged as failed, marker
still removed); why this is not the restart the modem gotchas forbid;
and that the open derekross#403 would make reboot-to count as a clean stop. The
reboot-to gotcha and the NV overlay note in section 4 point to it; the
NV note keeps nv-overlay capture as the narrower alternative.

Part of derekross#532 (its docs request only; the watcher and SIGTERM fixes are
package changes).

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

* AGENTS.md, MODEM-PLAN: modem at boot by default, derekross#403's reach, B4

Addresses the review on derekross#574.

- AGENTS.md, the modem restart gotcha: it still called the 7 Pro's
  stack at boot opt-in (`systemctl enable omamobile-modem-boot.target`),
  which stopped being true with derekross#398. It now says the stack starts by
  default since device-cheetah 0.1.43 (MODEM-PLAN M4.6b), and that
  `systemctl mask` keeps it off from the next boot, as the target, the
  package's install message and the device README say: `disable`
  doesn't remove device-cheetah's vendor wants link.
- AGENTS.md section 2: derekross#403 doesn't make `reboot-to` a clean stop. Its
  note lets the next boot's start clear a `modem-up` marker from the
  boot `reboot-to` ended, but the CP's ordered power-off and the NV
  capture still run only in the unit's stop, so the advice to stop the
  modem first stands with derekross#403 merged too.
- MODEM-PLAN M4.6 B4 rebooted with `reboot-to omamobile` and expected
  the clean stop's "modem stopped (...): modem-up removed", which a raw
  reboot syscall can't produce. The step is there to show that a
  reboot's stop clears the marker, so it now reboots through systemd,
  as N5 does, and its pass line takes today's "timeout" result (derekross#532).
  The recorded results are unchanged.

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

* MODEM-PLAN: M4.6b B8 and B9b reboot through systemd, as B4 now does

Part of the review on derekross#574. B8 plants another boot's modem-up marker
so that "the reboot's clean stop keeps a marker that isn't this
boot's", and its pass line reads the previous boot's "is another
boot's ... kept"; B9b's planted reboot rests on the same stop hook,
and its last "clean reboot" checks that `--stopped` removed the
refused copies. All three rebooted with `reboot-to omamobile`, which
stops no unit, so the stop hook they test never ran: the same gap as
B4. They now reboot with `systemctl reboot`. The recorded results are
unchanged.

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

---------

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
…counted as an unclean end (derekross#403)

reboot-to skips systemd's shutdown, so the modem unit's stop never ran and the next boot counted its modem-up marker as a hang or reset; two pushes in a row held the modem off. reboot-to now notes the boot it ends (only when that boot's modem marker names it, written through a temporary file, fsync and a synced rename), and omamobile-modem-start doesn't count a marker from the boot the note names; an unclean end already counted stays counted, as on the 9a. All nine device packages' copies of reboot-to.c change together, and device-cheetah's test refuses a printf-family call in it, since the initramfs links it against musl without compiler builtins. The device packages whose number this leaves unchanged (cheetah, husky, oriole, tegu) get theirs in the commit that follows.

Part of derekross#390. Tested on raven (robotosaith), the 9a (W4HO-ham) and the Pixel 7 Pro (2026-11-11, 7.3.0-rc6-omamobile-g1a9d1d4e9289): reboot-to with the modem up from a clean state and on top of a counted unclean end, a clean reboot, one and two forced restarts, and reboot-to from the held boot.
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…bers derekross#403's reboot-to needs (derekross#683)

derekross#403 changed src/reboot-to.c in every device package, but four of them
had no new number on its branch: main had moved to the same one, or the
branch never bumped it. Without a new number the build keeps the old
package, so those phones would not get the reboot-to that notes a
deliberate restart.

Three of the four here. Their packages carry no boot image, so the bump
only rebuilds the binary.

device-cheetah stays at 0.1.51 on purpose. Its package carries the
Pixel 7 Pro's boot image, which release phones write to slot B at the
update, and the image's inputs have changed twice since the last one
that booted (derekross#667): initramfs/init (derekross#562) and reboot-to.c (derekross#403). It
gets 0.1.52 once an image built from this tree has booted on the 7 Pro,
as 0.1.51 did.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…ounted (derekross#684)

Every Pixel 7 Pro boot with the modem up logs a few dozen error lines
from CPIF: the modem sends on channels nothing on the phone opens (the
second SIM's stack, the OEM channels, the router), and CPIF logs three
lines for each message it drops. phone-smoke reported them as new errors
in every report, which hid any error that really was new (the derekross#403 run's
report, 2026-11-11: 43 such lines in ten minutes, across oem_ipc0,
oem_ipc1, oem_ipc3, umts_ipc1 and umts_router).

They go in counted_errors, so the row still names and counts them, with
no ceiling. umts_ipc0 is left out on purpose: it is the phone service's
own channel, and a message dropped there stays a new error. Two test
cases cover both.

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…reboot-to and derekross#562's init reaches installed phones (derekross#691)

The Pixel 7 Pro's package carries its boot image, and release phones
write it to slot B at the update. Two of the image's inputs changed since
0.1.51: initramfs/init (derekross#562: the optional root label check, development
handover and RAM rescue keys, all unset for this phone) and reboot-to.c
(derekross#403: it notes a deliberate restart). 0.1.51 was held until an image
built from this tree had booted on the phone.

It has, on 2026-11-12, by the path a release phone takes: the package
built with boot files staged from main on the release kernel
(7.3.0-rc6-omamobile-g1a9d1d4e9289) and installed with pacman. Against
0.1.51's initramfs exactly two files differ, init and reboot-to; the dtbo
is the same. The hook found four of slot B's five images already there
and wrote vendor_kernel_boot_b, verified, with the previous slot B saved.
After a clean restart the phone booted it: system running, no failed
unit, /run 0755, the root filesystem mounted without recovery, no UFS
error-handler pass, the modem ONLINE, and tools/phone-smoke passing.

With this the 7 Pro's packaged reboot-to is derekross#403's too.

Co-authored-by: Claude Fable 5.2 <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.

3 participants