[libvirt] [PATCH] qemu: Use AAVMF as UEFI default on ARMs
Cole Robinson
crobinso at redhat.com
Mon Dec 1 15:44:36 UTC 2014
On 12/01/2014 07:48 AM, Michal Privoznik wrote:
> One of the things I've spotted while playing with OVMF is, that on
> different architectures the OVMF firmware has different names. Like
> arm and aarch64: it's AAVMF_{CODE,VARS}.fd. We should reflect that.
>
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
> src/qemu/qemu.conf | 5 ++++-
> src/qemu/qemu_conf.c | 9 +++++++--
> 2 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
> index c6db568..36cacf9 100644
> --- a/src/qemu/qemu.conf
> +++ b/src/qemu/qemu.conf
> @@ -507,5 +507,8 @@
> # 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.
> +# list is searched for the master image. The UEFI firmware can be
> +# called differently on different architectures. For instance,
> +# it's OVMF on x86_64 and i686, but it's AAVMF on aarch64. The
> +# libvirt default follows this scheme.
> #nvram = [ "/usr/share/OVMF/OVMF_CODE.fd:/usr/share/OVMF/OVMF_VARS.fd" ]
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index 4764bef..6c038c3 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -107,8 +107,13 @@ void qemuDomainCmdlineDefFree(qemuDomainCmdlineDefPtr def)
> VIR_FREE(def);
> }
>
> -#define VIR_QEMU_LOADER_FILE_PATH "/usr/share/OVMF/OVMF_CODE.fd"
> -#define VIR_QEMU_NVRAM_FILE_PATH "/usr/share/OVMF/OVMF_VARS.fd"
> +#if defined(__arm__) || defined(__aarch64__)
> +# define VIR_QEMU_LOADER_FILE_PATH "/usr/share/AAVMF/AAVMF_CODE.fd"
> +# define VIR_QEMU_NVRAM_FILE_PATH "/usr/share/AAVMF/AAVMF_VARS.fd"
> +#else
> +# define VIR_QEMU_LOADER_FILE_PATH "/usr/share/OVMF/OVMF_CODE.fd"
> +# define VIR_QEMU_NVRAM_FILE_PATH "/usr/share/OVMF/OVMF_VARS.fd"
> +#endif
>
> virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
> {
>
Can we add the ability to change those paths at ./configure time? Those paths
don't apply to the recommended OVMF/AAVMF packages for fedora (Gerd's nightly
repo), and I doubt they apply to debian/ubuntu as well.
- Cole
More information about the libvir-list
mailing list