Repository navigation
omamobile-device-tegu 0.2.0: the Pixel 9a's bring-up as a package - #152
Conversation
…rd and USB networking The thin package the 9a has run since the first native boots: the storage guard's udev policy, the usb0 address, NetworkManager kept off the link, the device descriptor, the mirrorlist and reboot-to, plus the torch, DMA-heap and feedbackd rules. It starts no hardware and marks no slot.
The usb0 gateway becomes a default route at metric 2048, so Wi-Fi (NetworkManager's 600) wins when it is up and the host's shared connection still serves a first setup over USB. The copy the palmtop runs.
The MAX77779 opens its USB data switch on unplug and leaves it open when VBUS returns, so the palmtop never re-enumerates. omamobile-tegu-usb-rescue closes it while the gadget stays unconfigured, through tegu-tcpc-switch, which checks the chip's identity and VBUS before its one write and never forces an address a driver holds. It exits once a Type-C driver owns the chip, as the cheetah rescue does. The install script now stages bin/ and vendor/ with cheetah's loops, so the units' wants links come from the package.
… haptics, torch, gauge and Bluetooth The curated start of the bring-up, as a package guard in cheetah's form: a marker written and synced before the first modprobe, panthor, gs_decon, cs40l26_vibra, leds_lm3644, max77779_battery and hci_uart in that order, the marker naming the step so a hang is easy to place, and the next boot keeping all six off until --retry. No file-hash manifest, EGL smoke test, mask checks or bootloader dead-man: the marker is the safety net. The drivers are blacklisted for autoload without install lines, the display options (DSI commands, 120 Hz, the panel really off on DPMS) and the GPU DVFS ceiling move to modprobe.d, and the display manager waits for the guard.
cheetah's omamobile-bt-addr, started by udev when hci0 appears, with the waits the 9a needed: a controller that has never been powered is powered on once before Set Public Address, the index is awaited after it, and the address is checked against the device tree before the script reports success.
The bring-up script wrote the owner's charge limit into the charger by hand at every start. A udev rule now runs omamobile-tegu-charge-limit when the MAX77779 charger appears: a percentage from 1 to 100 goes to charge_control_end_threshold, anything else is refused and leaves the charger charging to 100 %.
…oot watchdog, module cleanup held off The Wi-Fi hook keeps brcmfmac loaded across s2idle when the owner's flag says so and unloads it around sleeps otherwise, or after a sleep that lost the chip; it now loads the in-tree module instead of a file in /var/lib. The NFC hook stops neard's poll loop and powers the ST54L off before a sleep, since it does not answer on I2C after a wake. Suspend means s2idle and a hung shutdown resets the phone after a minute, as on cheetah; Arch's module cleanup is held off while the package exists, because our kernels come as tarballs.
cheetah's hang-safe AoC start with the 9a's names: Trusty, the GSA, the AoC drivers with aoc_channel_dev for the sensors' USF channel, aoc-tegu.bin, then a wait for a stable service count. The unit has no wants link: the kernel's device tree does not enable the AoC, GSA and Trusty nodes yet (the bring-up turns them on with out-of-tree overlay modules), so the script would find nothing to do until it does.
… version test/all checks what is staged, that only the two guards are enabled, that every guarded driver is blacklisted without install lines, and that no blob or address is in the package; the scripts run in a scratch root with fake modprobe, sync, busctl and friends (test/graphics-start, aoc-start, usb-rescue, sleep-hooks, charge-limit), no phone needed. The README says what the kernel command line must stop carrying for the package to take over, why the AoC start ships disabled, which firmware the phone needs, and what to take off the first 9a when moving from the bring-up.
check() runs with pkg/ beside the sources, and the scan died on it.
The first package boot on the palmtop stopped at the gauge (a stale bring-up modprobe.d file still had install max77779_battery /bin/false), and --retry then refused to run because the GPU was already loaded. A retry now continues the sequence; modprobe leaves the loaded drivers alone.
|
First boots as a package on the palmtop, today 09:15 and 09:19, with a boot image whose bootargs drop the curated gate, the multi-user target, the wants and the module blacklist and keep the masks for the hand-copied units and the slot marking (the |
The session's uwsm/env takes the display controller's card from /run/omamobile-tegu-display-card and hardware GL from /run/omamobile-tegu-gpu-ready.json, both written by the curated start. Without them the first packaged boot gave Hyprland /dev/dri/card0, the GPU on that boot, and it aborted with no KMS device; sddm then showed its greeter, which takes no touch. The graphics start writes both now.
|
Progress on the palmtop since the first boots this morning, for the record of this package:
phone-smoke: teguKernel
Packages: hyprland 0.56.2-5.1, libcamera 0.7.2-4.22, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamobile-apps 0.2.0-1, omamobile-audio 0.4.1-1, omamobile-device-tegu 0.2.0-1, omamobile-fingerprint 0.1.8-1, omamobile-firstboot 0.1.0-1, omamobile-gnss 0.2.1-1, omamobile-keyring 20261013-1, omamobile-mirror 0.1.1-1, omamobile-modem 0.1.4-1, omamobile-omarchy 0.1.12-1, omamobile-owl-widgets 0.1.1-1, omamobile-sensors 0.2.1-1, omamobile-shell 0.2.36-1, omarchy 4.0.6-1 |
|
Thank you, @W4HO-ham. This is a big step: the 9a's bring-up moves out of hand-copied files into a package anyone can read, and it's done carefully. The graphics start writes and syncs its marker before the first I ran Three things before it can merge:
Smaller things; a follow-up is fine for any of them:
How this and #74 fit together: I'd like this to be the 9a's device package. Once it's in, #74's package part is superseded. h4rkl's phone notes and Thanks again. It's good to see the 9a this far along. |
…h it; allow_tx for google-tg4c only The graphics start keyed everything on the GPU node, and a panthor load or bind that returned and failed kept the marker and skipped gs_decon. Since gs_decon is blacklisted, nothing else loads it: a phone without mali_csffw.bin yet got no display, and the marker kept it off at every boot until --retry over SSH; a DTB with the display but no GPU went dark. Now each step keys on its own device node (1f000000.gpu for panthor, 19470000.display-controller for gs_decon, the device-tree nodes for the rest), the unit's two ConditionPathExists=| lines run it when either exists, and a load or bind that returns and fails is logged and skipped while the rest still loads; the marker is cleared at the end as after a good start, and the unit ends failed. Only a step that never comes back keeps the marker, which is what it is for. A torch that comes up lit is turned off and counted as failed instead of stopping the start. The gpu-ready file is written only when the GPU came up, so the session falls back to software GL. The panel's DSI commands (gs_dsim_cmd.allow_tx) leave modprobe.d, where they applied to every panel: the start turns the parameter on, before gs_decon loads (gs-decon decides on 120 Hz at probe), only when the command line says exynos_drm.panel_name=google-tg4c, the panel the palmtop's bring-up tested. On another panel the display stays read-only at 60 Hz. gs_dsim_cmd is loaded first so the parameter file exists; it is not guarded, since it autoloads from its node ahead of the start and sends nothing until allow_tx is on. Tests: google-tg4c reads allow_tx 1 when gs_decon loads, another panel and no panel name read 0, a failed gs_decon or panthor still loads the rest and clears the marker, no GPU node still loads gs_decon, no display node still loads panthor, a hang marker still keeps everything off, and the unit's two conditions and the modprobe.d file are checked.
…f step behind a flag file The hook stopped neard's poll loop and then powered the adapter off before every sleep. The variant with the record is the stop-poll one: polling through s2idle reset the palmtop (2026-10-27), and with the poll loop stopped first 35 of 35 cycles woke that day, while the power-off variant has one wake that needed the power key and one that worked. So the hook now stops the poll loop, reads Polling back and logs it, and starts the loop again after the wake if it was on. Powering the adapter off, the workaround for a controller that did not answer on I2C after a wake, runs only while /etc/omamobile/nfc-power-off-across-sleep exists (off by default), and then the adapter is powered on again after the wake. The header points to issue derekross#132 for the symptom and linux-omarchy-mobile derekross#131 for the fix. Tests: the default stops and restarts polling with the adapter left powered and both readings logged, an idle adapter is logged and not touched, and the flag file brings the power-off and the power-on back.
…and logs only when it acts With the cable out the gadget is not configured and the switch reads 0x00, as the MAX77779 leaves it on unplug, so the loop called connect every grace period: the helper refused without VBUS, and both lines went to the journal, about 20,000 a day on battery. The loop now reads the power register first and reads the switch and writes only while VBUS is present, so a day on battery costs one register read per grace period and no journal lines. Tests: the cable out costs one power read and no line beyond the watch line; a closed switch is read and not logged.
…and gpu-ready files The graphics start writes /run/omamobile-tegu-display-card and /run/omamobile-tegu-gpu-ready.json for the session, but their reader lived in the palmtop's own ~/.config/uwsm/env, so a second owner would have hit the card0 failure. The package now ships the reading lines as /usr/share/uwsm/env.d/omamobile-tegu-graphics, which uwsm sources (its env loader walks XDG_DATA_DIRS too, with a POSIX shell; a user's ~/.config/uwsm/env still runs after it): AQ_DRM_DEVICES from the card file when it names a character device, hardware GL when the gpu-ready file exists and the render node is there, llvmpipe otherwise, so a phone whose GPU did not come up still gets a desktop. Tests: the file parses as POSIX shell, is staged, and reads both files.
…oth and the smoke report The README said a failed AoC start keeps the marker; the code and its test clear it, since a load that returned is not a hang. It now says so. The AoC start's header cited docs/HANDOFF.md, which is not in the repository: it now points to the palmtop's bring-up script and the 2026-10-26 entry in device/tegu/NOTES.md. Two lines added: s3c2410_wdt.tmr_atboot=1 in the bootargs is what resets the palmtop after a hang, while the public tegu DTS has panic=10 only, so there a hang that does not panic ends at the power key; and Bluetooth comes up powered at every boot, as on the Pixel 7 Pro. One more says why a smoke report from the palmtop lists Wi-Fi and NFC as loaded beside this package: the bring-up's omamobile-tegu-audio-up, still running there, loads them, not the package.
Nothing in the package runs i2cget, i2cset or i2cdetect any more: the USB rescue goes through tegu-tcpc-switch, which uses /dev/i2c-* directly, and the unit loads i2c-dev with kmod.
… panel's id The bootloader names the panel as exynos_drm.panel_name=google-tg4c.2d008004 on the palmtop, the id appended, so the exact match never allowed the DSI commands and the first boot of this round came up at 60 Hz with the warning from gs-decon. The match now takes google-tg4c with or without a suffix, and the test has the bootloader's form.
|
Thanks for the careful read. All of it is on the branch now, head ffbf958, one commit per point, tests passing at each commit, and two boots of the palmtop on it (below).
The boot on ffbf958 (12:40 local): phone-smoke: teguKernel
Packages: hyprland 0.56.2-5.1, libcamera 0.7.2-4.22, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamobile-apps 0.2.0-1, omamobile-audio 0.4.1-1, omamobile-device-tegu 0.2.0-1, omamobile-fingerprint 0.1.8-1, omamobile-firstboot 0.1.0-1, omamobile-gnss 0.2.1-1, omamobile-keyring 20261013-1, omamobile-mirror 0.1.1-1, omamobile-modem 0.1.4-1, omamobile-omarchy 0.1.12-1, omamobile-owl-widgets 0.1.1-1, omamobile-sensors 0.2.1-1, omamobile-shell 0.2.36-1, omarchy 4.0.6-1 |
… every spot The NOTES entry no longer says the systemd path has woken every time or that the module loads at boot; a 2026-10-30 bullet carries the cable-out no-wake, the disabled unit, the cable-in wake and the afternoon's 260 mA. The status line names the three no-wakes and attended sleeps, the S1 repeat and Next say attended, the AGENTS count is seven longer systemd wakes, the nightly auto-sleep without the module is said to be fine, and the NFC hook is in the repository since derekross#152.
… rounds L-348 to L-361: shared drivers judged against every int-line user (#150), board pins against every stock user (#151), ownership flags under the consumer's lock (#152), /chosen children and Google's panel constants (#154), same-day notes PRs on one device (#208/#209), merge simulations for DEVICES rows, ours included (#165), stacked PRs that merged main (#115/#117), titles behind renumbered versions, a contributor merge that dropped the PR (#99), smoke package lists as provenance and "owner-authorized" writes (#200), promised fixes and named tags checked on the remote (#153/#157/#158), and file swaps into old packages (#193). C-23 (usbc-deadman's device scope, kernel #107) and C-24 (BNEP in a lynx-only fragment, #98). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
derekross#152 landed omamobile-device-tegu 0.2.0, which supersedes this branch's package, so the package and tests/all come from main unchanged. Following the review on derekross#74, kernel.sources and prepare-kernel are dropped; the branch keeps the second phone's notes and device/tegu/kernel.config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Following the review on derekross#74, now that derekross#152 carries the package: the second phone's results go into NOTES as one dated entry in newest-first order, and device/tegu/kernel.config joins the repository so the published kernel branch plus this fragment is the recipe. The entry now states slot A's current state once, at the top: stock's five boot images match the official October images and its recovery boots, which supersedes the earlier "not a qualified rollback" line. It also notes that reboot-to bootloader comes back to a normal boot on this phone, next to the button combination. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rekross#152) The Pixel 9a's (tegu) bring-up moves from hand-copied files into a device package, on in-tree drivers only. Built on h4rkl's derekross#74. At boot (vendor wants links), two units: - omamobile-tegu-graphics: loads the GPU (panthor), display (gs_decon), haptics, torch, battery gauge and Bluetooth UART, each blacklisted against autoload, after a synced hang marker. Each step keys on its own node; a load or bind that returns and fails is logged and skipped (a GPU without mali_csffw.bin keeps the display), and only a step that never returns keeps the marker, so the next boot leaves them off until --retry. gs_dsim_cmd.allow_tx (DSI commands, 120 Hz) is turned on before gs_decon only when the bootloader names the google-tg4c panel (with or without its id suffix); any other panel stays read-only at 60 Hz. The session's side ships as /usr/share/uwsm/env.d (KMS card, hardware GL only when the GPU came up). - omamobile-tegu-usb-rescue: closes the MAX77779's USB data switch after a replug while no Type-C driver owns it, through a C helper that checks the board, the chip's identity and VBUS (twice), never forces an I2C address, and reads back its one write; it reads VBUS first, so the cable out costs a register read and no log lines. Also: the Bluetooth address from the bootloader's DT, a charge limit from /etc/omamobile/charge-limit, s2idle only, the reboot watchdog (no runtime watchdog), the storage rule, usb0 as a fallback route, Arch's module cleanup held off, and sleep hooks: Wi-Fi kept or reloaded as flagged; NFC's poll loop stopped before a sleep and restarted after (powering the ST54L off only behind /etc/omamobile/nfc-power-off-across-sleep, off by default). The AoC start ships without a wants link until a kernel enables its nodes. Nothing marks a slot or touches devinfo, persist, the RPMB or Trusty's storage. Tested on the owner's 9a (private kernel 7.3.0-rc6, five package boots on 10-29, phone-smoke 19/19 on ffbf958); test/all runs every script in a scratch root. Co-authored-by: W4HO-ham <87742609+W4HO-ham@users.noreply.github.com> Co-authored-by: h4rkl <89045610+h4rkl@users.noreply.github.com>
… rounds L-348 to L-361: shared drivers judged against every int-line user (derekross#150), board pins against every stock user (derekross#151), ownership flags under the consumer's lock (derekross#152), /chosen children and Google's panel constants (derekross#154), same-day notes PRs on one device (derekross#208/derekross#209), merge simulations for DEVICES rows, ours included (derekross#165), stacked PRs that merged main (derekross#115/derekross#117), titles behind renumbered versions, a contributor merge that dropped the PR (derekross#99), smoke package lists as provenance and "owner-authorized" writes (derekross#200), promised fixes and named tags checked on the remote (derekross#153/derekross#157/derekross#158), and file swaps into old packages (derekross#193). C-23 (usbc-deadman's device scope, kernel derekross#107) and C-24 (BNEP in a lynx-only fragment, derekross#98). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Pixel 9a's device package, with the bring-up that has been running from scripts on my phone since the 10-27 status (#100, #125) moved into package form: the hang-safe graphics start (GPU, display at 120 Hz, haptics, torch, gauge, Bluetooth, marker first,
--retry), the Bluetooth address from the bootloader, the USB replug rescue with its guarded TCPC helper, a charge limit from/etc/omamobile/charge-limit, the Wi-Fi and NFC sleep hooks, s2idle and the reboot watchdog, the module-cleanup drop-in and the storage, torch, DMA-heap and feedbackd rules. The AoC start ships disabled: it needs a kernel whose device tree enables the AoC, GSA and Trusty nodes, which the DT stack (#80 and on) will give it. The README's table says what each file does, what the package does not do (no slot marking, no Wi-Fi, NFC, modem, charger driver or cameras yet), what firmware the owner's factory image provides, and what the kernel command line has to stop carrying before the package can take over from the bring-up scripts.Nine commits, one per area, on top of the 0.1.3 skeleton. Tests run in a scratch root with fake
modprobe,sync,busctlandbtmgmt(OMAMOBILE_TEGU_ROOT, as #74 does for its touch start): the marker is written and synced before the first modprobe, the load order is kept, a failed step is named and keeps the marker,--retryclears it, the usb rescue defers to a Type-C driver, the sleep hooks keep or reload Wi-Fi as flagged, the charge limit takes percentages only.test/all,tests/packagesandtools/pr-checkpass.What this is not yet: installed and booted as a package on the phone. My phone still boots with the bring-up's command line (the masks and the curated gate), under which these units cannot run; the scripts here are those scripts with the hash manifest, the dead-man timer and the EGL smoke test taken out, and the live
/etccopies where they were newer. The first package boot waits on the command-line change (a DTB round), and on #125's decision about slot marking on the 9a. One thing to look at on that first boot:gs_decongetsscreen_off=2from the package's modprobe file, where the curated start had been passingscreen_off=0on its own line.Relation to #74: h4rkl's package covers first light on a second 9a (display at 60 Hz, a touch timer); this one carries the rest. Its
linux-modules-cleanupdrop-in and the scratch-root test pattern are here. I'd suggest #74 rebases its remaining pieces (the descriptor notes, the touch retry marker) onto this once it lands; said so there.