Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Mar 2019 20:44:50 -0700 (PDT)
From:      "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>
To:        Warner Losh <imp@bsdimp.com>
Cc:        "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>, Konstantin Belousov <kostikbel@gmail.com>, "freebsd-arch@freebsd.org" <arch@freebsd.org>, FreeBSD Hackers <freebsd-hackers@freebsd.org>, Rebecca Cran <rebecca@bluestop.org>
Subject:   Re: Adding a new efi-update-loader script: need help understanding Makefile.inc1 for "make installworld"
Message-ID:  <201903260344.x2Q3iolq082841@gndrsh.dnsmgr.net>
In-Reply-To: <CANCZdfqpyf%2BPNMjQG2KQLY_a2a8_2Syu0_kTanc4ARmB97JTMg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> On Mon, Mar 25, 2019, 3:28 AM Rodney W. Grimes <
> freebsd-rwg@gndrsh.dnsmgr.net> wrote:
> 
> > > On Sat, Mar 23, 2019 at 08:21:43PM -0600, Rebecca Cran via
> > freebsd-hackers wrote:
> > > > I've been working on EFI support, and have a review
> > > > (https://reviews.freebsd.org/D19588) to add a script,
> > efi-update-loader,
> > > > which will update the ESP containing the FreeBSD boot1.efi or
> > loader.efi.
> > > >
> > > > I'd like to integrate it into the build system so it gets run when
> > users
> > > > do a "make installworld", but I'm lost looking through Makefile.inc1 -
> > I
> > > > have no clue where to add the code.
> > > >
> > > > Does anyone understand where and what to add?
> > >
> > > Can we take use of the opportunity and finally stop installing loader
> > > at installworld target at all, please ?
> > >
> > > Add e.g. installloader target which would do whatever needed to loader.
> >
> > +1  boot code and loaders should  always be seperated from the
> > install target.  Historically this was casued by the fact that
> > the boot code and loader lived outside the file system and
> > required operations beyond updating /usr/mdec (very ancient)
> > or /boot/boot* (historical).  Now that /boot/loader* is an
> > immeditate effect on the bootability of the system it makes
> > since to seperate this from the installworld target.
> >
> 
> We started installing /boot/loader with install world in FreeBSD -3.x and
> it has affected the boot ability that whole time... in the early days of
> loader, the kernel loader handoff protocol was immature enough to need a
> matched kernel. But that period lasted only a few months...  loader has
> also been weird in other ways as well, since some embedded systems used the
> one in its, while others needed an extra step. As UEFI support has matured
> we're finding there are several issues around it as well where updating the
> ESP needs to be tied to updating /boot for the system to work sometimes. It
> has grown more complex over time, so we should separate. It's been a little
> weird on all the non x86 platforms to different degrees, but now that our
> main platform is affected it's become clear we may need to change.
> 
> But we need to do so carefully as this violates POLA in a huge way, as well
> as needing doc changes in a bajillion places.

So it appears we agree, we sould do this, and we need to wear Nomex clothing
while doing so as it is an easy place to get burned badly if we do not
end up with a good set of tooling, or make mistakes along the way.

> Warner
> > Rod Grimes
-- 
Rod Grimes                                                 rgrimes@freebsd.org



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