From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8FE89C433F5 for ; Wed, 18 May 2022 01:31:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 39B128426D; Wed, 18 May 2022 03:31:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="vBqS/pws"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 49C1984275; Wed, 18 May 2022 03:31:30 +0200 (CEST) Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B02DA8425D for ; Wed, 18 May 2022 03:31:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pg1-x531.google.com with SMTP id q15so800440pgr.4 for ; Tue, 17 May 2022 18:31:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=yPeZS9BmKR7N1pJQ+TbjeIYQGfQGsndVpxnZKRkTjl0=; b=vBqS/pwsHBY5nCu8RCDcJ7GIxOJ5c2PeC490cgQK0vlr0TPD6dQNRivssQ2rK50UBI CtOzi99JKA4E7kGkw8xFOyNLsBQ0VGHbLjE3IB3jMMPiynFf0B3HyTqAV8Fq/TnUBFoL aXiZVbVyt6PLQ0MC2KcRcIaKvOMhSCoARy0VHdE2M92oE+DDIXYLuQmUeBJBIU8JCZut fZyVi4uoqZnuyeVaJOFpB72Pp+T+FdP9/6x1P2HL3JR3ZS5sfBUGW5o5LnKVsvBrH2Yh 0YxoF9EL5axGxBSyEH30zzfW3E1qFv7vJN6cJZSYKhAZAxygjOPeg6KrhvXXo01kptS0 eZSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=yPeZS9BmKR7N1pJQ+TbjeIYQGfQGsndVpxnZKRkTjl0=; b=27eDbkH1VZqVCeWWNFR4RGmByMTzXOtn7OisI9kXVuhi7838HbKEvzVLLIKGYf4tNB z/9Xmi4jV12BsKgChHbgzpZsoNKtQUZoEQ2NOWOgwawS7fMwSmgrYIrxQv/NEo4PD7hp 15Li8rP/31zapsansLD9uDzyEq4W7XzrAhKR9eiOZ1hnDbd5SIg7UF/90laqCG2E6FwF nFU/iJmkNrAPTud/O3b85Z5OUwygiJYLgam6KsXR7RtdO3cxbhu8qs8wTt0rOEv5/DTm EPEoKQOhrVJwKgwOUQ4Iis5MwOAtA7pngXzdcSkAf/k+kn22W4N5sFfzT5sOYSgLoetr 58Ww== X-Gm-Message-State: AOAM531IpRa8ZCNxAlK0Gz4bt6Sf2zZVe+NR2NdPyjfun99Z0obR54dO F2aoObNwAeylpaOP9AMHOW3HWA== X-Google-Smtp-Source: ABdhPJyEG7g33O+FwtbAFDrdSUqHwdVc9XftCQc1bkv4SqzxpJ7jnkDs3kx3lSk8Q/0zKyAMDJvwNg== X-Received: by 2002:a65:4185:0:b0:399:4c59:e3b1 with SMTP id a5-20020a654185000000b003994c59e3b1mr21309319pgq.154.1652837484853; Tue, 17 May 2022 18:31:24 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:4979:a09c:3e5d:5a8e]) by smtp.gmail.com with ESMTPSA id t5-20020a17090ad14500b001d960eaed66sm227781pjw.42.2022.05.17.18.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 18:31:24 -0700 (PDT) Date: Wed, 18 May 2022 10:31:20 +0900 From: Takahiro Akashi To: Masahisa Kojima Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Francois Ozog , Mark Kettenis , Bin Meng Subject: Re: [PATCH v6 5/6] doc:bootmenu: add description for UEFI boot support Message-ID: <20220518013120.GA65446@laputa> Mail-Followup-To: Takahiro Akashi , Masahisa Kojima , u-boot@lists.denx.de, Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Francois Ozog , Mark Kettenis , Bin Meng References: <20220516110043.31480-1-masahisa.kojima@linaro.org> <20220516110043.31480-6-masahisa.kojima@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220516110043.31480-6-masahisa.kojima@linaro.org> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Kojima-san, On Mon, May 16, 2022 at 08:00:41PM +0900, Masahisa Kojima wrote: > The bootmenu enumerates the UEFI boot options > for boot device selection. > > This commit adds the description how the UEFI boot work > in bootmenu. This commit also adds "Synopsis", "Description" > and "Configuration" sections to follow the U-Boot command > documentation format. > > Signed-off-by: Masahisa Kojima > --- > Changes in v6: > - remove distro boot related contents because the distro boot > support in bootmenu is dropped ? I rejected it in my comment. I don't think we have enough consensus yet. > - update uefi entry example > - add [delay] argument of bootmenu command > - add description to enable uefi boot entry > > Changes in v5: > - follow the cmd documentation format same as other command, add "Synopsis", > "Description" add "Configuration" sections > > Newly created in v4 > > doc/usage/cmd/bootmenu.rst | 55 ++++++++++++++++++++++++++++++++++++++ > 1 file changed, 55 insertions(+) > > diff --git a/doc/usage/cmd/bootmenu.rst b/doc/usage/cmd/bootmenu.rst > index 9430f8c9aa..6b154d9655 100644 > --- a/doc/usage/cmd/bootmenu.rst > +++ b/doc/usage/cmd/bootmenu.rst > @@ -4,6 +4,16 @@ > bootmenu command > ================ > > +Synopsis > +-------- > + > +:: > + > + bootmenu [delay] > + > +Description > +----------- > + > The "bootmenu" command uses U-Boot menu interfaces and provides > a simple mechanism for creating menus with different boot items. > The cursor keys "Up" and "Down" are used for navigation through > @@ -79,6 +89,35 @@ The above example will be rendered as below:: > The selected menu entry will be highlighted - it will have inverted > background and text colors. > > +UEFI boot variable enumeration > +'''''''''''''''''''''''''''''' > + > +The bootmenu automatically generates the UEFI boot variable("BOOT####") > +in order of "BootOrder". To be strict, the bootmenu command *does not* create UEFI boot variables (except ones for removable media). So, I would suggest you to modify the text like: If enabled, the bootmenu command will automatically generate and add UEFI-related boot menu entries for * possible bootable media with default file names * user-defined UEFI boot options Then, > +The bootmenu automatically enumerates the possible bootable > +media devices supporting EFI_SIMPLE_FILE_SYSTEM_PROTOCOL. > +This auto generated entry is named as " :" format. > +(e.g. "usb 0:1") > + > When the user selects the UEFI boot > +variable entry, bootmenu sets the selected boot variable index > +to "BootNext", then call the uefi boot manager with the command > +"bootefi bootmgr". > + > +Example bootmenu is as below:: > + > + *** U-Boot Boot Menu *** > + > + mmc 0:1 > + mmc 0:2 > + debian > + nvme 0:1 > + ubuntu > + nvme 0:2 > + usb 0:2 If I understand your patch correctly, menus are initially sorted out in the order of * user-defined bootmenu_xxx variables * removable bootable media * user-defined UEFI boot options The example above looks odd. That said, it would be worth mentioning that users can changes the order among UEFI-related menus. (Right?) In addition, please describe the default action if users do not select anything. -Takahiro Akashi > + > +Configuration > +------------- > + > The "bootmenu" command is enabled by:: > > CONFIG_CMD_BOOTMENU=y > @@ -88,3 +127,19 @@ To run the bootmenu at startup add these additional settings:: > CONFIG_AUTOBOOT_KEYED=y > CONFIG_BOOTDELAY=30 > CONFIG_AUTOBOOT_MENU_SHOW=y > + > +UEFI boot variable enumeration is enabled by:: > + > + CONFIG_AUTOBOOT_MENU_SHOW=y > + > +To improve the product security, entering U-Boot console from bootmenu > +can be disabled by:: > + > + CONFIG_CMD_BOOTMENU_ENTER_UBOOT_CONSOLE=n > + > +To scan the discoverable devices connected to the buses such as > +USB and PCIe prior to bootmenu showing up, CONFIG_PREBOOT can be > +used to run the command before showing the bootmenu, i.e.:: > + > + CONFIG_USE_PREBOOT=y > + CONFIG_PREBOOT="pci enum; usb start; scsi scan; nvme scan; virtio scan" > -- > 2.17.1 >