If this argument is used, then when QEMU is run, the -pflash parameter will be used with QEMU to enable QEMU's flash mode.
It should be used before the 'qemu' argument, since it is not a QEMU parameter, but instead it updates how build.sh runs QEMU. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Laszlo Ersek <[email protected]> --- OvmfPkg/build.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh index 65add5c..7758246 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 + if [[ "$ADD_QEMU_HDA" == "yes" ]]; then + QEMU_COMMAND="$QEMU_COMMAND -hda fat:$BUILD_ROOT_ARCH" fi - QEMU_COMMAND="$QEMU_COMMAND -L $QEMU_FIRMWARE_DIR $AUTO_QEMU_HDA $*" + QEMU_COMMAND="$QEMU_COMMAND $*" echo Running: $QEMU_COMMAND $QEMU_COMMAND exit $? -- 1.7.10.4 ------------------------------------------------------------------------------ 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-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
