From patchwork Mon May 16 11:00:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 572970 Delivered-To: patch@linaro.org Received: by 2002:a5d:5051:0:0:0:0:0 with SMTP id h17csp499899wrt; Mon, 16 May 2022 04:02:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzX4u7sZNUr677UDjYYxokpQG0yiPsqplIhjcI8+gBEHptDCxTEgOYeykqK0I9dBWOb6qnX X-Received: by 2002:a05:6512:1188:b0:473:a4b3:8479 with SMTP id g8-20020a056512118800b00473a4b38479mr12765141lfr.247.1652698929078; Mon, 16 May 2022 04:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652698929; cv=none; d=google.com; s=arc-20160816; b=eF4QcI4vGplCZEgoqisRvsjJ/u/PusoIHXnfYOWe3c6S+++44i4XaIspsrkrD9RzFA 29umA/XLwtaJCSCxKkybQXWKoP/2zSf+ZXiOYG0SqSvSrCffc/Y+mwKL46Vmht225WSQ 5nT18zUmUmzsdSx7i1v+q/M7ppiAJbnzFYiCOd1qR8uj2OLMAuLHOsd+nKBUOqKQ2aAX P+nHzOgRxH8pQFgdjqGKBVkAvWh718i4NShDnpbSYdpR6WXb5Wv4mdJlExpaV+N3Vdpc WC3OneWOD9mw5JlqNO+5f/y2xAeNJypGOY923wvQHfV1bnQ+Znb7+UDpGprCEDsMqFR7 uVfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=8D/m/PwRdq12czqT2TARvabqRQWCwscAL2b6uWg3Nxw=; b=GaXIGwtdunm7oTuFZWK8wHo+yKn4KsNkxx/27Rnxbd7EWcBLwMzzMa4UNVs0/bukHe y328qBlvStf3JqrON6M2Ac1ii8GWcziTxHIn5neGkpGKlBWNz5yvU5mk6DkTNU1whAwR 3WwJHRBDYEP971C6epFRjrYHn9Ici7yXXEzxAmEqFEvYrgwDQY/nTsmsemhLPNSpxpB8 otqhdIcpteGrExl/LHdwlzbA9eHJzqjyyj0zHMqFeSjhNC5giXq0LWOMOXyWIS7QmRYi kemZy/j1oBBdiiUWrbW72VNp4wrxnApGTPojeLhI+I6/W1nA57x+C48HoFlmP5Hy2Hmn Mbew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZCgiOS2Q; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id x34-20020a056512132200b00471fc8f7704si12923356lfu.8.2022.05.16.04.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 04:02:09 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZCgiOS2Q; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 61AF884268; Mon, 16 May 2022 13:01:49 +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="ZCgiOS2Q"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 75AD884248; Mon, 16 May 2022 13:00:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) (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 2CEAD8419A for ; Mon, 16 May 2022 13:00:38 +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=masahisa.kojima@linaro.org Received: by mail-pl1-x62b.google.com with SMTP id q4so14049936plr.11 for ; Mon, 16 May 2022 04:00:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8D/m/PwRdq12czqT2TARvabqRQWCwscAL2b6uWg3Nxw=; b=ZCgiOS2QmQ0eU78CPL+axzzXCh4WAhDETjfCMhdEnE7TQ69UTJjSZ2EwYwL5U64sC1 h7Xq68ADuIsRzXg+fHMknlGO+RB8q6yak20eyQjRZHnPD/bOjLcIRSNiZR17UE2py2NZ kBEEbnayNGjuZGxGA3vZ8apsH23MbflcIXCQn7/I+IqGjwCt5tPmwfCoNruZvQRj3U5g KxZJU7YX/gLhw54iOFA3xwaUwAhtzW11dsdE+am2QNP0A0SfAdvhtJ+dJ+gCIwwy/J9S csud3GHqL3876d9qVnWDXK9lsg1RmDlw47SKXQM6kGvywLLU8PRGJTkhGOWmSxuDdmCR +vMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8D/m/PwRdq12czqT2TARvabqRQWCwscAL2b6uWg3Nxw=; b=QCy+tEN4AjPFhxk1tWynRrg8pOTLvLd7ydGrSSq/inr60UTvSQf3G4OSS+c2WkDGba 6RMdQji2suoZl7ZOwI/InJqVkz1AoYKOBnJbOhRkfGVqHtKaAIVBKFoDTVRVlp9jfls9 2MTxMWpB0UpStLm5MHFjkdyG2XHsiICCeutZNxh9RQchGnOfl5dGj/T1krOKtzROqqsf 9NRCE5d3R7wm8QZNf5ZM7uKOL2JjIM7kQFG2pP5gpj9AWmMnj+H1ex/fSFiw9OCsFrTp QbrzVWF5mD1sVWWoI46UEfCDmV8QZOiug7K4la9uYJE05Ff3OQBUN8v5NvirzFt/QvHO VxMA== X-Gm-Message-State: AOAM532J6uOkpNPQLWeag3Y7pV8HIknnlFm7sFpz0JFb3vMcXDwW4qSJ 0tw5n1qiLnMj9ph+Cmqvnpr43D6ZIEa7Kg== X-Received: by 2002:a17:902:f549:b0:15e:aa35:425a with SMTP id h9-20020a170902f54900b0015eaa35425amr17094160plf.1.1652698837396; Mon, 16 May 2022 04:00:37 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id q2-20020a170902edc200b0016173113c50sm2446480plk.92.2022.05.16.04.00.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 04:00:37 -0700 (PDT) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Francois Ozog , Mark Kettenis , Masahisa Kojima , Bin Meng Subject: [PATCH v6 5/6] doc:bootmenu: add description for UEFI boot support Date: Mon, 16 May 2022 20:00:41 +0900 Message-Id: <20220516110043.31480-6-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220516110043.31480-1-masahisa.kojima@linaro.org> References: <20220516110043.31480-1-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 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 - 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". 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". + +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") + +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 + +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"