diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh index 65add5c9e9..77582465b6 100755 --- a/OvmfPkg/build.sh +++ b/OvmfPkg/build.sh @@ -48,6 +48,7 @@ PLATFORMFILE= THREADNUMBER=1 LAST_ARG= RUN_QEMU=no +ENABLE_FLASH=no # # Pick a default tool type for a given OS @@ -106,6 +107,9 @@ do shift break ;; + --enable-flash) + ENABLE_FLASH=yes + ;; *) BUILD_OPTIONS="$BUILD_OPTIONS $arg" ;; @@ -222,12 +226,15 @@ if [[ "$RUN_QEMU" == "yes" ]]; then mkdir $QEMU_FIRMWARE_DIR fi ln -sf $FV_DIR/OVMF.fd $QEMU_FIRMWARE_DIR/bios.bin - if [[ "$ADD_QEMU_HDA" == "yes" ]]; then - AUTO_QEMU_HDA="-hda fat:$BUILD_ROOT_ARCH" + if [[ "$ENABLE_FLASH" == "yes" ]]; then + QEMU_COMMAND="$QEMU_COMMAND -pflash $QEMU_FIRMWARE_DIR/bios.bin" else - AUTO_QEMU_HDA= + QEMU_COMMAND="$QEMU_COMMAND -L $QEMU_FIRMWARE_DIR" fi - QEMU_COMMAND="$QEMU_COMMAND -L $QEMU_FIRMWARE_DIR $AUTO_QEMU_HDA $*" + if [[ "$ADD_QEMU_HDA" == "yes" ]]; then + QEMU_COMMAND="$QEMU_COMMAND -hda fat:$BUILD_ROOT_ARCH" + fi + QEMU_COMMAND="$QEMU_COMMAND $*" echo Running: $QEMU_COMMAND $QEMU_COMMAND exit $?