Use host CPU settings
[efitest.git] / efitest
1 #!/bin/sh
2
3 MEM=2048
4 if [ "$MACH"x = ""x ] ; then
5     MACH=x86_64
6 fi
7
8 if [ "$DISK"x = ""x ] ; then
9     DISK=efi-hard-disk.img
10 fi
11
12 if [ "$1"x = ""x ] ; then
13     CD="-cdrom ~/iso/debian-7.0-amd64-NETINST-1.iso"
14 #    CD="-drive file=~/iso/debian-7.0-amd64-NETINST-1.iso,if=virtio,media=cdrom,boot=on"
15 elif [ "$1"x = "none"x ] ; then
16     CD=""
17 else
18     if [ "$USB"x = "1"x ] ; then
19         CD="-usb -usbdevice disk:format=raw:$1 -boot d"
20     else
21         CD="-cdrom $1 -boot d"
22 #       CD="-drive file=$1,if=virtio,media=cdrom,readonly,boot=on -boot d"
23     fi
24 fi
25
26 if [ "$NOEFI"x = ""x ] ; then
27     PFLASH="-pflash $MACH-OVMF.fd -pflash $MACH-storage.fd"
28 fi
29
30 if [ "$RAID"x = "1"x ] ; then
31     RAID="-drive file=raid.img,format=raw"
32 fi
33
34 if [ "$NONET"x = "1"x ] ; then
35     NET="-net none"
36 fi
37
38 qemu-system-$MACH -m $MEM -machine pc-i440fx-2.8,accel=kvm \
39     -cpu host \
40     $PFLASH \
41     -drive file=$DISK,format=raw,if=virtio \
42     -vga qxl \
43     $RAID \
44     $NET \
45     $CD $BOOT
46
47 #    -drive format=raw,file=efi-hard-disk.img,if=none,id=mynvme -device nvme,drive=mynvme,serial=foo \
48 #    -drive file=efi-hard-disk.img,format=raw \
49
50 #    -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864 \
51 #     -serial tcp::4444,server \
52 #    -vga qxl \
53 #    -cpu SandyBridge \
54 #    -no-user-config -nodefaults \
55 #    -bios /usr/share/ovmf/OVMF.fd \
56