From 7e73a64fd4705f4981049dafc4fa351814c47728 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 6 Nov 2013 19:29:09 +0000 Subject: [PATCH] OvmfPkg/build.sh: Use QEMU_COMMAND environment variable 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 Reviewed-by: Laszlo Ersek git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14825 6f19259b-4bc3-4df7-8a09-765794883524 --- OvmfPkg/build.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh index f64ea91598..65add5c9e9 100755 --- a/OvmfPkg/build.sh +++ b/OvmfPkg/build.sh @@ -139,7 +139,12 @@ done 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 @@ -152,7 +157,12 @@ case $PROCESSOR in ;; 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