Hi,
A directory of metadata files would work, but I think we could manage
with
something simpler. Just have a standard path naming convention that firmware
installs should follow. eg any firmware for use with QEMU should use a dir
named per the architecture it supports
eg
/usr/share/qemu/firmware/<arch>/<name>.{img,vars}
Problem #1: sometimes it's .../qemu-kvm/...
Today not a problem because libvirt doesn't need to know in the first
place where the qemu data directory is.
So EDK would provide
/usr/share/qemu/firmware/i686/edk2.img
/usr/share/qemu/firmware/i686/edk2.vars
/usr/share/qemu/firmware/i686/seabios.img
Problem #2: How does libvirt know whenever the image is for -bios or
-pflash?
We could encode that in the path / filename too.
While being at it we might also consider supporting non-raw formats for
flash, i.e. have edk2.{code,vars}.{raw,qcow2}.
This makes it trivial to enumerate all the firmware images available
for a particular architecture - just scan the appropriate directory
for files ending in ".img".
I'm not convinced it is that much easier in the end. Most of the work
probably is encoding the firmware list in the capabilities anyway ...
Also you can't easily attach meta data like a description, or give it a
nice name. On filesystem level I'd prefer keep the names simliar or
identical to what the edk2 build produces, but in the gui it is probably
better to present 'UEFI' instead of 'edk2' or 'ovmf' to the user.
cheers,
Gerd