Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Mar 2019 09:05:45 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, "freebsd-arch@freebsd.org" <arch@freebsd.org>,  Rebecca Cran <rebecca@bluestop.org>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Adding a new efi-update-loader script: need help understanding Makefile.inc1 for "make installworld"
Message-ID:  <CANCZdfqpyf%2BPNMjQG2KQLY_a2a8_2Syu0_kTanc4ARmB97JTMg@mail.gmail.com>
In-Reply-To: <201903250926.x2P9QgYK078736@gndrsh.dnsmgr.net>
References:  <20190324090103.GO1923@kib.kiev.ua> <201903250926.x2P9QgYK078736@gndrsh.dnsmgr.net>

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.

Warner

--
> Rod Grimes
> rgrimes@freebsd.org
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqpyf%2BPNMjQG2KQLY_a2a8_2Syu0_kTanc4ARmB97JTMg>