aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-08-29 08:30:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-08-29 08:30:10 +0200
commitd71126f20c1fa792bcb40bfcba300558d9130369 (patch)
tree4cefe83416c0646d33a539ded7d1ed817ea2aad8
parentf48dadd3ee226c5a39875e8d68b29ea10b1dc9fe (diff)
Fixm1
-rwxr-xr-xtest-machine-m115
1 files changed, 12 insertions, 3 deletions
diff --git a/test-machine-m1 b/test-machine-m1
index 9992d5f..5f88a12 100755
--- a/test-machine-m1
+++ b/test-machine-m1
@@ -3,9 +3,16 @@
# Test a virtual machine with KVM on Apple M1. Notes:
#
# - Need QEMU 7 or later.
-# - Expect to find QEMU_EFI.fd next to disk.img.
+# - Expect to find QEMU_EFI.fd and QEMU_VARS.fd next to disk.img.
+# - Installing with -cdrom does not work, have to use scsi-cd:
+#
+# -device virtio-scsi-pci,id=scsi0 \
+# -drive if=none,id=cd,file=/tmp/debian-....iso \
+# -device scsi-cd,drive=cd
+#
# - Replaced -usb (EHCI) with -device qemu-xhci (XHCI).
-# - Added virtio-gpu-pci (otherwise no graphical output), added usb-kbd.
+# - Added virtio-gpu-pci (otherwise no graphical output).
+# - Added usb-kbd (otherwise no keyboard).
# - Must run on either P or E cores (https://gitlab.com/qemu-project/qemu/-/issues/1002)
# - On M1 0-3 are E, 4-7 are P (lscpu, lscpu -e)
#
@@ -73,11 +80,13 @@ fi
"${kvm[@]}" \
-M virt \
- -bios "$dir/QEMU_EFI.fd" \
\
-m 4G \
-cpu host -smp "4,sockets=1,cores=4,threads=1" \
\
+ -drive "if=pflash,format=raw,readonly=on,file=$dir/QEMU_EFI.fd" \
+ -drive "if=pflash,format=raw,file=$dir/QEMU_VARS.fd" \
+ \
-netdev "tap,id=net0,ifname=$tap,script=no" \
-device "$nic,netdev=net0,mac=$mac" \
\