uzbek-plus/b9/b9l/b9l-fb.sh
q 4a7224c41f B9: built-in display (ST7735S SPI) in Linux and persistent B9C cache
- 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/.
2026-10-03 01:45:02 +03:00

20 lines
1.6 KiB
Bash

#!/bin/sh
# 480s side, B9L: RESET-held power-on -> current lk1st fastboot -> `fastboot boot IMG` (2nd-stage lk2nd, RAM only).
# Nothing is flashed. Logs UART + fastboot identity before/after. usage: b9l-fb.sh TAG IMG SHA256
T=$1; IMG=$2; SHA=$3; cd ~/doc/modem/jz08-aurora; O=logs/b9/b9l/$T; mkdir -p $O; A=$O/host-actions.txt
act() { echo "$(date -u +%H:%M:%S.%3N) $*" | tee -a $A; }
echo "$SHA $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/b9l-$T-$(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 "B9L $T: waiting for lk1st fastboot <EMMC_SERIAL> (power off >= 90 s, then RESET held + battery -> USB)"
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: product=$(fastboot getvar product 2>&1 | sed -n 's/^product: //p')"
{ fastboot boot $IMG 2>&1; echo "rc=$?"; } | tee -a $A
act "waiting for second-stage fastboot (or Linux NCM)"
i=0; while [ $i -lt 90 ]; do
if fastboot devices 2>/dev/null | grep -q <EMMC_SERIAL>; then act "fastboot present again: product=$(fastboot getvar product 2>&1 | sed -n 's/^product: //p') version-bootloader=$(fastboot getvar version-bootloader 2>&1 | sed -n 's/^version-bootloader: //p')"; break; fi
if ping -c1 -W1 172.16.42.1 >/dev/null 2>&1; then act "Linux NCM ping ok"; break; fi
i=$((i+1)); sleep 2
done
sleep 3; cp $U.log $O/uart.log; act "B9L $T END"