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.
Thanks. One issue I noticed is that the POSTBUILD line runs "python". Can we use $PYTHON_COMMAND there instead? macOS (and FreeBSD) doesn't install a 'python' symlink, so for macOS you need to run python3 or python3.7 etc., while on FreeBSD we don't have python3 either, so you need to use python3.7. Apart from that, the changes seem to work nicely: the capsules were generated, and when I added 'run' to the build command line, PuTTY opened and QEMU ran.
On a related subject, I noticed last week that the build still exits with a return code of 0 if the postbuild step fails: I created https://bugzilla.tianocore.org/show_bug.cgi?id=1977 .
- Postbuild Start - TARGET is RELEASE ... Write binary output file /home/bcran/workspace/Build/Vlv2TbltDevicePkg/Capsules//TestCert/MinnowMaxRelease.cap Success cp: MinnowMaxRelease.cap: No such file or directory build.py... : error F008: Postbuild process is not success! - Failed - Build end time: 21:31:38, Jul.12 2019 Build total time: 00:00:02 build returned 0
--
Rebecca Cran