#!/bin/bash # B12R rollback - restore the B12Q cache (59272cd3: Alpine primary root, kernel b10b5 without nf_tables). Needs 9008 via HW EDL. boot/aboot/userdata untouched # (if aurora-router was added to the default runlevel it just logs "kernel has no nf_tables" under b10b5). Deeper: b12/b12q/B12Q-rollback.sh (B12P). cd ~/doc/modem/jz08-aurora || exit 1 L=firehose/007050e100000000_394a2e47cf830150_fhprg_peek.bin ; O=logs/b12/b12r/rollback ; mkdir -p $O B=b12/b12q/cache/cache-extlinux-b12q.img [ "$(sha256sum $B | cut -d' ' -f1)" = 59272cd3fb45a9388934110b345a0e320d62a3199b52aa0c47ec10eb79352aae ] || { 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_B12Q sha256sum $B $O/cache-rb.bin