From patchwork Mon Sep 5 12:48:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 602747 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp3642800mae; Mon, 5 Sep 2022 05:47:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR5gxyGGVkOfKuNaITGMTgOQ9Gn6+Q2GROUnBYAkcukfGGkpiiESebU4XG4yME7+Nu1CX/F5 X-Received: by 2002:a17:907:7ea3:b0:741:a1a3:b33a with SMTP id qb35-20020a1709077ea300b00741a1a3b33amr22692090ejc.356.1662382069720; Mon, 05 Sep 2022 05:47:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662382069; cv=none; d=google.com; s=arc-20160816; b=TAaYG1qRg7C/vsFxZ371dmBenzKBzUY/538UUstG53p/dcqo5q83nVImZnZcnyY0gS Cvso/zEreTvYfpy9h3EDQ5AGJGo7o1nM9PXpIG/Sk90sMv3GDyDjIwYN8UkhvnFuat9f 7+4YinzbAkbYJpSR3rSR8zVI0dux7ffIL8ZUx0YUuEzkmBhD60/YVXIBKBSVkpZd/bCJ V5KHDQ2SRsLeFFRW+JG73ueczoGR09UootquFg9MZeeFOfDDZpon4zu1Eh6PgPpcERBL dktbPqpP7p//jxVQjv5kGjvEZYsNOgrA15O875Vvda4PU8y62wy7YzzysGVC8s9cAYWX H2mg== 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=Ucd+LPEEPXh1DU7VmPQ5RDcslk7ilUtdzrQmmGJVMkBexPtc0e0mcVESzwRrQDMZky 5b6Cm0BDLdZv8JSXrxfSyT8kp6txKzpEUXpkjychwEyx5AKjIOhOA3c0+O8LdRxraiZu WbMcaUnIEd4CXD2LeYmZHgVqPwrTEVxbjY3LO60ZNhxg7fB8R8zSBngnLBsUh1Ni77sl ZZAMr/3qzAoJRqXw9QG3pEu/sfmXTUg/vdD+7r8v/S192AnRZOmMaVsDQ1x+whlB+zg8 kTZu0qFaBO33KZ4HStnfMRfcFc2Ol49NKyyHbBoTCUjy0g07Ylum8+ehBZK7bWc/QDBV QAMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="B+zN/Txw"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id qw31-20020a1709066a1f00b007316ac034a1si6938296ejc.831.2022.09.05.05.47.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Sep 2022 05:47:49 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="B+zN/Txw"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 0D85984958; Mon, 5 Sep 2022 14:46:48 +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="B+zN/Txw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0DCDE84958; Mon, 5 Sep 2022 14:46:37 +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-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) (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 C7E6A84934 for ; Mon, 5 Sep 2022 14:46:32 +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-pj1-x1031.google.com with SMTP id u9-20020a17090a1f0900b001fde6477464so12097028pja.4 for ; Mon, 05 Sep 2022 05:46:32 -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=B+zN/TxwsgDNEeDiZuOwU878tITKmpe6sMiuDRLI6T3+J94/DT3cgxSksy+PskrOwr zZAvcAjm/dS/X0GTalmf40dbJd3tEwymsT6MstnNWAZaC+fBEZbk5M3kr2Yt6yjZwPTg A89swVkAPeBxsfI1JlOFocvhJBzu9UYAlbf+thpZdLWicjpX4KLnqI7nw7n/qoyj3rYu q4Tfv9VE5MoBZgE4yg9sgmUZZgNvkeGyUY16KW0+8laXXm2b/ne1FNlhkz3vh/EZxQFN w+f5tROEcATu8grTz8yxMEnPszS6fp8Tp8HfHMLfBrywA6qIhfTLoGMNXav09OL87MeO JKlQ== 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=TfmixyCzpTE3tLdb/j7FaY4GSL5/7IGl+Xxu6TAQEShtmfPdM2QuUEKfuubclO61t5 1El+g1oZvQ69H7EaO20P5/y8MypVsDtMrVjqQ8HKQ4FkOSbuhM1OawM9//g6KQjjxbHI zYBzLGHEodoWhnhume5P8UQGqTayikhBQl1fHIsXKd+kCNDaEoIU9aDnL8mqv1bbHfHy 6K+61LwzcCMEr9HL3QE3XmkcYkOfxvmBkTql4W2YpV45or/+0qtrRTWnsF5N/eiyn4tQ eXt+Q4IY8QKoBoxHRmYqF2D/ysEShgXgT5h3TVc6RqYbScqlo18HUOYqINytGCx1INEZ gImQ== X-Gm-Message-State: ACgBeo1cH0GvSwczF/3nHWH8L/VAXqkfgx8bkFLG3DxT3nwPrtqobcu0 vHKfejmOD680qCvphzQIVcm21VALr4Rb/w== X-Received: by 2002:a17:90b:1812:b0:1fd:d509:93e5 with SMTP id lw18-20020a17090b181200b001fdd50993e5mr19909237pjb.25.1662381992120; Mon, 05 Sep 2022 05:46:32 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id y64-20020a623243000000b0053639773ad8sm7660949pfy.119.2022.09.05.05.46.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Sep 2022 05:46:31 -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 v16 09/10] doc:eficonfig: add documentation for eficonfig command Date: Mon, 5 Sep 2022 21:48:01 +0900 Message-Id: <20220905124803.2909-10-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220905124803.2909-1-masahisa.kojima@linaro.org> References: <20220905124803.2909-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