From: Takahiro Akashi <takahiro.akashi@linaro.org>
To: Masahisa Kojima <masahisa.kojima@linaro.org>
Cc: u-boot@lists.denx.de, Heinrich Schuchardt <xypron.glpk@gmx.de>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Simon Glass <sjg@chromium.org>,
Francois Ozog <francois.ozog@linaro.org>,
Mark Kettenis <mark.kettenis@xs4all.nl>,
Bin Meng <bmeng.cn@gmail.com>
Subject: Re: [PATCH v6 5/6] doc:bootmenu: add description for UEFI boot support
Date: Wed, 18 May 2022 10:31:20 +0900 [thread overview]
Message-ID: <20220518013120.GA65446@laputa> (raw)
In-Reply-To: <20220516110043.31480-6-masahisa.kojima@linaro.org>
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 <masahisa.kojima@linaro.org>
> ---
> 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 "<interface> <devnum>:<part>" 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
>
next prev parent reply other threads:[~2022-05-18 1:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-16 11:00 [PATCH v6 0/6] enable menu-driven boot device selection Masahisa Kojima
2022-05-16 11:00 ` [PATCH v6 1/6] efi_loader: menu-driven addition of UEFI boot option Masahisa Kojima
2022-05-25 1:38 ` Takahiro Akashi
2022-05-26 7:37 ` Heinrich Schuchardt
2022-06-06 0:45 ` Masahisa Kojima
2022-06-06 0:39 ` Masahisa Kojima
2022-06-13 9:44 ` Masahisa Kojima
2022-05-16 11:00 ` [PATCH v6 2/6] efi_loader: menu-driven deletion of UEFI boot variable Masahisa Kojima
2022-05-16 11:00 ` [PATCH v6 3/6] efi_loader: menu-driven update of UEFI bootorder variable Masahisa Kojima
2022-05-24 10:42 ` Heinrich Schuchardt
2022-05-26 7:49 ` Masahisa Kojima
2022-05-16 11:00 ` [PATCH v6 4/6] bootmenu: add removable media entries Masahisa Kojima
2022-05-16 11:00 ` [PATCH v6 5/6] doc:bootmenu: add description for UEFI boot support Masahisa Kojima
2022-05-18 1:31 ` Takahiro Akashi [this message]
2022-05-18 5:27 ` Masahisa Kojima
2022-05-16 11:00 ` [PATCH v6 6/6] lib/charset: fix compile warnings Masahisa Kojima
2022-06-04 6:33 ` [PATCH v6 0/6] enable menu-driven boot device selection Heinrich Schuchardt
2022-06-06 0:18 ` Masahisa Kojima
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220518013120.GA65446@laputa \
--to=takahiro.akashi@linaro.org \
--cc=bmeng.cn@gmail.com \
--cc=francois.ozog@linaro.org \
--cc=ilias.apalodimas@linaro.org \
--cc=mark.kettenis@xs4all.nl \
--cc=masahisa.kojima@linaro.org \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox