From patchwork Fri Aug 26 06:42:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 600268 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp231543mae; Thu, 25 Aug 2022 23:43:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR4zv9idoOev+bPFAr+taMT54ZPmxJY6xyRzATrP4vCnHfPWgKB20NDwmuZkiGV66JWFtepX X-Received: by 2002:a05:6402:3509:b0:43e:d80b:44a8 with SMTP id b9-20020a056402350900b0043ed80b44a8mr5815732edd.255.1661496198518; Thu, 25 Aug 2022 23:43:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661496198; cv=none; d=google.com; s=arc-20160816; b=KQuGeClDpVjFDeIVTy5XviOaSfHy2huCuXhvgWIUBmDvwBNQg11J5hJs5DMkzGIOkg x+X90LksZqoTrjTrK94HL284BKYBDEWwZKxFvEDHqBfTYLX891ucC+JTBfQXgY1DcqQS m5k9nfmb0dEkhdawfXRxylIAU+ysTpkYlbWNNp16A8e4+TrEGXjcjUoTA9oYrYWVw175 IJCT4FJ7Wbn9YReOXut7Vz2DBFgCOxvQ74kwKe6KMDWG4pqShsozhXb0FDUpBTGZRTv7 ovbPzTG52y59vZOc+37RA9Rf/r+6g5jQBLXh28F1JEuF8JbvragWLrfdFoKxkcTrcLao 4zrw== 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=07NBYG0Lknp7v/nE8l8PjIWaPD62kRlV6gZy5/d5Zms=; b=RzPvoemgrHTybKWEZXEddH3USypvU2Pii3zHEilSBJvSV/7z8CPAuHM4bMfVQd5uQ+ 6X046auav7YbSZEiv6//nX2yqkY6y3Z0FZcJQsxKz/9w0kueUZJ1wbhkjCjxOlDjEQFs TaiBq9NiHJjTF7Fsx7b1LfrGha3fvTwq82NbwLyLZhd//zFdwg9oPanM2CN1OF72gHTm rSbXvDxZzd8PFfYovLjiRpT9JDsl7KftE+g3Of6QLtw2yNG5ukheqZI4yH2c+xc7/ZE9 akd3GLd/jrKUbk/e5nTbDl5Xn35Qe9XPUmJAUVhsyy6GBjcKr9oq0a+ylt6cPW0T6G2j aQAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Rv7k3NSx; 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 h21-20020a056402281500b0043d9c8dbfd9si1165541ede.31.2022.08.25.23.43.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 23:43:18 -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=Rv7k3NSx; 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 6A7F1848F0; Fri, 26 Aug 2022 08:42:16 +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="Rv7k3NSx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3357584895; Fri, 26 Aug 2022 08:41: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-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) (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 53BD784895 for ; Fri, 26 Aug 2022 08:41:51 +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-pg1-x52f.google.com with SMTP id r22so593615pgm.5 for ; Thu, 25 Aug 2022 23:41:51 -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; bh=07NBYG0Lknp7v/nE8l8PjIWaPD62kRlV6gZy5/d5Zms=; b=Rv7k3NSxNJTPiFgR9j4QawJM8PSEUUl/L4Xhpk8SNvFqtk0uju+9ASibCJ+0U7fhrU 4KUr8gzmXtYScVyHIa9vxnsc/JpI3hFV6gXNIzqYFGpcZ/jXmh5/U/BBmyArdhvkjhcM sPI7hS9ew/ArwMmvKcs0qRRHEMPGE1jNd8+ss3Ky++roMpnfxzUuMoghmF77TRjNDdHU PJzHy/+qiNKGfTsFBYzALt7n9H6PcEaQCKsO9JChCphWlWysg2jkacIrkrEst2vqckqj cTRms10ITEb0FKbLu+vRUmpoo/W6cXhcMOnrupleg+LglCfwWDUddS9uqRLFdYSnqoyC a+3g== 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; bh=07NBYG0Lknp7v/nE8l8PjIWaPD62kRlV6gZy5/d5Zms=; b=F1GW1rjXiTuNQlusT/pej1tUouQDGuo5N7H/z9Im7o+2jflU46kmqY8LPu0eZxKnvS QWWQ4JxhRwxVoLysgD+tSqGwgrvLNI3bRDGje5zwcgd5HExSGlwV8Q7+b4JnYCWuaX6M 82ZQJz1KRcMDBKFUUjSeeDqnLUxy1ZDXNjFebNRJsXKaugkmihgZtxhnWV2ocO0YvUKS i85Vo8t9NSjjDR5m0rFaFNpTMzT6IE9Ci+94IzoiTf95rCuKEMZl4MwbT612BROrn+x2 rFLGVPQ/2w/U/MVReoOZWXoDvreZ40px7PhpasQjAekp1zJ3HLWnFaEJIhRXmpeQwJ91 OxdQ== X-Gm-Message-State: ACgBeo0TqinOs8fo1H/6bVX8SApGaXViHLA78Qti+K1bXlJJEHiaqp8R DZrSbcGDlRgN/m4j2iF+RPsS6MkEs2BYhQ== X-Received: by 2002:a65:4bc6:0:b0:428:90d4:b410 with SMTP id p6-20020a654bc6000000b0042890d4b410mr2073380pgr.529.1661496109412; Thu, 25 Aug 2022 23:41:49 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id f8-20020a170902ce8800b0016d62ba5665sm694641plg.254.2022.08.25.23.41.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 23:41:49 -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 v14 09/10] doc:eficonfig: add documentation for eficonfig command Date: Fri, 26 Aug 2022 15:42:22 +0900 Message-Id: <20220826064223.23288-10-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220826064223.23288-1-masahisa.kojima@linaro.org> References: <20220826064223.23288-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 --- 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