Revision: 14842
          http://sourceforge.net/p/edk2/code/14842
Author:   jljusten
Date:     2013-11-12 18:35:15 +0000 (Tue, 12 Nov 2013)
Log Message:
-----------
OvmfPkg/build.sh: Enable flash for QEMU >= 1.6

If the QEMU version is found to be >= 1.6, then automatically
enable flash (using the QEMU pflash command line parameter).

QEMU supports flash since 1.2, but only if KVM is disabled.
As of QEMU 1.6, flash support should also be enabled when
KVM is used. Therefore it is safest to only enable flash for
QEMU 1.6 and newer.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>

Modified Paths:
--------------
    trunk/edk2/OvmfPkg/build.sh

Modified: trunk/edk2/OvmfPkg/build.sh
===================================================================
--- trunk/edk2/OvmfPkg/build.sh 2013-11-12 18:35:08 UTC (rev 14841)
+++ trunk/edk2/OvmfPkg/build.sh 2013-11-12 18:35:15 UTC (rev 14842)
@@ -179,17 +179,26 @@
   PLATFORMFILE=$WORKSPACE/OvmfPkg/OvmfPkg$Processor.dsc
 fi
 
-ADD_QEMU_HDA=yes
-for arg in "$@"
-do
-  case $arg in
-    -hd[a-d]|-fd[ab]|-cdrom)
-      ADD_QEMU_HDA=no
-      break
+if [[ "$RUN_QEMU" == "yes" ]]; then
+  qemu_version=$($QEMU_COMMAND -version 2>&1 | tail -1 | awk '{print $4}')
+  case $qemu_version in
+    1.[6-9].*|1.[1-9][0-9].*|2.*.*)
+      ENABLE_FLASH=yes
       ;;
   esac
-done
 
+  ADD_QEMU_HDA=yes
+  for arg in "$@"
+  do
+    case $arg in
+      -hd[a-d]|-fd[ab]|-cdrom)
+        ADD_QEMU_HDA=no
+        break
+        ;;
+    esac
+  done
+fi
+
 #
 # Uncomment this block for parameter parsing debug
 #

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to