Adding a new efi-update-loader script: need help understanding Makefile.inc1 for "make installworld"

Enji Cooper yaneurabeya at gmail.com
Mon Mar 25 00:32:15 UTC 2019


> On Mar 24, 2019, at 17:20, Rebecca Cran via freebsd-hackers <freebsd-hackers at freebsd.org> wrote:
> 
>> On 3/24/19 5:57 PM, Warner Losh wrote:
>> 
>> 
>> He's asking for stopping doing a make install in src/stand. I'm thinking that's a good thing. We should update the ESP's \efi\freebsd\loader.efi, but leave the\efi\boot\bootXXXX.efi alone as part of this new installloader phase. Again, only if the ESP is mounted, and we have a default spot for it. For this script, I don't think hunting for the ESP is the right way to go... which means we need to define a standard place for the ESP to be mounted, which we should do before we turn on any of these features.
>> 
>> We have the start of a generic script to update things in src/tools/boot/install-boot.sh which was supposed to install boot blocks on everything known to run FreeBSD.
> 
> 
> Only updating \efi\freebsd\loader.efi is the wrong thing to do in my opinion: there are situations like on ARM where EFI variables aren't persistent, and we need \efi\boot\bootxxxx.efi for booting. What we could do is check if QueryVariableInfo returns EFI_UNSUPPORTED, in which case we know any changes to BootXXXX variables won't survive a reboot, and we need BOOTxxxx.efi.
> 
> Is it safe to assume there's only a single ESP in the system? Is it not normal for there to be one ESP per disk for mirrored configurations, in which case each would need to be updated?
> 
> Do you envision src/tools/boot/install-boot.sh moving to /usr/sbin, or remaining where it is? We'd also need to update the ESP for binary installs using freebsd-update.

    I was wondering about builds from scratch, as well—images completely lacking boot blocks like Jenkins builds.
Thanks!
-Enji


More information about the freebsd-hackers mailing list