- B9A: read-only audit of stock LK/DT: the panel is an ST7735S 128x128 on SPI (BLSP1 QUP4, 16 MHz, mode 3, D/C GPIO116, RESET GPIO118), backlight = PM8916 MPP4 current sink 40 mA. - B9B: upstream panel-mipi-dbi with the stock init sequence as firmware; MPP4 sink via pinctrl + gpio-backlight; first light with correct colours/orientation/offsets. - B9C: fbcon (6x8, 21x16) on tty1 + getty, UART console kept, aurora-display service; cache B9C b9ce13c9 written and verified, cold boots with LTE + Wi-Fi + display. - B9L (RAM only): lk2nd second stage with an msm8916 SPI panel port shows a picture before Linux. - Sanitizer: whitelist for b8/ and b9/.
26 lines
2.6 KiB
Bash
26 lines
2.6 KiB
Bash
#!/bin/sh
|
|
# 480s side, B9B RAM boot K: RESET-held power-on -> lk1st fastboot -> `fastboot boot` B9B RAM image. Nothing is flashed;
|
|
# eMMC cache stays B8F. Then waits for LTE START OK + Wi-Fi AP ENABLED and saves the display state (b9b-test.sh state).
|
|
# Visual checks (show/bl) are run separately with b9b-cmd.sh while the operator looks at the screen.
|
|
K=$1; [ -n "$K" ] || { echo "usage: $0 K"; exit 2; }
|
|
cd ~/doc/modem/jz08-aurora; O=logs/b9/b9b/ram$K; mkdir -p $O; IMG=b9/b9b/out/aurora-b9b.img
|
|
A=$O/host-actions.txt; act() { echo "$(date -u +%H:%M:%S.%3N) $*" | tee -a $A; }
|
|
tn() { { sleep 1; sed "s/\$/\r/" "$1"; sleep $2; } | ncat 172.16.42.1 23 | tr -d "\000\r"; }
|
|
echo "46e7a6822cf5dd13e50feccb7d205f9fddb155c19ba6eaab8d42d5f9fa8ecf4e $IMG" | sha256sum -c || exit 1
|
|
OLD=$(ps -eo pid,cmd | grep "[u]artlog.py /dev/ttyUSB0" | awk '{print $1}'); [ -n "$OLD" ] && kill $OLD; sleep 1
|
|
U=logs/uart/b9b-ram$K-$(date +%Y%m%d-%H%M%S); setsid nohup python3 tools/uartlog.py /dev/ttyUSB0 $U > $U.stderr 2>&1 < /dev/null &
|
|
echo $U > $O/uartlog-path
|
|
act "B9B ram$K: waiting for fastboot <EMMC_SERIAL> (power off >= 90 s, then RESET held + battery -> USB)"
|
|
if fastboot devices 2>/dev/null | grep -q <EMMC_SERIAL>; then act "already in fastboot - wait for power-off"; until ! fastboot devices 2>/dev/null | grep -q <EMMC_SERIAL>; do sleep 1; done; fi
|
|
i=0; until fastboot devices 2>/dev/null | grep -q <EMMC_SERIAL>; do i=$((i+1)); [ $i -ge 600 ] && { act "ABORT: no fastboot"; exit 1; }; sleep 2; done
|
|
act "fastboot present"; { fastboot boot $IMG 2>&1; echo "rc=$?"; } | tee -a $A
|
|
i=0; until ping -c1 -W1 172.16.42.1 >/dev/null 2>&1; do i=$((i+1)); [ $i -ge 180 ] && { act "ABORT: NCM not up"; cp $U.log $O/uart.log; exit 1; }; sleep 1; done; act "NCM ping ok"
|
|
printf 'cat /proc/device-tree/model; echo; uname -r; grep -E "START OK|FAIL in|rollback" /run/aurora-modem/lifecycle.log | tail -1\n' > $O/.w
|
|
i=0; until tn $O/.w 3 | grep -qE "^\[[0-9.]+\] .*(=== START OK|FAIL in|rollback)"; do i=$((i+1)); [ $i -ge 80 ] && { act "no START OK/FAIL after ~12 min"; break; }; sleep 6; done
|
|
tn $O/.w 3 | grep -aE "Aurora|aurora-b9|START OK|FAIL" | tee -a $A
|
|
printf 'grep -E "AP ENABLED|FAIL" /run/aurora-wifi/wifi.log | tail -1\n' > $O/.a
|
|
i=0; until tn $O/.a 3 | grep -qE "^\[[0-9.]+\] (=== AP ENABLED|FAIL)"; do i=$((i+1)); [ $i -ge 20 ] && { act "no AP ENABLED/FAIL after ~3 min"; break; }; sleep 6; done
|
|
act "wifi: $(tn $O/.a 3 | grep -E '^\[[0-9.]+\] (=== AP ENABLED|FAIL)' | tail -1)"
|
|
printf '/usr/libexec/aurora/b9b/b9b-test.sh state\n' > $O/.s
|
|
tn $O/.s 12 | sed -n '/^B9B-STATE-BEGIN/,/^B9B-STATE-END/p' > $O/state-boot.txt; act "state saved ($(wc -l < $O/state-boot.txt) lines)"
|
|
cp $U.log $O/uart.log
|