]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/build.sh: Use QEMU_COMMAND environment variable
authorJordan Justen <jordan.l.justen@intel.com>
Wed, 6 Nov 2013 19:29:09 +0000 (19:29 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 6 Nov 2013 19:29:09 +0000 (19:29 +0000)
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

OvmfPkg/build.sh

index f64ea91598f1f74613279d202b309c08f68fb0a9..65add5c9e93c3cce222ab0e279586d078662f035 100755 (executable)
@@ -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