diff options
Diffstat (limited to 'run-qemu')
-rwxr-xr-x | run-qemu | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/run-qemu b/run-qemu new file mode 100755 index 0000000..5434678 --- /dev/null +++ b/run-qemu @@ -0,0 +1,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 \ + -kernel "$OUTPUT/kernel" \ + -append "root=/dev/vda1 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 |