Re: The state of UEFI support in the Kernel and installer

From: Warner Losh <imp_at_bsdimp.com>
Date: Tue, 6 Sep 2016 11:10:17 -0600
On Tue, Sep 6, 2016 at 10:26 AM, Allan Jude <allanjude_at_freebsd.org> wrote:
>> The other problem is that as far as I can tell, there is no code that creates the EFI boot entry in any case.  By default, the installer just moves either boot1.efi or loader.efi (not sure) to:
>> (ESP)/EFI/bootx64.efi,
>> which is the default location for EFI firmware.  I was wondering if the kernel has the requisite API/driver for adding EFI boot entries yet.  On (Arch) Linux, you can add an entry to the NVRAM with a tool called bootctl, which is part of the sd-boot package.
>>
>> Also, wondering if FreeBSD has any plan to add something like initramfs/EFIStub booting, which allows for much easier bootloader configuration with sd-boot than the current FreeBSD EFI bootloader, which must be chainloaded and has its configuration stored off of the ESP.
>>
>
> For historic reasons, users expect to configure the loader via
> /boot/loader.conf not by modifying files on the ESP.

Not entirely true.

We need to support the EFI boot manager protocol (the EFI boot
entries) to properly support next boot, as well as supporting booting
off any partition. The boot manager protocol is done with EFI
environment variables, so there's nothing to change in the ESP. The
rub is to set a EFI variable you have to call runtime services, and to
do that you have to setup a mapping table before calling
ExitBootServices and that's trickier than it sounds. I've been working
on this, but haven't finished.

Warner
Received on Tue Sep 06 2016 - 15:10:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:07 UTC