1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/sh -e
if test -n "$CONSOLE" ; then
consoleoption="console=$CONSOLE"
fi
case "$QEMU_ARCH" in
aarch64) cpuoption="-cpu cortex-a57" ;;
esac
exec qemu-system-${QEMU_ARCH} -nographic -M virt $cpuoption -smp 4 -m 2G -nodefaults -display none -serial mon:stdio \
-kernel "$OUTPUT/kernel" \
-append "root=/dev/vda $consoleoption" \
-drive if=virtio,file=$OUTPUT/rootfs.qcow2,format=qcow2,media=disk,index=1 \
-drive if=virtio,file=$OUTPUT/rwfs.qcow2,format=qcow2,media=disk,index=2 \
-drive if=virtio,file=$OUTPUT/userfs.qcow2,format=qcow2,media=disk,index=3 \
-netdev user,id=eth0,hostfwd=::2222-10.0.2.1:22 \
-device virtio-net-device,netdev=eth0
|