[edk2] [PATCH 01/12] OvmfPkg/build.sh: Add support for --disable-flash switch

Jordan Justen posted 12 patches 7 years, 7 months ago
[edk2] [PATCH 01/12] OvmfPkg/build.sh: Add support for --disable-flash switch
Posted by Jordan Justen 7 years, 7 months ago
This is mainly useful to test the boot paths when flash hasn't been
enabled.

Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
---
 OvmfPkg/build.sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
index 6821552025..7294198e2c 100755
--- a/OvmfPkg/build.sh
+++ b/OvmfPkg/build.sh
@@ -50,6 +50,7 @@ THREADNUMBER=1
 LAST_ARG=
 RUN_QEMU=no
 ENABLE_FLASH=no
+DISABLE_FLASH=no
 
 #
 # Pick a default tool type for a given OS
@@ -127,6 +128,9 @@ do
         shift
         break
         ;;
+      --disable-flash)
+        DISABLE_FLASH=yes
+        ;;
       --enable-flash)
         ENABLE_FLASH=yes
         ;;
@@ -228,7 +232,9 @@ if [[ "$RUN_QEMU" == "yes" ]]; then
                      awk '{print $2}')
   case $qemu_version in
     1.[6-9].*|1.[1-9][0-9].*|2.*.*)
-      ENABLE_FLASH=yes
+      if [[ "$DISABLE_FLASH" != "yes" ]]; then
+        ENABLE_FLASH=yes
+      fi
       ;;
   esac
 
@@ -283,7 +289,7 @@ if [[ "$RUN_QEMU" == "yes" ]]; then
   if [[ "$ENABLE_FLASH" == "yes" ]]; then
     QEMU_COMMAND="$QEMU_COMMAND -pflash $QEMU_FIRMWARE_DIR/bios.bin"
   else
-    QEMU_COMMAND="$QEMU_COMMAND -L $QEMU_FIRMWARE_DIR"
+    QEMU_COMMAND="$QEMU_COMMAND -L $QEMU_FIRMWARE_DIR -bios $QEMU_FIRMWARE_DIR/bios.bin"
   fi
   if [[ "$ADD_QEMU_HDA" == "yes" ]]; then
     QEMU_COMMAND="$QEMU_COMMAND -hda fat:$BUILD_ROOT_ARCH"
-- 
2.11.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel