summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/build.sh
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2013-11-12 18:35:15 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2013-11-12 18:35:15 +0000
commitd48ec970ad3fae99647fe4213294eb792e3239d2 (patch)
tree400cbacb73508d2c0255e16770e7a715bef34b1d /OvmfPkg/build.sh
parentbc9be821c7894a721c53e2782b4a546e5e4e43f9 (diff)
downloadedk2-d48ec970ad3fae99647fe4213294eb792e3239d2.tar.gz
edk2-d48ec970ad3fae99647fe4213294eb792e3239d2.tar.bz2
edk2-d48ec970ad3fae99647fe4213294eb792e3239d2.zip
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 <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@14842 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/build.sh')
-rwxr-xr-xOvmfPkg/build.sh25
1 files changed, 17 insertions, 8 deletions
diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
index 77582465b6..f3eb97c1d0 100755
--- a/OvmfPkg/build.sh
+++ b/OvmfPkg/build.sh
@@ -179,16 +179,25 @@ if [ -z "$PLATFORMFILE" ]; then
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