If the user has set the QEMU_COMMAND environment variable,
then use it when running QEMU. This can be useful for running
OVMF with development builds of QEMU.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14825
6f19259b-4bc3-4df7-8a09-
765794883524
case $PROCESSOR in
IA32)
Processor=Ia32
- if [ -x `which qemu-system-i386` ]; then
+ if [ -n "$QEMU_COMMAND" ]; then
+ #
+ # The user set the QEMU_COMMAND variable. We'll use it to run QEMU.
+ #
+ :
+ elif [ -x `which qemu-system-i386` ]; then
QEMU_COMMAND=qemu-system-i386
elif [ -x `which qemu-system-x86_64` ]; then
QEMU_COMMAND=qemu-system-x86_64
;;
X64)
Processor=X64
- QEMU_COMMAND=qemu-system-x86_64
+ if [ -z "$QEMU_COMMAND" ]; then
+ #
+ # The user didn't set the QEMU_COMMAND variable.
+ #
+ QEMU_COMMAND=qemu-system-x86_64
+ fi
;;
*)
echo Unsupported processor architecture: $PROCESSOR