40 lines
3.8 KiB
Markdown
40 lines
3.8 KiB
Markdown
# B6P — persistent modem integration (P0–P5). Nothing written to flash.
|
||
|
||
## P0 freeze — proven source
|
||
Proven B6N implementation = `b6j/aurora-modem` aa9e9aa2… (b6j-in6.tar d5b551b5) + n.conf aa9e27af… + `b6j/n.conf` (J1 lifecycle, MODEM_REG_SM=1, T_REG=600).
|
||
Production controller `rootfs/usr/sbin/aurora-modem` = that file with diagnostic code REMOVED only (diff-b6n-vs-b6p.diff):
|
||
- removed: MODEM_RMTFS_PERSIST (J3), MODEM_HOOK_PRE_ONLINE/PRE_MM (B6K AT), MODEM_REG_SNAP, MODEM_STOP_DISABLE branch (mmcli --disable / qmicli low-power;
|
||
n.conf had it OFF), re-attach holdoff (n.conf had 0), old 180 s wait_for path (REG_SM is now the only path), `rmtfs-stop` command.
|
||
- kept verbatim: start / disconnect / stop / status / addroute, registration state machine reg_sm (local-failure checks, transition log), safety gates,
|
||
rollback-on-failure (MODEM_KEEP_ON_FAIL=0 default), stop order.
|
||
- changed: config file `/etc/aurora/modem.conf` (APN/USER/PASSWORD/AUTH/IP_TYPE/REG_TIMEOUT/ROUTES → mapped to the internal MODEM_* names);
|
||
state dir `/run/aurora-modem` (was /tmp/aurora-modem.d); rmtfs start check counts new 'registering services' lines (old: grep of an appended log
|
||
could match a previous run's line).
|
||
- `diff-old-b6-vs-b6p.diff`: vs the original b6/ (session 28) for reference.
|
||
|
||
## P1 runtime
|
||
boot → /init: eMMC all RO → NV snapshot → /firmware vfat RO + firmware path → USB NCM 172.16.42.1 → `/etc/init.d/aurora-modem start` (background)
|
||
→ controller: RO gates → rmtfs -r -P -s -v → MSS → wwan0qmi0 +2 s → SIM ready → DMS online → reg_sm (registered + PS attached, ≤600 s)
|
||
→ udevd/dbus/polkitd/ModemManager → simple-connect → IPv4 on wwanN + /32 routes (bearer DNS + ROUTES), no default route, usb0 untouched.
|
||
MSS/rmtfs/MM stay up. Reconnect: `aurora-modem disconnect` + `aurora-modem start` (MSS not restarted).
|
||
Shutdown: `/etc/init.d/aurora-modem stop` = bearer disconnect → routes → wwan DOWN → MM stop → BAM suspended → rmtfs SIGTERM → MSS offline → rmtfs exits last.
|
||
No automatic retry of MSS/rmtfs. On failure the controller rolls back with a full stop and the service stays idle.
|
||
|
||
## P2 audit (golden mm1, initramfs 250bf8ee)
|
||
- OpenRC: NOT present (no openrc, no /etc/init.d, no runlevels). PID 1 = custom `/init` (busybox sh): proc/sys/devtmpfs/configfs, eMMC setro + verify,
|
||
NV snapshot (/tmp/nv-before.txt), by-partlabel symlinks, modem FAT RO at /firmware, firmware_class path, USB gadget NCM, eMMC report, then endless UART shell.
|
||
- udev/dbus/polkit/MM: not started at boot (only by bin/mm-up or the controller). Packages: 36 Alpine v3.24 apks (linux/initramfs-mm1/dl), rmtfs 1.3, busybox-static 1.37.
|
||
- Decision (user, 2026-09-30): no OpenRC; one service script `/etc/init.d/aurora-modem` (start|stop|status) called once from /init. Kill switch: cmdline `aurora.modem=off`.
|
||
|
||
## P3 config — /etc/aurora/modem.conf (Beeline test profile; operator-published default credentials, not private)
|
||
|
||
## P4 time
|
||
Controller timing uses /proc/uptime only; LTE start/bearer do not need wall time. RAM tests check DNS/ICMP/HTTP; HTTPS optional (skipped by datatest when year < 2026).
|
||
RTC untouched, no NTP.
|
||
|
||
## P5 candidate
|
||
`out/aurora-mm1-b6p.img` (build-candidate.sh): kernel payload = golden Image.gz-dtb (0ff9c802), same header/addresses/cmdline, ramdisk =
|
||
golden initramfs.cpio.gz (exact 11 944 942 bytes, 250bf8ee) + appended gzip member overlay.cpio.gz (kernel unpacks concatenated archives; later entry
|
||
replaces /init). Golden itself is not rebuildable bit-for-bit from the current tree (built without -t → source mtimes; bin/b4b2-mm edited later),
|
||
hence the append approach. mkbootimg.py reproduces golden 38c960ef bit-for-bit from golden inputs (checked in the build).
|
||
Manifest diff (out/manifest-diff.txt): REPLACES /init; NEW /usr/sbin/aurora-modem, /etc/init.d/aurora-modem, /etc/aurora/modem.conf, dirs etc/aurora, etc/init.d.
|