Current state of hacky qemu test wrapper script
authorSteve McIntyre <steve@einval.com>
Sun, 17 Nov 2019 20:30:07 +0000 (20:30 +0000)
committerSteve McIntyre <steve@einval.com>
Sun, 17 Nov 2019 20:30:07 +0000 (20:30 +0000)
efitest [new file with mode: 0755]

diff --git a/efitest b/efitest
new file mode 100755 (executable)
index 0000000..edbf795
--- /dev/null
+++ b/efitest
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+MEM=2048
+if [ "$MACH"x = ""x ] ; then
+    MACH=x86_64
+fi
+
+if [ "$DISK"x = ""x ] ; then
+    DISK=efi-hard-disk.img
+fi
+
+if [ "$1"x = ""x ] ; then
+    CD="-cdrom ~/iso/debian-7.0-amd64-NETINST-1.iso"
+#    CD="-drive file=~/iso/debian-7.0-amd64-NETINST-1.iso,if=virtio,media=cdrom,boot=on"
+elif [ "$1"x = "none"x ] ; then
+    CD=""
+else
+    if [ "$USB"x = "1"x ] ; then
+       CD="-usb -usbdevice disk:format=raw:$1 -boot d"
+    else
+        CD="-cdrom $1 -boot d"
+#      CD="-drive file=$1,if=virtio,media=cdrom,readonly,boot=on -boot d"
+    fi
+fi
+
+if [ "$NOEFI"x = ""x ] ; then
+    PFLASH="-pflash $MACH-OVMF.fd -pflash $MACH-storage.fd"
+fi
+
+if [ "$RAID"x = "1"x ] ; then
+    RAID="-drive file=raid.img,format=raw"
+fi
+
+if [ "$NONET"x = "1"x ] ; then
+    NET="-net none"
+fi
+
+qemu-system-$MACH -m $MEM -machine pc-i440fx-2.8,accel=kvm \
+    $PFLASH \
+    -drive file=$DISK,format=raw,if=virtio \
+    -vga qxl \
+    $RAID \
+    $NET \
+    $CD $BOOT
+
+#    -drive format=raw,file=efi-hard-disk.img,if=none,id=mynvme -device nvme,drive=mynvme,serial=foo \
+#    -drive file=efi-hard-disk.img,format=raw \
+
+#    -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864 \
+#     -serial tcp::4444,server \
+#    -vga qxl \
+#    -cpu SandyBridge \
+#    -no-user-config -nodefaults \
+#    -bios /usr/share/ovmf/OVMF.fd \
+