12 lines
932 B
Bash
12 lines
932 B
Bash
#!/bin/bash
|
|
# B12Q rollback - restore the B12P cache (98d061ef: LFS PID1 + Alpine chroot at /alpine). Needs 9008 via HW EDL (D+->GND). boot/aboot/userdata untouched
|
|
# (p27 keeps the B12Q packages/OpenRC; under B12P it is only mounted at /alpine). Deeper: b12/b12p/B12P-rollback.sh (B10 c3732515).
|
|
cd ~/doc/modem/jz08-aurora || exit 1
|
|
L=firehose/007050e100000000_394a2e47cf830150_fhprg_peek.bin ; O=logs/b12/b12q/rollback ; mkdir -p $O
|
|
B=b12/b12p/cache/cache-extlinux-b12p.img
|
|
[ "$(sha256sum $B | cut -d' ' -f1)" = 98d061eff0951ef5d05c9a4356bec959726f9462525325f7908a0bcc0e2e7394 ] || { echo "STOP: rollback image hash"; exit 1; }
|
|
lsusb | grep -q 05c6:9008 || { echo "STOP: no 9008"; exit 1; }
|
|
edl --loader=$L printgpt > $O/00-printgpt.log 2>&1
|
|
edl --loader=$L w cache $B > $O/cache-w.log 2>&1
|
|
edl --loader=$L r cache $O/cache-rb.bin > /dev/null 2>&1 ; cmp $B $O/cache-rb.bin && echo CACHE_RESTORED_B12P
|
|
sha256sum $B $O/cache-rb.bin
|