[edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu

Michael D Kinney michael.d.kinney at intel.com
Wed Jul 24 16:53:51 UTC 2019


Rebecca,

If you are interested, I prototyped using a python
script and POSTBUILD statement in the DSC file to 
support 'run' targets for OVMF in the following
branch.  This potentially allows the same code to
be used for all host OS environments to launch QEMU.

https://github.com/tianocore/edk2-staging/tree/Bug_1525_FmpDevicePkg_MultipleControllers_V2/OvmfPkg

https://github.com/tianocore/edk2-staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers_V2/OvmfPkg/PostBuild.py

https://github.com/tianocore/edk2-staging/blob/Bug_1525_FmpDevicePkg_MultipleControllers_V2/OvmfPkg/Run.py

Could also be extended to support doing either QEMU or
KVM launch with a -D flag.

Mike

> -----Original Message-----
> From: devel at edk2.groups.io
> [mailto:devel at edk2.groups.io] On Behalf Of
> rebecca at bsdio.com
> Sent: Tuesday, July 23, 2019 6:51 PM
> To: devel at edk2.groups.io; Justen, Jordan L
> <jordan.l.justen at intel.com>; Laszlo Ersek
> <lersek at redhat.com>; Ard Biesheuvel
> <ard.biesheuvel at linaro.org>
> Cc: Rebecca Cran <rebecca at bsdio.com>
> Subject: [edk2-devel] [PATCH 1/2] OvmfPkg/build.sh: use
> newer '-drive if=pflash' syntax when running qemu
> 
> Specify the firmware to use via the newer '-drive
> if=pflash' syntax which allows specifying the raw
> format and readonly parameters. This avoids warnings
> with newer version of QEMU.
> 
> Signed-off-by: Rebecca Cran <rebecca at bsdio.com>
> ---
>  OvmfPkg/build.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh index
> a2c4eff2a5..e2890ff762 100755
> --- a/OvmfPkg/build.sh
> +++ b/OvmfPkg/build.sh
> @@ -268,7 +268,7 @@ if [[ "$RUN_QEMU" == "yes" ]]; then
>    fi
>    ln -sf $FV_DIR/OVMF.fd $QEMU_FIRMWARE_DIR/bios.bin
>    if [[ "$ENABLE_FLASH" == "yes" ]]; then
> -    QEMU_COMMAND="$QEMU_COMMAND -pflash
> $QEMU_FIRMWARE_DIR/bios.bin"
> +    QEMU_COMMAND="$QEMU_COMMAND -drive
> if=pflash,format=raw,readonly,file=$QEMU_FIRMWARE_DIR/b
> ios.bin"
>    else
>      QEMU_COMMAND="$QEMU_COMMAND -L $QEMU_FIRMWARE_DIR"
>    fi
> --
> 2.22.0
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this
> group.
> 
> View/Reply Online (#44277):
> https://edk2.groups.io/g/devel/message/44277
> Mute This Topic: https://groups.io/mt/32580104/1643496
> Group Owner: devel+owner at edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [michael.d.kinney at intel.com]
> -=-=-=-=-=-=


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#44322): https://edk2.groups.io/g/devel/message/44322
Mute This Topic: https://groups.io/mt/32580104/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list