grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] efi: stub out __grub_efi_api when GRUB_UTIL is defined


From: Mike Gilbert
Subject: Re: [PATCH] efi: stub out __grub_efi_api when GRUB_UTIL is defined
Date: Sun, 1 Dec 2024 15:29:46 -0500

On Sun, Dec 1, 2024 at 3:20 PM Mike Gilbert <floppym@gentoo.org> wrote:
>
> On Sun, Dec 1, 2024 at 7:57 AM Ard Biesheuvel <ardb@kernel.org> wrote:
> >
> > On Sat, 30 Nov 2024 at 22:46, Mike Gilbert <floppym@gentoo.org> wrote:
> > >
> > > ms_abi is not a valid attribute on x32 (__x86_64__ && __ILP32__).
> > > This ABI should be unnecessary for utils anyway.
> > >
> >
> > These utils are host tools, right? E.g., grub-install, update-grub,
> > etc running under the OS?
>
> Yes, these are the host tools.
>
> > Why are those using headers that define EFI APIs?
>
> The "grub-file" program has grub-core/commands/file.c listed as one of
> its sources in Makefile.util.def.
>
> grub-core/commands/file.c includes grub/efi/efi.h, which pulls in
> grub/efi/api.h.

If I remove #include <grub/efi/efi.h> from grub-core/commands/file.c,
it causes a couple of errors:

grub-core/commands/file.c: In function ‘grub_cmd_file’:
grub-core/commands/file.c:392:41: error: storage size of ‘lh’ isn’t known
 392 |         struct linux_arch_kernel_header lh;
     |                                         ^~
In file included from ./include/grub/dl.h:26,
                from grub-core/commands/file.c:19:
grub-core/commands/file.c:404:44: error:
‘GRUB_LINUX_ARM_MAGIC_SIGNATURE’ undeclared (first use in this
function); did you mean ‘GRUB_LINUX_I386_MAGIC_SIGNATURE’?
 404 |             grub_cpu_to_le32_compile_time
(GRUB_LINUX_ARM_MAGIC_SIGNATURE))
     |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



reply via email to

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