From owner-freebsd-arch@freebsd.org Mon Mar 25 00:20:21 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 F379C154A03D for ; Mon, 25 Mar 2019 00:20:20 +0000 (UTC) (envelope-from rebecca@bluestop.org) 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 674286EBC6 for ; Mon, 25 Mar 2019 00:20:20 +0000 (UTC) (envelope-from rebecca@bluestop.org) Received: by mailman.ysv.freebsd.org (Postfix) id 20743154A03B; Mon, 25 Mar 2019 00:20:20 +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 F1D5D154A039; Mon, 25 Mar 2019 00:20:19 +0000 (UTC) (envelope-from rebecca@bluestop.org) Received: from muon.bluestop.org (muon.bluestop.org [65.103.231.193]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A7DA6EBC5; Mon, 25 Mar 2019 00:20:19 +0000 (UTC) (envelope-from rebecca@bluestop.org) Received: from muon.bluestop.org (localhost [127.0.0.1]) by muon.bluestop.org (Postfix) with ESMTP id 36272C0A4D; Sun, 24 Mar 2019 18:21:22 -0600 (MDT) Received: from muon.bluestop.org ([127.0.0.1]) by muon.bluestop.org (muon.bluestop.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id uWGl4vsUr5MR; Sun, 24 Mar 2019 18:21:21 -0600 (MDT) Received: from photon.int.bluestop.org (unknown [65.103.231.197]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by muon.bluestop.org (Postfix) with ESMTPSA; Sun, 24 Mar 2019 18:21:21 -0600 (MDT) Subject: Re: Adding a new efi-update-loader script: need help understanding Makefile.inc1 for "make installworld" To: Warner Losh Cc: Konstantin Belousov , FreeBSD Hackers , "freebsd-arch@freebsd.org" References: <642fed43-0535-9ae3-6f01-a943650cd511@bluestop.org> <20190324090103.GO1923@kib.kiev.ua> From: Rebecca Cran Message-ID: <5cda4bb9-c10e-2b44-65db-5a9f29f498d8@bluestop.org> Date: Sun, 24 Mar 2019 18:20:17 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Rspamd-Queue-Id: 8A7DA6EBC5 X-Spamd-Bar: ------ X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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 00:20:21 -0000 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 > part of this new installloader phase. Again, only if the ESP is > mounted, and we have a default spot for it. For this script, I don't > think hunting for the 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 we know any changes to BootXXXX variables won't survive a reboot, and we need 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 installs using freebsd-update. -- Rebecca Cran