IMG=disk.raw
-QEMU=qemu-system-aarch64
-CPU=arm64
-
-if [ "$1" = armhf ] ; then
- CPU=cortex-a15
- QEMU=qemu-system-arm
-fi
+case "${1:=arm64}" in
+ arm64)
+ QEMU=qemu-system-aarch64
+ CPU=cortex-a53
+ NET="virtio-net-pci"
+ ;;
+ armhf)
+ QEMU=qemu-system-arm
+ CPU=cortex-a15
+ NET="e1000e"
+ ;;
+ *)
+ echo "unknown $1" >&2
+ exit 1
+ ;;
+esac
ARGS=(
-M virt -cpu $CPU -m 4G
-device virtio-blk-pci,drive=hd
-drive if=none,id=hd,file=$IMG,format=raw
# network setup
- -device virtio-net-pci,netdev=unet
+ -device $NET,netdev=unet
-netdev vde,sock=/run/vde.ctl,id=unet
)