From owner-freebsd-arch@freebsd.org Mon Mar 25 15:06:02 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 D110A1564405 for ; Mon, 25 Mar 2019 15:06:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) 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 09ED4702D5 for ; Mon, 25 Mar 2019 15:06:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.ysv.freebsd.org (Postfix) id B9A591564401; Mon, 25 Mar 2019 15:06:00 +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 9061A1564400 for ; Mon, 25 Mar 2019 15:06:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (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 22EB1702D3 for ; Mon, 25 Mar 2019 15:06:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x833.google.com with SMTP id k2so10685019qtm.1 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=h+y1mfgohvD2/TRUTapvg3h7LdefnIIEQUd8gjLy3wJ9sENcTa+sst8ddFyW91bvMR ENpVEfUnyl1AziBkoBz0oN9hSPmEjKkF15/nN770RDw1G8FnaYcNaNhdquDyxpxMMlBI a4MIjIZovwtYL01abWZdJEb77jmZu7V6nKsR146VpOFajFK5G4U2ZFtrzbEJ9uGB5sZ9 rMi3YWisdhct1cEsYflyLLhffZvRqhTb/AuiZf89Glb+peJjRd8ut8M/1iwzca61AcZp KDK4SxRgH01tLce4ep+Ct9BcGKMww8fCJrfw7oTIxleyMwZX0CmtnT+Ds/0qJ1XFhfnz AHJA== X-Gm-Message-State: APjAAAWhN1/V5CKE0YmAZ5aGfovlSFD8Oi9htwKwz8ilCyNkMMDlHJ7t npy9PfP+fx3NHQT4XE9WII8kcqpj8M7LZSXJdZS/IQ== 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: 22EB1702D3 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.979,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Mon, 25 Mar 2019 15:06:02 -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" >