12 lines
912 B
Bash
Executable file
12 lines
912 B
Bash
Executable file
#!/bin/bash
|
|
# B9L rollback — restore the B5a lk1st autoboot aboot (3b8cd266, operational since 2026-09-30). Needs 9008 via HW EDL (D+ -> GND).
|
|
# Only aboot is written; boot/cache untouched. Pre-write backup of the live aboot: logs/b9/b9l/W/pre-aboot.bin (must also be 3b8cd266).
|
|
cd ~/doc/modem/jz08-aurora || exit 1
|
|
L=firehose/007050e100000000_394a2e47cf830150_fhprg_peek.bin ; O=logs/b9/b9l/rollback ; mkdir -p $O
|
|
B=b5a/aboot-lk1st-aurora-autoboot.pad1M
|
|
[ "$(sha256sum $B | cut -d' ' -f1)" = 3b8cd2667837fc7083cb28991d849f9b408a07fa743bfd05eafee7b053760f85 ] || { 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 aboot $B > $O/aboot-w.log 2>&1
|
|
edl --loader=$L r aboot $O/aboot-rb.bin > /dev/null 2>&1 ; cmp $B $O/aboot-rb.bin && echo ABOOT_RESTORED_B5A
|
|
sha256sum $B $O/aboot-rb.bin
|