#!/bin/bash # lk2nd-23.1 extlinux emulator (b5b/emu) on: S3 (B6P cache = current flash, regression), T4 cache candidate, and T4 fault variants. Offline, 480s. cd ~/doc/modem/jz08-aurora/r2/t4/emu; E=../../../b5b/emu; GPT=../../../logs/b5a/A3/gpt-primary-34.bin; C=/home/q/doc/modem/jz08-aurora/r2/t4/cache-extlinux-t4.img run() { python3 $E/mkmap.py $2 > map-$1.txt; $E/lk2nd-scan-emu map-$1.txt $GPT > $1.out 2>&1; echo "== $1 rc=$? :: $(grep -E "Trying to boot|Reverting|boot_linux reached|ramdisk sha256|Could not" $1.out | tr '\n' ' ' | cut -c1-260)"; } run S3-b6p-regression /home/q/doc/modem/jz08-aurora/b6p/cache-extlinux-b6p.img cmp <(grep HARNESS S3-b6p-regression.out) <(grep HARNESS ../../../b6p/emu/S3-b6p-candidate.out) && echo " S3 HARNESS lines == b6p/emu/S3-b6p-candidate.out" run S4-t4-candidate $C; grep HARNESS S4-t4-candidate.out D=$(mktemp -d); v(){ cp $C $D/$1.img; chmod u+w $D/$1.img; } v F3-no-initrd; /sbin/debugfs -w -R "rm /initramfs-t4.cpio.gz" $D/F3-no-initrd.img >/dev/null 2>&1 v F1-no-conf; /sbin/debugfs -w -R "rm /extlinux/extlinux.conf" $D/F1-no-conf.img >/dev/null 2>&1 head -c 134217728 /dev/zero > $D/F10-zeroed-cache.img for f in $D/F*.img; do run $(basename $f .img) $f; done; rm -rf $D