aboutsummaryrefslogtreecommitdiff
path: root/run-qemu
blob: 77ff3de0e9f12284cc4b3b8b34292433fb8b5522 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh -e

case "$QEMU_ARCH" in
  aarch64)
    qemucpu=cortex-a57
    qemuconsole=ttyAMA0 ;;
esac

exec qemu-system-${QEMU_ARCH} -nographic -M virt -cpu $qemucpu -smp 4 -m 2G -nodefaults -display none -serial mon:stdio \
  -kernel "$OUTPUT/kernel" \
  -append "root=/dev/vda console=$qemuconsole" \
  -drive if=none,file=$OUTPUT/disk-image.qcow2,format=qcow2,id=disk \
  -netdev user,id=network,hostfwd=tcp:127.0.0.1:2222-:22 \
  -device virtio-blk-pci,drive=disk \
  -device virtio-net-device,netdev=network