From owner-freebsd-hackers@freebsd.org Sun Mar 24 23:57:24 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 1BA0215491B7 for ; Sun, 24 Mar 2019 23:57:24 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) (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 B390D6DEB1 for ; Sun, 24 Mar 2019 23:57:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x734.google.com with SMTP id k130so4320919qke.3 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=aWVXLffPILzHVqeVysz+A6OZEFF3SWwaaLg2ESuJU4PkitvxxFCIhyPgRFBl60UGfT d8L6GfP+EwOUEIm3w8LACAvaUQAd2DWnvXStbP3eGFA6GxF5OfjMOx+Qgo+9JSpRh44D dt6OFN7EwE/a4rdEwU93JV8MMDBE32CsF/12y2hs3ai6XAxcdczx8uvuNerB7lPSni0W jkRQAQbrYZ8xEtTRA8KfS2CPMl8arD7RYnkXmp+1tYG1DJg7aHeEaQQOEggY476r/0ez sEfTcpA7zO8PRPLgYiD26fgtlX10kLS2/zcefz0tUagFPV7of7NAR3DA7qp78xRtDo0p 3/Hw== X-Gm-Message-State: APjAAAXw9aw+KM0SmDDbgT/IgQA5DEmXITR4+S7G6Ee8rQ/SjIzKpRyD t6cKlH+yF0GcCwu/rC1eMlwEkfZvjm3gMN2exyLU1w== 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: B390D6DEB1 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-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: Sun, 24 Mar 2019 23:57:24 -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