uzbek-plus/logs/b4b2mm/prep-mm.sh
q 105bef466a Project Aurora: mainline ARM64 Linux on JZ08AU (MSM8916) LTE modem
Sanitized research log, build/reproducibility docs, DTS, kernel configs,
patches, initramfs sources, bootchain migration plans and test logs.
B5 direct boot PASS; B6 modem lifecycle in progress.
No dumps, NV/EFS, vendor firmware or device identifiers included.
2026-09-30 17:23:18 +03:00

12 lines
1,009 B
Bash

#!/bin/sh
# B4b2-MM prep: modem-up -> online (only if needed, same single SET as B4a) -> wait registration (GET) -> mm-up
O=/tmp/prep; mkdir -p $O; Q="qmicli -p -d /dev/wwan0qmi0"
/bin/modem-up > $O/modem-up.txt 2>&1
for i in $(seq 1 30); do [ -e /dev/wwan0qmi0 ] && [ -e /sys/class/net/wwan0 ] && break; sleep 1; done
timeout 30 $Q --dms-get-operating-mode > $O/mode.txt 2>&1
if ! grep -q "Mode: 'online'" $O/mode.txt; then timeout 30 $Q --dms-set-operating-mode=online > $O/set.txt 2>&1; echo "rc=$?" >> $O/set.txt; else echo "already online" > $O/set.txt; fi
for i in $(seq 1 30); do timeout 30 $Q --nas-get-serving-system > $O/reg.txt 2>&1; grep -q "Registration state: 'registered'" $O/reg.txt && break; sleep 3; done
killall qmi-proxy 2>/dev/null; sleep 1 # let MM start its own qmi-proxy fresh (MM uses the proxy itself)
/bin/mm-up > $O/mm-up.txt 2>&1
{ mmcli -L; mmcli -m 0 | sed -E 's/([0-9]{6,})([0-9]{4})/******\2/g'; } > $O/mmcli.txt 2>&1
tar -C /tmp -cf /tmp/prep.tar prep; echo PREP-MM-FINISHED