#!/bin/bash # B18 rollback - restore the B15 cache (212e0ca9: Alpine primary root + router + VPN, kernel b15 = WireGuard, no USB host). Needs 9008 via HW EDL. # boot/aboot/userdata untouched (aurora-usb just reports "no usb_role switch" under b15). Deeper: b15/B15-rollback.sh (B12R). cd ~/doc/modem/jz08-aurora || exit 1 L=firehose/007050e100000000_394a2e47cf830150_fhprg_peek.bin ; O=logs/b18/rollback ; mkdir -p $O B=b15/cache/cache-extlinux-b15.img [ "$(sha256sum $B | cut -d' ' -f1)" = 212e0ca903911dad19fca00c013610cb6d5a773821c36410d8c277e34139856f ] || { 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_B15 sha256sum $B $O/cache-rb.bin