FS#47101 - [ovmf] [patch] The separated code and vars binaries should be installed to be used in libvirt
Attached to Project:
Arch Linux
Opened by Andrew Chen (andrewchen) - Wednesday, 18 November 2015, 04:19 GMT
Last edited by Thomas Bächler (brain0) - Saturday, 04 March 2017, 13:55 GMT
Opened by Andrew Chen (andrewchen) - Wednesday, 18 November 2015, 04:19 GMT
Last edited by Thomas Bächler (brain0) - Saturday, 04 March 2017, 13:55 GMT
|
Details
Description:
Libvirt requires uefi code and vars to be split when it is used as the master image. As per documentation in /etc/libvirt/qemu.conf: # Location of master nvram file # # When a domain is configured to use UEFI instead of standard # BIOS it may use a separate storage for UEFI variables. If # that's the case libvirt creates the variable store per domain # using this master file as image. Each UEFI firmware can, # however, have different variables store. Therefore the nvram is # a list of strings when a single item is in form of: # ${PATH_TO_UEFI_FW}:${PATH_TO_UEFI_VARS}. # Later, when libvirt creates per domain variable store, this list is # searched for the master image. The UEFI firmware can be called # differently for different guest architectures. For instance, it's OVMF # for x86_64 and i686, but it's AAVMF for aarch64. The libvirt default # follows this scheme. #nvram = [ # "/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd", # "/usr/share/AAVMF/AAVMF_CODE.fd:/usr/share/AAVMF/AAVMF_VARS.fd" #] Patch: diff --git a/var/abs/extra/ovmf/PKGBUILD b/PKGBUILD index b86a4e2..63ceae0 100644 --- a/var/abs/extra/ovmf/PKGBUILD +++ b/PKGBUILD @@ -52,6 +52,10 @@ build() { package() { install -D -m644 "${srcdir}"/edk2/Build/OvmfIa32/RELEASE_${_toolchain_opt}/FV/OVMF.fd "${pkgdir}"/usr/share/ovmf/ovmf_ia32.bin + install -D -m644 "${srcdir}"/edk2/Build/OvmfIa32/RELEASE_${_toolchain_opt}/FV/OVMF_CODE.fd "${pkgdir}"/usr/share/ovmf/ovmf_code_ia32.bin + install -D -m644 "${srcdir}"/edk2/Build/OvmfIa32/RELEASE_${_toolchain_opt}/FV/OVMF_VARS.fd "${pkgdir}"/usr/share/ovmf/ovmf_vars_ia32.bin install -D -m644 "${srcdir}"/edk2/Build/OvmfX64/RELEASE_${_toolchain_opt}/FV/OVMF.fd "${pkgdir}"/usr/share/ovmf/ovmf_x64.bin + install -D -m644 "${srcdir}"/edk2/Build/OvmfX64/RELEASE_${_toolchain_opt}/FV/OVMF_CODE.fd "${pkgdir}"/usr/share/ovmf/ovmf_code_x64.bin + install -D -m644 "${srcdir}"/edk2/Build/OvmfX64/RELEASE_${_toolchain_opt}/FV/OVMF_VARS.fd "${pkgdir}"/usr/share/ovmf/ovmf_vars_x64.bin install -D -m644 "${srcdir}"/edk2/OvmfPkg/License.txt "${pkgdir}"/usr/share/licenses/ovmf/License.txt } |
This task depends upon
Closed by Thomas Bächler (brain0)
Saturday, 04 March 2017, 13:55 GMT
Reason for closing: Implemented
Saturday, 04 March 2017, 13:55 GMT
Reason for closing: Implemented
In case you're worried about /usr/share/ovmf/ovmf_vars_ia32.bin or /usr/share/ovmf/ovmf_vars_x64.bin being used by multiple libvirt VMs at the same time: No need to worry, libvirt actually copies that file (or whatever file is specified in its /etc/libvirt/qemu.conf) to a VM specific location in /var/lib/libvirt/ upon creating/initializing the VM.
The OVMF package seems pretty much useless to me in its current state without the above mentioned patch.
Please someone fix this. It is very simple to just include the code and vars files in the package (with Andrew's simple patch in the OP). Currently, users have to rebuild the package just to get these two/four files (https://wiki.archlinux.org/index.php/Libvirt#OVMF_-_QEMU_workaround). Having them provided by the package would make things much simpler as users would only need to set the locations in /etc/libvirt/qemu.conf.
Also, the severity should be *high*. As the wiki says "The main functionality of the application does not work". The package description for ovmf says "Tianocore UEFI firmware for qemu". But in reality, any basic user of qemu will use it through libvirt, and this package currently does nothing for libvirt support.