Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Oct 2017 17:18:24 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        "freebsd-arch@freebsd.org" <arch@freebsd.org>
Subject:   boot1.efi future
Message-ID:  <CANCZdfqWSqjdRGetoiscEKJ_dNf3JgOQ2S9mzA0v1mP9PGAy=g@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
I'd like to remove boot1.efi. It's no longer relevant. It was a useful hack
to get us going, but now it's becoming more of a liability than a win.

There's a lot of work that has been put into it so it can understand every
filesystem. However, in doing so boot1.efi has morphed into a loader.efi
without the scripting interpreter. Let's just kill boot1.efi and load the
full-featured loader directly.

boot1.efi used to have a role to play. It was a tiny, rarely changing bit
of glue in the UEFI world. It is now none of those things. It has become
rather large and bloated, and there's work to make it even more so.

My proposal is to fix the one bug in loader.efi that would preclude its use
as a primary boot loader (it sometimes guesses wrong for currdev and
loaddev). Once we've done that, we'll use it where we use boot1.efi today.
It would also simplify the load process and make it easier to implement the
full EFI Boot Manager protocol from the UEFI specifications. It should also
make secure boot easier to bring to market.

This dovetails nicely into some of the other changes on-tap for FreeBSD 12.
efibootmgr is coming soon (I'm reviewing the code from a coworker now).
There's plans to move the FreeBSD boot loader to
\efi\FreeBSD\loader-$ARCH.efi when that goes in, since we'll be able to
point the LoadOptions to that. There's plans to make the installer create
the EFI partition rather than just dd the efifat file we're doing today.
Plus, there's work underway to move all the boot block installation stuff
to a new script (install-boot) as well as efforts to make images for any
bootable system (spin).

There's lots of details to get right before we can make the final switch,
but I think it's in the interest of the project to do so.

Comments?

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqWSqjdRGetoiscEKJ_dNf3JgOQ2S9mzA0v1mP9PGAy=g>