updated vqemu
This version supports using a config file in a place other than in the current directory using the -config parameter. Use as:
vqemu -config config-file qemu-parameters
E.g.
vqemu -config ~/.vqemurc.minix -S
-config must be the first parameter to vqemu, and config-file the second.
Also vqemu supports the new -isa switch. If if you put PCI=off or ISA=on in your config file, vqemu passes the -isa switch. The new default is to use PCI.
If you're using an old CVS version of qemu that still has -pci, you can set DEFINE_ISA_SWITCH=off (or any other value besides 'on') in the script and vqemu will pass the -pci option UNLESS PCI=off or ISA=on in your config file.
Signature · 2 lines
Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection.
#! /bin/sh
# DEFINE_ISA_SWITCH is used to tell whether or not our version of qemu
# supports the -isa switch. If it does we use that (and pci becomes # default) if not we use -pci switch (and isa becomes default). DEFINE_ISA_SWITCH=on
if [ "$1" = "-config" ]; then
. $2 shift 2 else . ./.qemurc fi comline=`which qemu` if [ -n "$qemu" ]; then comline="$qemu"
fi
if [ "$vde" = "on" ]; then
comline="vdeq $comline"
fi
if [ -n "$boot" ]; then
comline="$comline -boot $boot"
fi
if [ -n "$megs" ]; then
comline="$comline -m $megs"
fi
if [ -n "$fda" ]; then
comline="$comline -fda $fda"
fi
if [ -n "$fdb" ]; then
comline="$comline -fdb $fdb"
fi
if [ -n "$hda" ]; then
comline="$comline -hda $hda"
fi
if [ -n "$hdachs" ]; then
comline="$comline -hdachs $hdachs"
fi
if [ -n "$hdb" ]; then
comline="$comline -hdb $hdb"
fi
if [ -n "$cdrom" ]; then
comline="$comline -cdrom $cdrom"
fi
if [ -n "$hdc" ]; then
comline="$comline -hda $hdc"
fi
if [ -n "$hdd" ]; then
comline="$comline -hda $hdd"
fi
if [ "$audio" = "on" ]; then
comline="$comline -enable-audio"
fi
if [ "$DEFINE_ISA_SWITCH" = "on"]; then
if [ "$pci" = "off" || "$isa" = "on" ]; then comline="$comline -isa" fi
else
if [ "$pci" = "off" || "$isa" = "on" ]; then
# do nothing
else
# make sure that PCI is the default comline="$comline -pci"
fi
fi
if [ -n "$macaddr" ]; then
comline="$comline -macaddr $macaddr"
fi
if [ "$cirrus" = "on" ]; then
comline="$comline -cirrusvga"
fi
if [ "$localtime" = "on" ]; then
comline="$comline -localtime"
fi
if [ "$usernet" = "on" ]; then
comline="$comline -user-net"
elif [ "$usernet" = "dummy" ]; then
comline="$comline -dummy-net"
fi
if [ -n "$nics" ]; then
comline="$comline -nics $nics"
fi
if [ -n "$netscript" ]; then
comline="$comline -n $netscript"
fi
if [ "$graphic" = "off" ]; then
comline="$comline -nographic"
fi
exec $comline "$@"