On Thu, Oct 28, 2021 at 11:31:16PM +0300, Nikita Ermakov wrote: > From: Ard Biesheuvel <ard.biesheu...@arm.com> > > Recent Linux kernels will invoke the LoadFile2 protocol installed on > a well-known vendor media path to load the initrd if it is exposed by > the firmware. Using this method is preferred for two reasons: > - the Linux kernel is in charge of allocating the memory, and so it can > implement any placement policy it wants (given that these tend to > change between kernel versions), > - it is no longer necessary to modify the device tree provided by the > firmware. > > So let's install this protocol when handling the 'initrd' command if > such a recent kernel was detected (based on the PE/COFF image version), > and defer loading the initrd contents until the point where the kernel > invokes the LoadFile2 protocol. > > Signed-off-by: Ard Biesheuvel <ard.biesheu...@arm.com> > Signed-off-by: Nikita Ermakov <a...@altlinux.org> > --- > grub-core/loader/arm64/linux.c | 117 ++++++++++++++++++++++++++++++++- > 1 file changed, 116 insertions(+), 1 deletion(-) >
fyi, Ubuntu currently includes this patch in our in-devel release, but we'll likely have to disable it for arm64 due to a regression. We found that it casuse our PXE boot install tests to fail because grub_net_fini_hw() is called before the TFTP transfer for the initramfs is attempted. More info here: https://launchpad.net/bugs/1967562 -dann _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel