On Tue, 23 May 2023 at 17:32, Ard Biesheuvel <a...@kernel.org> wrote: > > Switch the x86 based EFI platform builds to the generic EFI loader, > which exposes the initrd via the LoadFile2 protocol instead of the > x86-specific setup header. This will launch the Linux kernel via its EFI > stub, which performs its own initialization in the EFI boot services > context before calling ExitBootServices() and performing the bare metal > Linux boot. > > Given that only Linux kernel versions v5.8 and later support this initrd > loading method, the existing x86 loader is retained as a fallback, which > will also be used for Linux kernels built without the EFI stub. In this > case, GRUB calls ExitBootServices() before entering the Linux kernel, > and all EFI related information is provided to the kernel via struct > boot_params in the setup header, as before. > > Note that this means that booting EFI stub kernels older than v5.8 is > not supported even when not using an initrd at all. Also, the EFI > handover protocol, which has no basis in the UEFI specification, is not > implemented. > > Signed-off-by: Ard Biesheuvel <a...@kernel.org>
This patch needs the hunk below, which i failed to git add - apologies --- a/grub-core/loader/efi/linux.c +++ b/grub-core/loader/efi/linux.c @@ -360,7 +360,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), int argc, char *argv[]) { int __attribute__ ((unused)) initrd_size, initrd_pages; - void *initrd_mem = NULL; + void *__attribute__ ((unused)) initrd_mem = NULL; grub_efi_boot_services_t *b = grub_efi_system_table->boot_services; grub_efi_status_t status; _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel