Date: Tue, 6 Sep 2016 11:10:17 -0600 From: Warner Losh <imp@bsdimp.com> To: Allan Jude <allanjude@freebsd.org> Cc: FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: The state of UEFI support in the Kernel and installer Message-ID: <CANCZdfoU865S_L%2BZYSptdfpFNRgjKRDnJxezgiPpX46_QEYytA@mail.gmail.com> In-Reply-To: <ca94d250-8c50-09e0-bdd2-5d86b972b613@freebsd.org> References: <SN1PR10MB08452638665D7EB6A064D57090F90@SN1PR10MB0845.namprd10.prod.outlook.com> <ca94d250-8c50-09e0-bdd2-5d86b972b613@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 6, 2016 at 10:26 AM, Allan Jude <allanjude@freebsd.org> wrote: >> The other problem is that as far as I can tell, there is no code that cr= eates 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 (A= rch) Linux, you can add an entry to the NVRAM with a tool called bootctl, w= hich 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfoU865S_L%2BZYSptdfpFNRgjKRDnJxezgiPpX46_QEYytA>