Circlean/shell_utils/get_shell.exp

20 lines
469 B
Plaintext
Raw Normal View History

#!/usr/bin/expect -f
set timeout -1
spawn qemu-system-arm -kernel tests/140730-kernel -cpu arm1176 -m 256 -M versatilepb \
-append "root=/dev/sda2 panic=1 rootfstype=ext4 rw console=ttyAMA0 console=ttyS0" \
-drive file=[lindex $argv 0],index=0,media=disk \
-monitor telnet:localhost:4444,server,nowait \
-nographic
expect "root@raspberrypi:/#"
interact +++ return
send "\r"
expect "reboot: System halted"
send "echo quit | telnet localhost 4444"