From owner-freebsd-arch@freebsd.org Tue Mar 26 04:58:07 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 86A881562A80 for ; Tue, 26 Mar 2019 04:58:07 +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 DD091756DF for ; Tue, 26 Mar 2019 04:58:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.ysv.freebsd.org (Postfix) id A05F31562A7D; Tue, 26 Mar 2019 04:58:06 +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 7AB1E1562A7B for ; Tue, 26 Mar 2019 04:58:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (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 1DD96756DC for ; Tue, 26 Mar 2019 04:58:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x831.google.com with SMTP id v32so13108714qtc.10 for ; Mon, 25 Mar 2019 21:58:06 -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=a67+bSvzKlmkEKTaFgxjooU1ufiuKiUj9IubDgqW8zM=; b=W4sApfGa/Go/PRLdi0Q3E1T4cUD6SVkdM0riskSO1XVWDMlw4z1f8wIpUAj0VgtxPq NiHLhXad3HuZn0vDYwwYiLN75+Uiwfysh65GbSNHvbXJCk3z9WQZEOdv4D6NzimVrFbq aLNLPxBbuWAUhbwqnx49dwG8G5ysNlFicw3BKoebBFNVm5J22i9HQD8D8awyYMCE2Fd1 0lFx6iTclIzd2PIx20zZkUq/q/wFwbd5GhmWkCWkHsMz+pNjov44VHbw/F7mfVBTk2my Nn8L+TGkNVfc56NEvrRWh3dZ3vthDrTMb1nVmpVpXSJYQa+vPXyD4LpNnIIpzl6cQtAf gb+w== 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=a67+bSvzKlmkEKTaFgxjooU1ufiuKiUj9IubDgqW8zM=; b=DO2PWWUvl+Hl4MkGsFTg6yVu5qZbCrg9uKfxRumWEhAkvaYZAHXqI7avOsAm9tMBz9 8KaEvZUtEz8LpB8T5x42KeOY6oCuXXW9pv4JySOum6Q61vxbOY2BMaHu37vncKFdrqOz /HCpdRMpq2qq3LpWOG0b7165peLgTFjrFx2fgroh8N9T7DWyRGblewfNnOPms0Xrd0dx jFD1rscjqSrtniwSdvPaLmkf/UOpTczkPcJEvhIPESOWSWzxVx9uv5t3Q3Pa4/nSzCm4 q2uuc9ekqwuz8I+buOx8LnYsa+JVAslyKcGSejTyMD0N1OicRZ3HHqqN+8GAgu/u7MLV YxFg== X-Gm-Message-State: APjAAAUoq3xKxXqMXlmBLcon6E7xsmOXbUfHXwrRbda8idV76RNjqxDJ vi0ZryOO4DKW9yeCCqhSRZx4QB6l9FvsYPYty3nc3w== X-Google-Smtp-Source: APXvYqzl2kwbYxTQ7T8G+O0F7RSD622lpyiZn1k6YYrQ/GTeCpMNikbqKqQBa7NWJx1at5sTD8iiXyS6suy7ZSrWyMU= X-Received: by 2002:a0c:b501:: with SMTP id d1mr24240075qve.115.1553576285641; Mon, 25 Mar 2019 21:58:05 -0700 (PDT) MIME-Version: 1.0 References: <2c1aef87-5408-7736-9039-7fc6a1214102@FreeBSD.org> <201903260348.x2Q3mFEg082866@gndrsh.dnsmgr.net> In-Reply-To: <201903260348.x2Q3mFEg082866@gndrsh.dnsmgr.net> From: Warner Losh Date: Mon, 25 Mar 2019 22:57:53 -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: John Baldwin , Konstantin Belousov , "freebsd-arch@freebsd.org" , FreeBSD Hackers , Rebecca Cran X-Rspamd-Queue-Id: 1DD96756DC X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.995,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,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: Tue, 26 Mar 2019 04:58:07 -0000 On Mon, Mar 25, 2019, 9:48 PM Rodney W. Grimes < freebsd-rwg@gndrsh.dnsmgr.net> wrote: > > On 3/25/19 8:05 AM, Warner Losh wrote: > > > 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. > > > > I think we should treat files on the ESP the same way we treat other boot > > blocks. installworld should continue to install the latest version into > > /boot (e.g. /boot/boot that holds UFS boot1 + boot2), but then some other > > tool is used by the user to copy the updated loader.efi into the ESP. > > > > I think the main difference here is that traditionally other boot blocks > > didn't change very often, so no one really needed to update it them > > post-install. loader.efi changes often enough we probably need to > document > > updating the ESP as an optional step in the upgrade process. I think > > having an automagical script will probably go sideways, but standardizing > > where to mounting the ESP (or ESPs when doing RAID mirroring, etc.) means > > we can provide a script with defaults (or instructions) that work with > > the standardized approach. > > Is there anyway to stash an easy to extract "version" in > loader.* so that a Makefile/.sh script could easily check > to see that your boot code is == `uname -KU` and just emit > a warning at the end of installworld? > No. There is no simple version we can check to make sure things are a matched set.. Warner > John Baldwin > -- > Rod Grimes > rgrimes@freebsd.org >