semi-automate tftpbooting with minicom

This commit is contained in:
Daniel Barlow 2024-05-26 17:32:29 +01:00
parent a3fca5bf05
commit 58bec8a40f
1 changed files with 20 additions and 0 deletions

20
boot.expect Normal file
View File

@ -0,0 +1,20 @@
# This is for use with minicom, but needs you to configure it to
# use expect as its "Script program" instead of runscript. Try
# Ctrl+A O -> Filenames and paths -> D
log_user 0
log_file -a -open stderr
set f [open "result/boot.scr"]
send "version\r"
set timeout 60
while {[gets $f line] >= 0} {
puts stderr "next line $line\r"
puts stderr "waiting for prompt\r"
expect {
"ath>" {}
"BusyBox" { puts stderr "DONE"; exit 0 }
}
send "$line\r\n"
}
puts stderr "done\r\n"
close $f