From patchwork Mon Sep 12 08:33:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 604987 Delivered-To: patch@linaro.org Received: by 2002:a05:6504:2213:b0:1da:4c02:b5e7 with SMTP id z19csp2443490ltw; Mon, 12 Sep 2022 01:33:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR67Qk3Xk24+Oi3r966ExGuwSKrLPp9ya3vWw/laCTDId3fe665fRMlXm0AzHUGT3SL218li X-Received: by 2002:a05:6402:540d:b0:450:bda7:f76e with SMTP id ev13-20020a056402540d00b00450bda7f76emr16301821edb.249.1662971630451; Mon, 12 Sep 2022 01:33:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662971630; cv=none; d=google.com; s=arc-20160816; b=F5QT/uF8pKQMM2FmR+JUpau4nM7ptvAvZwbz7ypOMVYR9tZ8H9oBf3p+ev3FaRAC5b CE97UVYsQ0eTsB2yfv3OcCenUh/iDXMLwRDPhkZE4OQq/v759jWmNFcKbBmzJpPEx/mv 0Zb1Se6SY0DQhI3jPhKA/tN1kbchBcgQWOrzUqn5hKLXdiKPsLt2EA2ixlJ7sCKQ9uyQ lNQgkUW6guFWTdWw23mh3Hq8qW8OWTLbB6CY+Qe5lIJnqojqk3siclYs3srf3BDmAsk2 5yvS9nhmzhxhmxrX3kyWkqgxec+Wf9KTGXoNUtJ8GaAp/elw+YPaTOqooHWPMpQvZimi MMMQ== 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=WrDJxlh8LkANWAkJ37kLHdJ2DlUQiMncLUzDnQOCRb4=; b=Bw2udTUomnf00M8WqNIbMRYH4OjNvI0Va6k/MmF2eUGQLkfd/ofIreOss1j+reXtOk qDHjEd/q5IFEHfLOAZ32ZuQrciTMl2Hb87URSvpxaAAXtetNWsKt6C3rN+WHknh1G5p3 uIbWSz4o3u8ef/DAlBSCEAvmhWSEJtX/sVw21Uie+6QdLrOWPmoSA6GRkXPVpX6l499f yjqtbFAiIfJW7rIqo71w+oGyCnPQTRdRaOyQKrqUKBbUrMQoqgAUNtGRSHYqXm+ntp9z lVHxGs3oLywyWeZ28T8Z1TyLDuumRyHnqH7Vkb9BeuB8Aai/bwMW2uqv+Oq9Ur3/e5Vp mO9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="BaZg1p/Y"; 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 m5-20020a17090672c500b0077c2902fe63si3324465ejl.118.2022.09.12.01.33.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Sep 2022 01:33:50 -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="BaZg1p/Y"; 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 AC44C84A3E; Mon, 12 Sep 2022 10:33:33 +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="BaZg1p/Y"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0A7A084560; Mon, 12 Sep 2022 10:32:36 +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-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (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 A9DCE84B71 for ; Mon, 12 Sep 2022 10:32:15 +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-x62c.google.com with SMTP id s18so1934702plr.4 for ; Mon, 12 Sep 2022 01:32:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date; bh=WrDJxlh8LkANWAkJ37kLHdJ2DlUQiMncLUzDnQOCRb4=; b=BaZg1p/YbGWn24rdYi5Q6fKbv31EHrejhuKPgKyfLHvAEqUM3E8saoqJ/tb3BnobKo 5YY0Kn8Q9PO8CZElxhPfP9nPdT6cWcsIdG5SpNTUW+wgy9Wlvtv5YxpJqw3P13FPqE1u CY+g/U2l2nE0FLDlbJ0HjmXdeAj0pHjyuSxYoqKgWMFpolR9ihpoF2AKNKAM817hWJ9C YOK/ySSK4q7r6NxVqQ6b+KWmVLrBaEd+dNl3Gky/sXt96aeIXHAcAImQJs+vO8APuFEs 5OygjQdtkkrdZu4fCEQk5yDwxcBptAAR1/djf1Oc17CjeNmzif8UwhFGQG9wjDIu7BFO 0yEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date; bh=WrDJxlh8LkANWAkJ37kLHdJ2DlUQiMncLUzDnQOCRb4=; b=uu85a6bLsA+XN0o0upF7KFFJIIOnYEdji/HuvPCeBcO2xkX1gTn4e/L9CsnI61tEk2 bL3qehUVYAGU8YIRK4Hdbyg8rbnmHHWNrlmGohnlRvoy4bYjDDoBZPPLl6Qlbe7/9Ql8 bmeBoj8ySOYHofl7UDKIOttPJW+C2kQxGmuIISbEYgX9RKouf+71u1fzNOEHHxMCdWfR 634Nyp/JAm6TjT1Xt8n1VQon3xUBl+3ntSpt2hiGP/2JFHlB0v3Voy8L5MQjOq3Ha2Jn O/X6fPFIDISUYOYd1xcR+avmr3quAu2e5Hc+gCNm7xcKEwCNoabpO/KAH9gajadiSHMq a1Cw== X-Gm-Message-State: ACgBeo2J1berrcAPx7NTDC0EV18GT0aUnBzfc9dkpClusVOHiod8IJ06 kVJL+dTglcQnnO2fmxZ7lhg+HRx/DrHu9w== X-Received: by 2002:a17:902:710e:b0:172:7ad4:39b3 with SMTP id a14-20020a170902710e00b001727ad439b3mr26227771pll.78.1662971534841; Mon, 12 Sep 2022 01:32:14 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id d15-20020a621d0f000000b00540ad46bc1dsm4698506pfd.157.2022.09.12.01.32.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Sep 2022 01:32:14 -0700 (PDT) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Mark Kettenis , Masahisa Kojima , Bin Meng , =?utf-8?q?Marek_Beh=C3=BAn?= Subject: [PATCH v17 09/10] doc:eficonfig: add documentation for eficonfig command Date: Mon, 12 Sep 2022 17:33:58 +0900 Message-Id: <20220912083359.24510-10-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220912083359.24510-1-masahisa.kojima@linaro.org> References: <20220912083359.24510-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.6 at phobos.denx.de X-Virus-Status: Clean Add documentation for eficonfig command. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas --- No update since v15 Changes in v14: - fix typos Changes in v13: - describe how to auto boot according to the UEFI Boot option Changes in v12: - CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE condition is added to show newly added boot option No update since v10 Changes in v10: - describe how to boot system after editting by eficonfig Changes in v8: - command name is changed from "efimenu" to "eficonfig" Newly created in v7 doc/usage/cmd/eficonfig.rst | 71 +++++++++++++++++++++++++++++++++++++ doc/usage/index.rst | 1 + 2 files changed, 72 insertions(+) create mode 100644 doc/usage/cmd/eficonfig.rst diff --git a/doc/usage/cmd/eficonfig.rst b/doc/usage/cmd/eficonfig.rst new file mode 100644 index 0000000000..340ebc80db --- /dev/null +++ b/doc/usage/cmd/eficonfig.rst @@ -0,0 +1,71 @@ +.. SPDX-License-Identifier: GPL-2.0+ +.. (C) Copyright 2022, Masahisa Kojima + +eficonfig command +================= + +Synopsis +-------- +:: + + eficonfig + +Description +----------- + +The "eficonfig" command uses U-Boot menu interface and provides +a menu-driven UEFI variable maintenance feature. +The "eficonfig" has the following menu entries. + +Add Boot Option + Add new UEFI Boot Option. + User can edit description, file path, and optional_data. + +Edit Boot Option + Edit the existing UEFI Boot Option + User can edit description, file path, and optional_data. + +Change Boot Order + Change the order of UEFI BootOrder variable. + +Delete Boot Option + Delete the UEFI Boot Option + +Configuration +------------- + +The "eficonfig" command is enabled by:: + + CONFIG_CMD_EFICONFIG=y + +If CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE is enabled, user can not enter +U-Boot console. In this case, bootmenu can be used to invoke "eficonfig":: + + CONFIG_USE_PREBOOT=y + CONFIG_PREBOOT="setenv bootmenu_0 UEFI Maintenance Menu=eficonfig" + +How to boot the system with newly added UEFI Boot Option +'''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +"eficonfig" command is responsible for configuring the UEFI variables, +not directly handle the system boot. +The new Boot Option added by "eficonfig" is appended at the last entry +of UEFI BootOrder variable, user may want to change the boot order +through "Change Boot Order". +If the bootmenu is enabled, CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE is enabled, +and "eficonfig" is configured as preboot command, the newly added Boot Options +are enumerated in the bootmenu when user exits from the eficonfig menu. +User may select the entry in the bootmenu to boot the system, or follow +the U-Boot configuration the system already has. + +Auto boot with the UEFI Boot Option +''''''''''''''''''''''''''''''''''' + +To do auto boot according to the UEFI BootOrder variable, +add "bootefi bootmgr" entry as a default or first bootmenu entry:: + + CONFIG_PREBOOT="setenv bootmenu_0 UEFI Boot Manager=bootefi bootmgr; setenv bootmenu_1 UEFI Maintenance Menu=eficonfig" + +See also +-------- +* :doc:`bootmenu` provides a simple mechanism for creating menus with different boot items diff --git a/doc/usage/index.rst b/doc/usage/index.rst index 28f9683a3e..09f2928970 100644 --- a/doc/usage/index.rst +++ b/doc/usage/index.rst @@ -35,6 +35,7 @@ Shell commands cmd/conitrace cmd/dm cmd/echo + cmd/eficonfig cmd/env cmd/event cmd/exception