From: Patrick Ohly <patrick.ohly@intel.com>
To: leonardo.sandoval.gonzalez@linux.intel.com, "Stoppa,
Igor" <igor.stoppa@intel.com>
Cc: leonardo.sandoval.gonzalez@intel.com,
openembedded-core@lists.openembedded.org
Subject: Re: [PATCH V3 3/3] runqemu: Define OECORE_MACHINE_SYSROOT on setup_sysroot
Date: Fri, 28 Aug 2015 09:29:15 +0200 [thread overview]
Message-ID: <1440746955.3006.73.camel@intel.com> (raw)
In-Reply-To: <16f26bbb5fa39e399b185cd26fe9205c2e0cc5d4.1436903712.git.leonardo.sandoval.gonzalez@linux.intel.com>
On Tue, 2015-07-14 at 20:07 +0000,
leonardo.sandoval.gonzalez@linux.intel.com wrote:
> From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
>
> At least the OVFM (UEFI Firmware for Qemu and KVM) recipe stores the BIOS
> under $OE_TMPDIR/sysroots/$MACHINE, now defined as OECORE_MACHINE_SYSROOT.
> The latter is used when searching BIOS, VGA BIOS and keymaps. As a example,
> to boot a OVFM BIOS, one can run the following command:
>
> $ runqemu qemux86-64 core-image-minimal \
> biosdir=usr/share/ovmf \
> biosfilename=bios.bin \
> nographic
>
> Note the bios* parameters: these two are needed to specify the subfolder
> (parent folder is OECORE_MACHINE_SYSROOT) and BIOS filename (without it,
> it picks a BIOS named bios-256k.bin).
While researching the nvram support question I came across the ovmf
whitepaper [1] showing how to use OVMF via "-drive
if=pflash,format=raw,file=fedora.flash" (where fedora.flash is a per-vm
copy of OVMF.fd = bios.bin in the sysroot).
I kept wondering why you were using "-bios bios.bin" instead of the
-drive method, and how that would affect nvram support. Then I found a
pretty clear statement by Laszlo Ersek, one of the OVMF co-maintainers,
saying [2] that -bios and the nvram support possible with it (storing in
an NvRam file in the EFI boot partition) are a kludge that should not be
used anymore.
So in other words, this particular patch needs further work. Perhaps add
an "ovmf" keyword (selecting the bios.bin as pflash drive), file name
handling (treat anything ending in .bin or .fd as pflash, supporting
more than one) and a OVMF env variable with a corresponding colon
separated list of pflash files?
I also wonder about the "bios.bin" name and the ".bin" suffix. I think
it would be better to stick with the upstream convention and just
install the file in the sysroot as OVMF.fd. This simplifies the file
name handling such that only .fd is special.
Note that the upstream discussion was about per-vm nvram storage. I
think in the context of runqemu it is okay to have a single file per
build configuration, because effectively we are creating a single
machine with one OS image. What's less nice is that the sysroot will get
modified when using bios.bin as pflash drive. Resetting the nvram needs
to be done with "bitbake -c clean ovmf && bitbake ovmf". Both is not
obvious.
Perhaps if runqemu picks up the file automatically from the sysroot (the
"ovmf" keyword usage), it should make a copy in tmp (on first run) and
then use that copy instead?
[1] http://www.linux-kvm.org/downloads/lersek/ovmf-whitepaper-c770f8c.txt
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764918#47
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
next prev parent reply other threads:[~2015-08-28 7:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-14 20:07 [PATCH V3 0/3] Add UEFI firmware for qemux86* leonardo.sandoval.gonzalez
2015-07-14 20:07 ` [PATCH V3 1/3] iasl: Recipe taken from the luv-yocto repository leonardo.sandoval.gonzalez
2015-09-12 22:00 ` Richard Purdie
2015-09-13 7:13 ` Fathi Boudra
2015-09-14 15:37 ` Leonardo Sandoval
2015-07-14 20:07 ` [PATCH V3 2/3] ovmf: Recipe taken from " leonardo.sandoval.gonzalez
2015-07-14 20:07 ` [PATCH V3 3/3] runqemu: Define OECORE_MACHINE_SYSROOT on setup_sysroot leonardo.sandoval.gonzalez
2015-08-28 7:29 ` Patrick Ohly [this message]
2015-08-28 13:34 ` Leonardo Sandoval
2015-08-28 18:08 ` Patrick Ohly
2015-09-02 19:40 ` Leonardo Sandoval
2015-09-04 19:13 ` Patrick Ohly
2015-08-27 13:19 ` [PATCH V3 0/3] Add UEFI firmware for qemux86* Patrick Ohly
2015-08-27 14:28 ` Paul Eggleton
2015-08-27 19:50 ` Leonardo Sandoval
2015-08-28 8:33 ` Patrick Ohly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1440746955.3006.73.camel@intel.com \
--to=patrick.ohly@intel.com \
--cc=igor.stoppa@intel.com \
--cc=leonardo.sandoval.gonzalez@intel.com \
--cc=leonardo.sandoval.gonzalez@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox