From patchwork Wed Aug 24 06:37:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 599729 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp2943379mae; Tue, 23 Aug 2022 23:38:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR6XClBPJxcP0HHm5Gfo7qEFxSDl5VtXvHTxrqxma4DJhvmN0l+IXSPeGYMcg94zNjzWbui8 X-Received: by 2002:a17:907:9493:b0:73b:e605:f3b with SMTP id dm19-20020a170907949300b0073be6050f3bmr2043569ejc.37.1661323111027; Tue, 23 Aug 2022 23:38:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661323111; cv=none; d=google.com; s=arc-20160816; b=hM7UiN+MW851MNltu4FVjxfY9JNSWqx1XOwJDr/oU+zjXwC/iwULS1l9TCPJgx988p Bri8htHllB+7u78+3D4ZcuyAtO9ms5JyMWInKlyoF3S3pw2nSf3tUUMBpcLlMHXp98GU eNXPtEG7mMW6ITAZ4txGR3A7uoCeg67LMCqii3RhBX7FUPcqe12T9dYl9iDuEMAnR7yy dKu+l9IyviWF5Fx7lx1LD3QS3wl0fouuJY6NmUIlpoZ+C71K29p9w4gltSxR6TzLsMg+ F5Lg/aQO4rwKDG/ms0OxkpSxEan1nl7BHu08s4XOmRX/N368CsU4f37fJ45odLX+wQXK N/hQ== 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=5nrVQx8Oatszwx71NUx0kWFQiBuOaZPlJRevajv81Ys=; b=IpEJo7K0ZC17BnZQYyvilvBpPgVikJ9aYTvwJlxrPi57zdstgBCQ2B/wVmINib8BKD 4sNizzj2uhjZaxErsftl4EJKsbLAo3QJQc56mc0PjgHBpp1gLy6go+MN2qzA/1TJdn70 rt3KsPmxN4Gm2/5CLIA3VPPuwh8/IZ/NQTktSlYB7EgIafB0XZn4Y37rxrTmoI4Cja9f tJdYCf2H/N88cGpNIi4bhJvUHCs+DHx4KZgU97X7N+RmJdtPee8TWY/a+9Efb/rMSZ7D HPF2kvDA0ATNkw/CaLLMi3X/m/vKu+pfcvS7qu2FQCNR9CuLbB0tzh15WjUcyqzBvAmG zf6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cKX7RHwi; 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 bt4-20020a0564020a4400b0043be542b956si3224570edb.262.2022.08.23.23.38.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Aug 2022 23:38:31 -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=cKX7RHwi; 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 45B9A84874; Wed, 24 Aug 2022 08:37:29 +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="cKX7RHwi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E9D7584847; Wed, 24 Aug 2022 08:37:13 +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-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) (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 D426D84859 for ; Wed, 24 Aug 2022 08:37:07 +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-pf1-x432.google.com with SMTP id w29so10035946pfj.3 for ; Tue, 23 Aug 2022 23:37:07 -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=5nrVQx8Oatszwx71NUx0kWFQiBuOaZPlJRevajv81Ys=; b=cKX7RHwiDkkJH5t07Wi3iAILV6nmT7CHUC5uwsT4v0YtJHY8NyDo72G7RtjOIu+jJ6 hp2E3H/GQgsFP7DyS3jsUvdBBLlGzigh57d7kzmAB1ttHjn3qwHYdcP+HOMWzaRs5WoZ dZXBb2z9HkcaR7W5K6yzwxf0yYogXPUYT0MqxNsNMUIkEUn7GaMID5qzqUNcw1Cee2Xz KoT1/m9kMHCPLjAxNtajIPgSzOY5Q8+tim5jkCiENaiDUC3LqfLaBcGhs5AcRiBRDrXO 87/nJ4xC+CWIQhW/zvqqtVaaYYeyW7RQuMFUipwhe8ucTjZC29I+kxQplKi6cgOdF+Tw Bm6A== 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=5nrVQx8Oatszwx71NUx0kWFQiBuOaZPlJRevajv81Ys=; b=xFdr08/mkc3GSrfcgghJ+pTHX1xK/2rx+gPLpU6Xofpl4LKi5Q4r3Q+bE+jHqQocMd l5473/haeOJvHWU+Y6aYLesoBPNJrIALBHZEEonFEzrC6AMbmgKpvha84tnvNJvhBlMR wtrmvTQX02Jwz6JcT3K5F6BDm7xdSWqM5VyrNdHEni7qFhUGhTl7eNIL+fcWFCNN9Ojg qoboKjXAd9kaO9sUcqFug8vek4J5JAG204njJyim0yZoVCjpgVm7DXxQ8li5tE1oI6tw y0JwZcCIS+n0IHz/UZeRF+soIJHu6ql+goBjrWAyP/4FIDEEhUA9OuYt0ERYVRQYZd8r lFxw== X-Gm-Message-State: ACgBeo3ncj0oox8mNmtZzFkkeoZiFo9LPuIWbxQRypGx0QwQc9Kq5fZY +xKQNbMYZxfNkgV1YkvLdCfQZ5t3BfsgfA== X-Received: by 2002:a65:4687:0:b0:42a:8907:5c3d with SMTP id h7-20020a654687000000b0042a89075c3dmr13836050pgr.510.1661323025674; Tue, 23 Aug 2022 23:37:05 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id a26-20020aa7971a000000b0052d40c4c06esm6958761pfg.39.2022.08.23.23.37.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Aug 2022 23:37:05 -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 v13 8/9] doc:eficonfig: add documentation for eficonfig command Date: Wed, 24 Aug 2022 15:37:39 +0900 Message-Id: <20220824063740.5760-9-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220824063740.5760-1-masahisa.kojima@linaro.org> References: <20220824063740.5760-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 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..48932fa16b --- /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 privides +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 to configure 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