Repository navigation
omamobile-modem: allow a device-provided ordered link stack - #568
Conversation
Keep the gs201 default while allowing a device package to select its PHY and host modules. Refuse missing or mismatched parameters on already loaded modules before the inhibitor, persistent latch or any new load. Integrate synthetic parameter/order tests into the package suite and advance the package version. Co-Authored-By: OpenAI Codex <noreply@openai.com>
|
Thanks for this, and for testing the real checker and load loop rather than a copy. I checked the Pixel 7 Pro path by running main's Two things before merge:
Smaller things: please say in the comment which phone needs the list, and drop or explain "identity-gate test". Consider a path the package owns alone instead of the directory |
Do not source a device fragment as root before the bring-up latch: it could replace the marker variables or refusal function. Accept only a strict ordered module/key=value list, rejecting shell syntax before parameter checks, the inhibitor, the persistent latch or any module load. Use /usr/lib/omamobile-modem/link.conf outside the vendor provisioning tree. Stage its package-owned directory and document the device-package contract. Name the Pixel 9 Pro XL's PHY/host ordering requirement in the starter comment. Keep the gs201 default and leave version allocation to the maintainer. The complete package suite passes, including 13 actual source/guard tests. A source-evaluation negative control creates the inert marker and fails the same command-substitution assertion that the data parser passes. Co-Authored-By: Codex <codex@openai.com>
Bash read discards NUL bytes, so a malformed module or parameter could become a valid entry before the strict line pattern sees it. Reject non-ASCII-text bytes in C locale with grep's binary handling disabled, before reading lines. Read both passes through the same opened config file and fail on scan errors. Actual full-starter tests reject NUL-only input and NUL in module/parameter names before the inhibitor, latch or any module load. Removing the byte filter restores the inert load trace and fails the same assertion. The full package suite passes with all sixteen link tests. Co-Authored-By: Codex <codex@openai.com>
|
I changed The device-package path is now The complete package suite and policy checks pass, including 16 actual starter/parser tests. A Independent review also found that Bash silently drops NUL bytes. The parser now checks raw ASCII text before reading lines, using the same opened file. Full-starter fixtures reject NUL-only input and NUL inside a module or parameter before inhibitor/latch/load; removing that byte check restores the inert load and fails the test. |
|
Thank you, this is exactly what I asked for, and the NUL check is a good catch I hadn't thought of. I read the parser and the tests and ran them: all 16 pass, and they fail when I take out the binary-byte check or weaken the symlink check. With no I'll merge this and set the version and title at merge. Two small edits I'll make while squashing, unless you'd rather push them: the README's last sentence about the version is a note for this PR rather than for the phone, and "the Pixel 9 Pro XL needs a separate PHY" becomes "is expected to need" until that kernel is public. The first device package that ships a |
Review of derekross#424: a modprobe that failed left through set -e, not refuse(), so the sleep block stayed although the unit comment said "no CPIF" released it. Each modprobe now refuses with its module's name for the tile ("Off: cpif didn't load"). refuse() then releases the block only when none of the modem's drivers is loaded, and that list now takes the device's link stack from link.conf (derekross#568) as well as pcie_gs201_cp, shm_ipc and cpif: a module that loaded and failed in probe keeps the block, one that never loaded releases it. The latch stays either way, as it did. test_link.py runs the real starter through both cases (the first link module fails: the block goes; the second fails with the first loaded, a module named only in link.conf: it stays), with a fake systemctl so the tests never ask the host's. The inhibitor's and the modem unit's headers and cheetah's MODEM-PLAN M4.6 get the dated release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main took 0.1.17 (derekross#568) and 0.3.33 (derekross#569) for other changes and omamobile-device-tegu 0.2.11 (derekross#591), so this branch's packages move to the next numbers and the README names the modem package version the stop command comes with.
…d-enable test_link.py (derekross#568) runs the real starter with its paths redirected, but not the M6 enable file, so on a phone with /etc/omamobile/modem-suspend-enable the starter skipped the lock and four cases failed in makepkg's check(); on a laptop they passed. The file now points into the test's directory. Two cases run the starter with no lock held: without the file it refuses with "Off: no sleep inhibitor" before any driver and before the latch; with it, the drivers load and the lock is never asked for. Inverting the condition in omamobile-modem-start now fails six cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ck (derekross#568) A device package can give omamobile-modem its own ordered list of link modules (link.conf). The file is read as data, never sourced: it is refused, before the sleep inhibitor and the bring-up latch, when it is a symlink, holds a NUL or other binary byte, or names anything but module names and their parameters. Without the file the starter loads what it loaded before; the Pixel 7 Pro's path is unchanged (pcie-gs201-cp allow_hw=1).
Allow a device package to provide an ordered modem PHY/host module list in
/usr/lib/omamobile-modem/link.conf, a package-owned path outside vendor provisioning. The Pixel 9 Pro XL needs the separate PHY before its PCIe host. Without a configuration file, the gs201 load remains exactlymodprobe pcie-gs201-cp allow_hw=1.The configuration is data: one strictly validated ASCII
module key=value…record per line, with no sourcing, evaluation or shell interpolation. Empty, malformed, linked or nonregular configuration refuses before loaded-parameter checks, the sleep-inhibitor check, persistent latch or module loads. A raw byte check rejects NUL before Bash can silently drop it. Both parsing passes use the same opened file. The existing marker, hold and refusal decisions remain intact.Validation: the complete modem package suite and policy gate pass, including 16 actual starter/parser tests. Synthetic command-substitution and NUL fixtures refuse without reaching the inhibitor/latch/load. Restoring shell evaluation creates the fixture marker and fails its assertion; removing raw-byte validation restores an inert load and fails its assertion. Default load order and missing/mismatched loaded parameters remain covered.
The package stages the configuration directory and its documentation; the device package owns its optional data file. Version 0.1.17 remains provisional for the maintainer to allocate at merge. Device-specific drivers and physical modem qualification are separate. Existing MIT notices and attribution are preserved.