grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC][PATCH 2/2] arm: grub-install: Default to arm-efi target in EFI


From: Daniel Kiper
Subject: Re: [RFC][PATCH 2/2] arm: grub-install: Default to arm-efi target in EFI-based QEMU virt models
Date: Thu, 20 Sep 2018 15:50:13 +0200
User-agent: Mutt/1.3.28i

On Tue, Aug 28, 2018 at 01:33:48PM -0600, dann frazier wrote:
> From: dann frazier <address@hidden>
>
> We currently default to the arm-uboot target in grub-install,
> but arm-efi should be used for some systems with UEFI firmware, such as
> Tianocore/EDK2-based QEMU models. We could change the default to arm-efi
> anytime we successfully probe for an EFI runtime. However, that would
> apparently do the wrong thing on U-Boot implementations that implement the
> UEFI spec, such as those compliant with the upcoming Embedded Base Boot
> Requirements specification, as they are not required to support
> SetVariable() in runtime services.
>
> For now, whitelist QEMU linux/virt models with runtime EFI support,
> but otherwise continue to default to the arm-uboot target.
>
> Signed-off-by: dann frazier <address@hidden>
> ---
>  grub-core/osdep/basic/platform.c   |  6 +++++
>  grub-core/osdep/linux/platform.c   | 37 ++++++++++++++++++++++++++++++
>  grub-core/osdep/windows/platform.c |  6 +++++
>  include/grub/util/install.h        |  3 +++
>  util/grub-install.c                |  2 +-
>  5 files changed, 53 insertions(+), 1 deletion(-)
>
> diff --git a/grub-core/osdep/basic/platform.c 
> b/grub-core/osdep/basic/platform.c
> index 4b5502aeb..a7dafd85a 100644
> --- a/grub-core/osdep/basic/platform.c
> +++ b/grub-core/osdep/basic/platform.c
> @@ -18,6 +18,12 @@
>
>  #include <grub/util/install.h>
>
> +const char *
> +grub_install_get_default_arm_platform (void)
> +{
> +  return "arm-uboot";
> +}
> +
>  const char *
>  grub_install_get_default_x86_platform (void)
>  {
> diff --git a/grub-core/osdep/linux/platform.c 
> b/grub-core/osdep/linux/platform.c
> index d278c299b..835aa4856 100644
> --- a/grub-core/osdep/linux/platform.c
> +++ b/grub-core/osdep/linux/platform.c
> @@ -121,6 +121,43 @@ is_efi (void)
>    return 0;
>  }
>
> +static int
> +is_virt (void)
> +{
> +  FILE *fp;
> +  char *buf = NULL;
> +  int ret = 0;
> +  size_t len = 0;
> +  const char qemu_virt[] = "linux,dummy-virt";

Do we really need qemu_virt variable? It is used only in one place.

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]