From owner-freebsd-arch@freebsd.org Sun Mar 24 23:57:25 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 2E5C015491BD for ; Sun, 24 Mar 2019 23:57:25 +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 86E8D6DEB3 for ; Sun, 24 Mar 2019 23:57:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.ysv.freebsd.org (Postfix) id 4A3E115491B9; Sun, 24 Mar 2019 23:57:24 +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 27DC415491B8 for ; Sun, 24 Mar 2019 23:57:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (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 C095C6DEB2 for ; Sun, 24 Mar 2019 23:57:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72d.google.com with SMTP id k189so4336362qkc.0 for ; Sun, 24 Mar 2019 16:57:23 -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=yCZJXOframkGITwVFoML9O1rte5dwvfAWAqdYiHRIPY=; b=gpSpe9g3H84yESz2SDYTK77j4L3nPJTSzhIJam27GDTpYaFU7CuUXoG7JFdM1+Q69K 6yHCwWQv50jOYUhjnoM2NWyS4xGrIcsH2wdHgF9Nwr4X43w/SQYvQ5akfsWdkccNHRdf PA7ZJuWBgvEIh/+usysyeuCJGAhf5DmvqAkzNEPzHf6FJIuvvSiTewMjaukZ5KFbIiBg rKKNf29p3nDmMO2CcoMo850xu9qY5/u5ZeQhvKNuYbEI63pZLMNAOxVlqlfinjtfLS4o DSaY2/hGmKIYVLlImEhMVU0UjFC2/jVEe7m3y4cBE2viQNr6EsQK3jQeAcZVt/986dau QUVA== 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=yCZJXOframkGITwVFoML9O1rte5dwvfAWAqdYiHRIPY=; b=iSEmAfMLpl4EvgIzkA9Gwkcn++g8T+NI4de7oG/CNFntIOEzOER39G3nfmmG75cu7X GY6Oy/YrzAXzH8e3CjkSItzjS09227FEntgTgoglfo1v+uLFPgTw60fRkdb8MK0u3J8n aV4BE7n73XZtOSBB5G6MzicVlwMH2x+zBd7PdRMj0s/xNNKTvc2q4mFLiF3EsoKMClIA R95zAxz6Z1GEWucoVq2skxyHODdWR5zlrrgDRuBMRNOKKy4ESHDDDVfftFN/9Ea47Uoe LwqQ2bfjpY98QmrrEEqdPbfxWK6keBK8oKeUPwsPOyxRLSkGAYh/WhivKhR7kLXJWv9T 8GsA== X-Gm-Message-State: APjAAAUsd3OpoQ4YKajwseVadQavsXXtiRq6SAb2Ndmtv9jnbhdsQui6 EdB5/99SchAXKnivFZ/522q0fiOLY5kR6/QT2v5pmZ9b X-Google-Smtp-Source: APXvYqz5al1H4Se+HcOtFX3hmr2ATebrdcdWYonJYHZxq38c+kv0/xs9OD9p9sqdw6Fq2YJh0PcCDJSQk3e2QS4GnFg= X-Received: by 2002:a05:620a:15c4:: with SMTP id o4mr17179803qkm.175.1553471842974; Sun, 24 Mar 2019 16:57:22 -0700 (PDT) MIME-Version: 1.0 References: <642fed43-0535-9ae3-6f01-a943650cd511@bluestop.org> <20190324090103.GO1923@kib.kiev.ua> In-Reply-To: From: Warner Losh Date: Sun, 24 Mar 2019 17:57:12 -0600 Message-ID: Subject: Re: Adding a new efi-update-loader script: need help understanding Makefile.inc1 for "make installworld" To: Rebecca Cran Cc: Konstantin Belousov , FreeBSD Hackers , "freebsd-arch@freebsd.org" X-Rspamd-Queue-Id: C095C6DEB2 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-7.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-1.00)[-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: Sun, 24 Mar 2019 23:57:25 -0000 On Sun, Mar 24, 2019 at 5:48 PM Rebecca Cran via freebsd-hackers < freebsd-hackers@freebsd.org> wrote: > On 3/24/19 3:01 AM, Konstantin Belousov wrote: > > > > > 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. > > > Others have suggested adding a new step as well. I'm not sure we need it > as a make target, but perhaps a generic script such as "update-loader" > that will call "efi-update-loader" if on a UEFI system, or "boot0cfg" > etc. on an MBR system (i.e. it knows how to install boot/loader code for > all systems we support)? Also, about the naming: would you prefer > 'install' or 'update' in the script name? > > > When you say "stop installing loader", do you mean stop installing > /boot/loader* entirely, or leave installworld installing those, but have > updating the ESP as the extra step? > 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. Warner