B8A audit, B8B Pronto remoteproc (fixed wcnss_mem 0x8b600000), B8C stock NV (fixes Pronto startup watchdog), B8D cfg80211/mac80211/wcn36xx -> phy0/wlan0, B8E wlan0 up + WPA2/CCMP test AP, B8F eMMC cache 857c9c30 with aurora-wifi autostart: 3/3 class-A cold boots, AP up 76-94 s after power-on, LTE unaffected. PSK, NV and PSK-bearing images are not published.
49 lines
3.7 KiB
Bash
Executable file
49 lines
3.7 KiB
Bash
Executable file
#!/bin/bash
|
|
# B8F — the ONLY write: cache := ext2 extlinux -> B8F candidate (B7C + Wi-Fi: b8d kernel, B8B DTB, NV, iw, aurora-wifi + hostapd test AP).
|
|
# Run on 480s ONLY after explicit GO. Derived 1:1 from b7/b7c/cache/B7C-write.sh (B7C_WRITE_VERIFIED 2026-10-02); only image, expected hashes,
|
|
# rollback references and log dir changed. The pre-write readback of the live cache (must be B7C 14fe453a) is kept as backup.
|
|
# Entry: HW EDL (battery on, D+->GND, plug USB, release). Never `edl reset`. Stops at first failed gate.
|
|
cd ~/doc/modem/jz08-aurora || exit 1
|
|
L=firehose/007050e100000000_394a2e47cf830150_fhprg_peek.bin
|
|
O=logs/b8/b8f/W ; A3=logs/b5a/A3 ; P=logs/b5a/A4pre ; mkdir -p $O
|
|
NEW=b8/b8f/cache/cache-extlinux-b8f.img ; NEW_SHA=857c9c300055804cab673027bc8cddc010ad04bfec5d75276d8229b84846c4b2
|
|
OLD_SHA=14fe453af6e94d414044c1c6da9eebe5c325fad842ddc5e17d09ba6b421a74cb # current cache = B7C extlinux
|
|
BOOT_SHA=e9579f33c7304cd47f487f2b61cd9226dc04fd3a63775d62b4b95fc15bd3ebff
|
|
ABOOT_SHA=3b8cd2667837fc7083cb28991d849f9b408a07fa743bfd05eafee7b053760f85
|
|
die(){ echo "STOP: $*"; exit 1; }
|
|
sha(){ sha256sum "$1" | cut -d" " -f1; }
|
|
E(){ edl --loader=$L "$@"; }
|
|
echo "== G0 inputs"
|
|
[ "$(sha $L)" = 53f193500c03248f0d671ab57bfe9ca8a42967e97f28403294b4b3f854075aca ] || die loader
|
|
[ "$(sha $NEW)" = $NEW_SHA ] && [ $(stat -c %s $NEW) = 134217728 ] || die candidate
|
|
[ "$(sha b7/b7c/cache/cache-extlinux-b7c.img)" = $OLD_SHA ] || die rollback-image
|
|
[ "$(sha logs/b7/b7c/W/11-cache-readback.bin)" = $OLD_SHA ] || die b7c-readback-backup
|
|
lsusb | grep -q 05c6:9008 || die "no 9008"
|
|
echo "== G1 identity + geometry + baseline"
|
|
E printgpt > $O/00-printgpt.log 2>&1 || die printgpt
|
|
grep -aq "Serial: *0x<SAHARA_SERIAL>" $O/00-printgpt.log || grep -aq "Mode detected: firehose" $O/00-printgpt.log || die serial
|
|
grep -a "^cache:" $O/00-printgpt.log | grep -q "Offset 0x000000004118c000, Length 0x0000000008000000" || die cache-geometry
|
|
E rs 0 34 $O/pre-gptp.bin >/dev/null 2>&1; cmp $O/pre-gptp.bin $A3/gpt-primary-34.bin || die gpt-changed
|
|
E r boot $O/pre-boot.bin >/dev/null 2>&1; [ "$(sha $O/pre-boot.bin)" = $BOOT_SHA ] || die boot-not-emmc1
|
|
E r aboot $O/pre-aboot.bin >/dev/null 2>&1; [ "$(sha $O/pre-aboot.bin)" = $ABOOT_SHA ] || die aboot-not-autoboot
|
|
E r cache $O/pre-cache.bin >/dev/null 2>&1; [ "$(sha $O/pre-cache.bin)" = $OLD_SHA ] || die cache-not-backup
|
|
echo "== W cache := candidate (LBA 2133088, 262144 sectors)"
|
|
E w cache $NEW > $O/10-cache-write.log 2>&1; echo "rc=$?"; grep -a "Wrote" $O/10-cache-write.log
|
|
E r cache $O/11-cache-readback.bin > $O/11-cache-readback.log 2>&1 || die readback-rc
|
|
sha256sum $NEW $O/11-cache-readback.bin
|
|
cmp $NEW $O/11-cache-readback.bin || die "CACHE READBACK MISMATCH — do NOT reboot; run b8/b8f/cache/B8F-rollback.sh"
|
|
echo CACHE_MATCH
|
|
echo "== V everything else unchanged"
|
|
E rs 0 34 $O/post-gptp.bin >/dev/null 2>&1; cmp $O/post-gptp.bin $A3/gpt-primary-34.bin || die gptp
|
|
E rs 7634911 33 $O/post-gptb.bin >/dev/null 2>&1; cmp $O/post-gptb.bin $A3/gpt-backup-33.bin || die gptb
|
|
E rs 305184 1024 $O/post-tzbak.bin >/dev/null 2>&1; cmp $O/post-tzbak.bin $A3/tzbak-305184.bin || die tzbak
|
|
E r boot $O/post-boot.bin >/dev/null 2>&1; [ "$(sha $O/post-boot.bin)" = $BOOT_SHA ] || die boot
|
|
E r aboot $O/post-aboot.bin >/dev/null 2>&1; [ "$(sha $O/post-aboot.bin)" = $ABOOT_SHA ] || die aboot
|
|
for p in sbl1 rpm tz hyp recovery modemst1 modemst2 fsg fsc persist; do
|
|
E r $p $O/post-$p.bin >/dev/null 2>&1; cmp $O/post-$p.bin $A3/$p.bin || die "$p changed"; echo "$p == A3"
|
|
done
|
|
for p in modem system userdata; do
|
|
E r $p $O/post-$p.bin >/dev/null 2>&1; cmp $O/post-$p.bin $P/$p.bin || die "$p changed"; echo "$p == A4pre"; rm -f $O/post-$p.bin
|
|
done
|
|
(cd $O && sha256sum *.bin > SHA256SUMS)
|
|
echo "B8F_WRITE_VERIFIED — power off fully (USB, then battery) before first boot"
|