script.expect (539B)
1 set timeout 30 2 3 spawn socat unix-connect:vm/console - 4 expect { 5 "stop autoboot" { send "\r" } 6 "=>" { send "\r" } 7 } 8 set fh [open "result/boot.scr"] 9 while {[gets $fh line] >= 0} { 10 expect "=>" 11 send "$line\r" 12 } 13 14 close $fh 15 16 expect { 17 "s6-linux-init" { } 18 "Reserved memory: unsupported node format, ignoring" { exit 1 } 19 timeout { exit 1 } 20 } 21 22 expect { 23 "#" { send "test -f /proc/device-tree/reserved-memory/phram-rootfs*/name && uname \r" } 24 timeout { exit 1 } 25 } 26 27 expect { 28 "Linux" { exit 0 } 29 timeout { exit 1 } 30 }