-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqemu.exp
executable file
·38 lines (31 loc) · 994 Bytes
/
qemu.exp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/expect -f
# Wait enough (forever) until a long-time boot
set timeout -1
#Start the guest VM
#spawn /stuff/qemu/build/qemu-system-riscv64 -M microchip-icicle-kit \
# -m 2G -smp 5 \
# -kernel ./work/vmlinux.bin \
# -dtb ./work/riscvpc.dtb \
# -initrd ./work/initramfs.cpio.gz \
# -display none -serial null \
# -serial stdio
#spawn /stuff/qemu/build/qemu-system-riscv64 -M virt \
# -M virt -nographic \
# -kernel ./work/vmlinux.bin \
# -append earlycon \
# -initrd ./work/initramfs.cpio.gz \
# -m 512m -nodefaults -no-reboot \
# -serial mon:stdio
spawn /stuff/qemu/build/qemu-system-riscv64 -M virt \
-M virt \
-cpu rv64,h=true \
-smp 1 -m 2G \
-nographic \
-kernel work/xen/xen \
-device "guest-loader,kernel=work/vmlinux.bin,addr=0x80400000,bootargs=console=hvc0 earlycon=sbi keep_bootcon" \
-device "guest-loader,initrd=work/initramfs.cpio.gz,addr=0x84000000"
expect "buildroot login: "
send "root\n"
expect "# "
send "poweroff\n"
expect "reboot: System halted"