summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/build.sh
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2013-11-06 19:29:09 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2013-11-06 19:29:09 +0000
commit7e73a64fd4705f4981049dafc4fa351814c47728 (patch)
treed34dfe2c43f00f5c4ace0e56a2585d2f390f8bff /OvmfPkg/build.sh
parent75f630347cace34e2d3abed2a5556ba71cfc50a9 (diff)
downloadedk2-7e73a64fd4705f4981049dafc4fa351814c47728.tar.gz
edk2-7e73a64fd4705f4981049dafc4fa351814c47728.tar.bz2
edk2-7e73a64fd4705f4981049dafc4fa351814c47728.zip
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 <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
Diffstat (limited to 'OvmfPkg/build.sh')
-rwxr-xr-xOvmfPkg/build.sh14
1 files 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