From owner-freebsd-arch@freebsd.org Tue Mar 26 03:45:06 2019 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B9DD155FA15 for ; Tue, 26 Mar 2019 03:45:06 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 0D4A0722BB for ; Tue, 26 Mar 2019 03:45:05 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: by mailman.ysv.freebsd.org (Postfix) id C1560155FA12; Tue, 26 Mar 2019 03:45:04 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BE0E155FA11; Tue, 26 Mar 2019 03:45:04 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B220722BA; Tue, 26 Mar 2019 03:45:03 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2Q3ipRQ082842; Mon, 25 Mar 2019 20:44:51 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2Q3iolq082841; Mon, 25 Mar 2019 20:44:50 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <201903260344.x2Q3iolq082841@gndrsh.dnsmgr.net> Subject: Re: Adding a new efi-update-loader script: need help understanding Makefile.inc1 for "make installworld" In-Reply-To: To: Warner Losh Date: Mon, 25 Mar 2019 20:44:50 -0700 (PDT) CC: "Rodney W. Grimes" , Konstantin Belousov , "freebsd-arch@freebsd.org" , FreeBSD Hackers , Rebecca Cran X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 0B220722BA X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.978,0] X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Mar 2019 03:45:06 -0000 > 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