From patchwork Fri Jul 15 14:27:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 590834 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5817:0:0:0:0 with SMTP id j23csp551153max; Fri, 15 Jul 2022 07:25:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t6P48F8geBQn/ALiUMz1qDL3MxslrNEHvH0YlpALVtfDh6f/b+6Xudpd0RJQmE9f0DC2yy X-Received: by 2002:a05:6638:25d3:b0:33f:3c9b:24fb with SMTP id u19-20020a05663825d300b0033f3c9b24fbmr7760418jat.308.1657895108148; Fri, 15 Jul 2022 07:25:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657895108; cv=none; d=google.com; s=arc-20160816; b=f4B1NNkpCD9KNBza8tFKPLOiHnO+eQpCIg7fuIZT+Wqwdgtn0/Y6BZDtpqg2fSIaYY uCe9zt/r8TVrdy90WBAydwS1WUOkWDt0oIZciKbbB39uM0ZU7TnC/hvYm++HZ4iESbuj pnc7wLHHn0I2oAwTCWeNlO1IxPhuLmUJlaPmv+712OPU6O0JkPFIywbX08FuThVa+2xh xp+vI98QZ+5uX4weafm5cEJxI+6MAaqrl9uRfXww6LNxSJGsSzLKygFDgmQ96MRz3I72 RSISAn7pbqqQzsHm7T1i070kkhMKLwImrQrQUEZrcl9vqevKA+YK8jswgx7kINMHI6vd NEog== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=1eZRCqW/c1wM/wjePWSydgB9LcRdkaYywGr7tGRXuew=; b=VqNR/XGv8H/VmRNKuWXV/WnXpfzLfa0J4/5Hil0UALmi6fpNSJe3AZW+3DC7nGzwN6 2B+pCChRC8KMtkYzstMo+oQ59kOHu42cVQRoXscUr6+f+U5HYMS73ExjyYAY/7/qntFU y8+NbtXkJZIfy2cfuWl872YvAPTJiDl37HU8otokOiqE4MTLshXe0AhEtvAfrYc/5Qof PZ4e3UnmbBwK/lNMQnSqi4SrWmD+WPJ0BlFnkEP79bRDeSf5qKTYcrS2zv6mXdL7l+3M z6IIPu5DUQWCYwKsALDzMiWjjWgLd3Nz8hM0zG7D+tAPgxtzBvR4aFN9urvcaytAICPP h9Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KfUL6Whb; 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 q13-20020a056e0220ed00b002d9290e5a4dsi5937325ilv.21.2022.07.15.07.25.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jul 2022 07:25:08 -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=KfUL6Whb; 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 7724C810E8; Fri, 15 Jul 2022 16:25:01 +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="KfUL6Whb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 10C72810E8; Fri, 15 Jul 2022 16:24:59 +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-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) (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 A480980741 for ; Fri, 15 Jul 2022 16:24:55 +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-x436.google.com with SMTP id g126so4806566pfb.3 for ; Fri, 15 Jul 2022 07:24:55 -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; bh=1eZRCqW/c1wM/wjePWSydgB9LcRdkaYywGr7tGRXuew=; b=KfUL6Whb5PYuuRL0MZfjR3KVFhSsL04zapEk7AU5yeGy2jbJRcZzoNFqY8Z6mtcEln alECHZwAOJ11rpq1WnKvlWUWhQ4i1YbuI1EovoRUCCUAJh/haUoz9cN7YhU3RLxgDHJT PvgRorFTA+ZcE4rUGwD9xou4MuS0VFxOSrIyi8xyH6ddetKmWaCmMG9bgba+/8VSMVJ+ Fi7UfjIq8E0rqmPn5omSkNPTLnHYlkCUSLyoFJxlyOHViEiaUJqMRIBklA3mTsm1cVn4 LfqTcN/mCGVbqL7Q4z6M30WB7/07ogvjphkw4JKGjpxXGP7H84GVhJ2wrOlRDWM21xZE PEJQ== 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; bh=1eZRCqW/c1wM/wjePWSydgB9LcRdkaYywGr7tGRXuew=; b=C/PbplWSAg3Lb1q/unwk7Ulr1QvkKnsTvyd6hTkevamNPrQRrNsvS8Q453EnHpqTqI qq5SPxmaJNC7dHiFdEbjA1YDXrkDdo45XKSaLBsdJ67bkS1IM20htWaKx36Xb4dnYX/Q O4cp1ZyT2h93zMj2LsaF9wNuyI+Hv70WlxExvqh2OQ/0X3VBFAOjuli17vB5LY7uw0ex dlkZmh1Qw0UnJSmcjjaKm+tEMnbE9o3FFp6qn/eM/I2rB5byOHhNLebwNeAgJZMoYdVn BD/YrNooHv9GmSyLMoI5jo9th1JRbrugw0eekJjm/Zh5RRov64YgBiwOMN+4VV4cGMCJ yhbw== X-Gm-Message-State: AJIora8VzFA5vRPLSnvTMTVq0k8YOdexInsJKEw7x4/ownHMs5a9vLI3 JaP79fPZ+X8dPflRokz5xeb5UqkK5X/FiQ== X-Received: by 2002:aa7:94b3:0:b0:52a:198a:e3cb with SMTP id a19-20020aa794b3000000b0052a198ae3cbmr14143077pfl.60.1657895093790; Fri, 15 Jul 2022 07:24:53 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id d22-20020aa797b6000000b0051c49fb62b7sm3891174pfq.165.2022.07.15.07.24.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jul 2022 07:24:53 -0700 (PDT) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Mark Kettenis , Masahisa Kojima Subject: [PATCH 0/9] enable menu-driven UEFI variable maintenance Date: Fri, 15 Jul 2022 23:27:34 +0900 Message-Id: <20220715142743.30137-1-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 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 This series adds the menu-driven UEFI boot variable maintenance through the "eficonfig" new command. This series also adds the removable media support in bootmenu. The python based test will follow this series. Source code can be cloned with: $ git clone https://git.linaro.org/people/masahisa.kojima/u-boot.git -b efi_menu_upstream_v9_0715 [Major Changes] - rebased efi-2022-10-rc1 - there is detailed changelog in each commit Masahisa Kojima (9): efi_loader: move udevice pointer into struct efi_object eficonfig: menu-driven addition of UEFI boot option eficonfig: add "Edit Boot Option" menu entry menu: add KEY_PLUS and KEY_MINUS handling eficonfig: add "Change Boot Order" menu entry eficonfig: add "Delete Boot Option" menu entry bootmenu: add removable media entries doc:bootmenu: add description for UEFI boot support doc:eficonfig: add documentation for eficonfig command cmd/Kconfig | 7 + cmd/Makefile | 1 + cmd/bootmenu.c | 103 +- cmd/eficonfig.c | 1992 +++++++++++++++++++++++++++++++++ common/menu.c | 6 + doc/usage/cmd/bootmenu.rst | 74 ++ doc/usage/cmd/eficonfig.rst | 49 + doc/usage/index.rst | 1 + include/efi_config.h | 91 ++ include/efi_loader.h | 71 ++ include/menu.h | 2 + lib/efi_loader/efi_bootmgr.c | 7 + lib/efi_loader/efi_boottime.c | 52 +- lib/efi_loader/efi_console.c | 70 ++ lib/efi_loader/efi_disk.c | 66 +- lib/efi_loader/efi_file.c | 75 +- 16 files changed, 2608 insertions(+), 59 deletions(-) create mode 100644 cmd/eficonfig.c create mode 100644 doc/usage/cmd/eficonfig.rst create mode 100644 include/efi_config.h