From owner-freebsd-hackers@freebsd.org Mon Mar 25 15:06:00 2019 Return-Path: Delivered-To: freebsd-hackers@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 893AE15643FF for ; Mon, 25 Mar 2019 15:06:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 22E7C702D2 for ; Mon, 25 Mar 2019 15:06:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82e.google.com with SMTP id v32so10608367qtc.10 for ; Mon, 25 Mar 2019 08:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FDfsshC9FKErvG/Uc+ILi7Fjxse6R0055fLkUe05UPQ=; b=kf0HGvprXrrnWEF0viPKHCNtWCxHPd87TfYFZxJ1T+21mgdJi5MgQ+1m9HgP3CHewB SkWPJLRVUDhPs9Qiq468x8AKILZQlT63GnK/+TFBgpsYN0E2g1Od2At0+qXZ5bx9T9Uj Y/t9h7DXK3mHrbLuH+yFLrFbJEbuxTHU0dnlo4QVfwB7A93ItKDLA9hA+v4P75QpLGYz ENpjgjqN8xQWJErf7RBS6Tqy54J1Co8Yn3gwnTc+3z3t0B4+r+D4sudo7DaZ/9a9Odxp C79VxLS4nP8EEIlXJviOmpo3RbVTJr3n+j8YZCZbJlydO/OpMQ/tM5NcbHfYfcw5ErDg J0Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FDfsshC9FKErvG/Uc+ILi7Fjxse6R0055fLkUe05UPQ=; b=pPKbs6CpypnJjPX3M1pCWAgoZATEUzkd8WTTFXTQzAln/O78FE7LpYCXgSVhn+wbwF JNIBFXXeHLt+VPtuYYSzXg9H6Vcm/Q+dtK7uRUCmIj+Et1lcG+4pNSFB7R4cShPI5RZH NT6pPzuIwk5ViMdp74g1IIz5zakUj7tNMnaKvhekyeB3bws7eVCjW7+jFxS9qAAKNFMR P8WKqfQIN9OEtg16iYBmoqXJyP3PGxtGJbHsG0xzrMjVb6M1F6pkuOBG9jQnIBp2xOA1 x2AMKraSR7mgAnFzrTn1y062jXMFLQ7JjPZdjEHsxWs8Ui2oCQZU++nHB8AnNH1aU22Y 49KA== X-Gm-Message-State: APjAAAUy09y6Z6U1aiHKjLEzY3Jm6uux7oY+QJAxZKozOcQI1QRGt03x wqOgyrlPwbIKwQClXqzPJ8LYFHN4JhFEEMyyXiOClEqw X-Google-Smtp-Source: APXvYqzFLUDxjfu0plK9EZWKzOJodrQLiAvkmqamurWgJG4+4IStDM+r4XQeMvhehvqZzjVIXtYQNMqYZtxXj/tlkg4= X-Received: by 2002:a0c:d2fc:: with SMTP id x57mr19537966qvh.214.1553526359472; Mon, 25 Mar 2019 08:05:59 -0700 (PDT) MIME-Version: 1.0 References: <20190324090103.GO1923@kib.kiev.ua> <201903250926.x2P9QgYK078736@gndrsh.dnsmgr.net> In-Reply-To: <201903250926.x2P9QgYK078736@gndrsh.dnsmgr.net> From: Warner Losh Date: Mon, 25 Mar 2019 09:05:45 -0600 Message-ID: Subject: Re: Adding a new efi-update-loader script: need help understanding Makefile.inc1 for "make installworld" To: "Rodney W. Grimes" Cc: Konstantin Belousov , "freebsd-arch@freebsd.org" , Rebecca Cran , FreeBSD Hackers X-Rspamd-Queue-Id: 22E7C702D2 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_SHORT(-0.98)[-0.979,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Mar 2019 15:06:00 -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. 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" >