From owner-freebsd-hackers@freebsd.org Mon Mar 25 00:51:27 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 00CEF154B0A5 for ; Mon, 25 Mar 2019 00:51:27 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) (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 9685F6FE82 for ; Mon, 25 Mar 2019 00:51:26 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x836.google.com with SMTP id t28so8484774qte.6 for ; Sun, 24 Mar 2019 17:51:26 -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=D8cSRfTNV/YycywAIKQPNAQnzVmklsOC9K5kQL7BZBA=; b=GDTCXE6ZcrSh4ehjybToufN1GhCEb4MiKywZXUkO2Y+Lm3tX5nopX5tXiaVyxV0VXU 11JCScXeGyJacFVIqC2sp/zPRf/6ga2cuUvxhwt9+SWzLHtGaSo/uzjEdLybcPatrshk JEB98wNkM33nLghUia03dyA4M3sO2/3QgNTnB0TN8j38NSS1qBSpTWdYcYCb7lIXYutX oPNEG7710VJ3kC9FZaUjuvjd/wxCOx5c/sC+8uhM3J3+BbPhcFahIKroLpMrLkSeuW9L nVm4tyBfRnopI9W+/3RCOvQUOOJ2BkUI+/0IloRN3XnGliKkPYQ/wgMcbtpRusLUu2+9 2RcQ== 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=D8cSRfTNV/YycywAIKQPNAQnzVmklsOC9K5kQL7BZBA=; b=jFBC0oMB+89izOFnOxkaiE/6NDlzZwwflP2COa8OpzHK/gvuDLp/oTWjvOsef8VVAS k/BEsBiCXyWS6YyO9/QfXfRBM0Sd6vpbufV+4rIiAtICmOrkXrpLdIXPvqLjR112KRP9 brnT22Rz8K1y3AxUQkh5WRXnQ+IFHrtq2hhvPraiF4g+x6r/a/P/YBsGJ8B3zBQIUzZ7 Huq/PkvT6L46y9rvXXwKzlf+Lqg3RnmlIio8yo+ayPWdPBPckAQbe7iX20XQQtTT9yBg 88xw6Sshg0ZYa/QnaPxv1ZFUHATm7IdR5XMCAq5FLacEn2MxohGctSHqA+IAaXG9B/TP ioCQ== X-Gm-Message-State: APjAAAWuOdz8P9lcqS9EXYEiRfkRXOkP77kKDqdBR1/qJwfQ1rLt+yY8 LyNaAtOpYDzQbEI8DNvd46sP4frf00GXPJ77QlgsTQ== X-Google-Smtp-Source: APXvYqwfnjvOdYNY6k1i6jmLE2WUOttXjifPQZfMIrm3I+hZ5quPU+o0dXU5eC3+lEl5c4fXnsBMsMitVmj2PDmge08= X-Received: by 2002:ac8:28d0:: with SMTP id j16mr18553323qtj.15.1553475085947; Sun, 24 Mar 2019 17:51:25 -0700 (PDT) MIME-Version: 1.0 References: <642fed43-0535-9ae3-6f01-a943650cd511@bluestop.org> <20190324090103.GO1923@kib.kiev.ua> <5cda4bb9-c10e-2b44-65db-5a9f29f498d8@bluestop.org> In-Reply-To: From: Warner Losh Date: Sun, 24 Mar 2019 18:51:13 -0600 Message-ID: Subject: Re: Adding a new efi-update-loader script: need help understanding Makefile.inc1 for "make installworld" To: Garrett Cooper Cc: Rebecca Cran , Konstantin Belousov , FreeBSD Hackers , "freebsd-arch@freebsd.org" X-Rspamd-Queue-Id: 9685F6FE82 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.978,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 00:51:27 -0000 On Sun, Mar 24, 2019, 6:32 PM Enji Cooper wrote: > > > On Mar 24, 2019, at 17:20, Rebecca Cran via freebsd-hackers < > freebsd-hackers@freebsd.org> wrote: > > > >> On 3/24/19 5:57 PM, Warner Losh wrote: > >> > >> > >> He's asking for stopping doing a make install in src/stand. I'm > thinking that's a good thing. We should update the ESP's > \efi\freebsd\loader.efi, but leave the\efi\boot\bootXXXX.efi alone as par= t > of this new installloader phase. Again, only if the ESP is mounted, and w= e > have a default spot for it. For this script, I don't think hunting for th= e > ESP is the right way to go... which means we need to define a standard > place for the ESP to be mounted, which we should do before we turn on any > of these features. > >> > >> We have the start of a generic script to update things in > src/tools/boot/install-boot.sh which was supposed to install boot blocks = on > everything known to run FreeBSD. > > > > > > Only updating \efi\freebsd\loader.efi is the wrong thing to do in my > opinion: there are situations like on ARM where EFI variables aren't > persistent, and we need \efi\boot\bootxxxx.efi for booting. What we could > do is check if QueryVariableInfo returns EFI_UNSUPPORTED, in which case w= e > know any changes to BootXXXX variables won't survive a reboot, and we nee= d > BOOTxxxx.efi. > > > > Is it safe to assume there's only a single ESP in the system? Is it not > normal for there to be one ESP per disk for mirrored configurations, in > which case each would need to be updated? > > > > Do you envision src/tools/boot/install-boot.sh moving to /usr/sbin, or > remaining where it is? We'd also need to update the ESP for binary instal= ls > using freebsd-update. > > I was wondering about builds from scratch, as well=E2=80=94images com= pletely > lacking boot blocks like Jenkins builds. > You wouldn't run installloader on those. It's also a reason I don't want to guess too much... Warner > Thanks! > -Enji