uzbek-plus/b10/b10b3/b9c-discharge.sh
q 58dcb3d121 B10: battery charging — PM8916 LBC supervisor v4 (CHARGE/HOLD, FAULT safe clamp to 4.00 V) and persistent B10B-5 cache
- LBC supervisor v1..v4 (linux/patches/b10b3-lbc-supervisor-v3.patch + b10/b10b3/lbc-v3-to-v4-fault-clamp.diff):
  CHARGING 4.20 V/450 mA -> HOLD 4.05 V after 60 min CV -> battery -> new cycle on USB insert; FAULT = VDD_MAX 4.00 V clamp
- RAM tests C/B/D/D2/D3/D4 (safety timer only ends fast charge), B10B-4 actuator audit (VDD_MAX works, USB_SUSP does not),
  B10B-5 FAULT clamp regression, production run, warm reboot via PON reboot reason
- cache = B10B-5 c3732515 (HW EDL write, readback + full partition verify), class-A persistent validation
- test-only hooks/images are not part of the production kernel; images with the AP PSK are not published
2026-10-04 19:00:27 +03:00

17 lines
754 B
Bash

#!/bin/sh
# Pre-t1 discharge on B9C (no VADC; VBAT read by the operator's DMM): N x `yes`, stop on /tmp/b9c-dis.stop, CPU > 80 C, or after MAX s. Writes /tmp only.
N=${1:-4}; MAX=${2:-3600}; L=/tmp/b9c-dis.log
trap '' HUP
t0=$(cut -d. -f1 /proc/uptime); P=""
for i in $(seq 1 $N); do yes > /dev/null & P="$P $!"; done
echo "LOAD-START up=$t0 n=$N pids=$P" >> $L
why=timeout
while :; do
t=$(cut -d. -f1 /proc/uptime); ct=$(cat /sys/class/thermal/thermal_zone*/temp | sort -n | tail -1)
echo "L up=$t cpumax=$ct" >> $L
[ -e /tmp/b9c-dis.stop ] && { why=operator; break; }
[ "$ct" -gt 80000 ] && { why=cpu-80C; break; }
[ $((t - t0)) -ge $MAX ] && break
sleep 10
done
kill $P; echo "LOAD-STOP up=$(cut -d' ' -f1 /proc/uptime) reason=$why" >> $L