From patchwork Sun Jun 19 04:55: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: 582990 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:7814:0:0:0:0 with SMTP id b20csp747373mav; Sat, 18 Jun 2022 21:55:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tgbg31/el8EmF86e0BvXWN7Tv6wLRarxrKKUhs/NLPQws7mG1+rhiJCSJmB4SDRhsYAdhP X-Received: by 2002:a50:c407:0:b0:431:39ed:1c5e with SMTP id v7-20020a50c407000000b0043139ed1c5emr21572010edf.402.1655614523872; Sat, 18 Jun 2022 21:55:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655614523; cv=none; d=google.com; s=arc-20160816; b=nhkzGVl+wQV6GX8vNX298da9C0LcFj97BwkYOWuPZBojjgVYNNmaIXuunERouEdz1+ mx6L4/jaUsz5fox8m2DtoxTh2saIxZK5RpDOivVTqFTM0QUPS3ONNFPTwB2U0JqwbUCJ LFZ5k9A7hpQuoN2/3GmDZ57CeOHFNutO6ka1dz0pq2p2zIETbLI/nMQ/KAXkrAq0GAwV WWMexz0N8tCqT0V4AXpxytTv720h4NYpeiOLHSDnQjq8bhmZFUlg1oMMvMOn50OdP8oy 0+zs9528e8csaPLnyMmj5/XkpJd3gODVIx9JXUDcFVH4u8LQMA47iwRSKAIAEWllZuUr eWag== 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=OQTFGvRYn5WIUiOi3l1h8249DAxFlXTYgHCA0grQrLE=; b=wUMrIq1gyMKoMRyxskI2jJTgXRTWMzEXRyEl1mDqDw/+yJBxC0cFExn+M+LMVSWNxT WwRNGRWBnUihOQtd+/HbOdBKjSYyVHDWWWvB2tmf+VjlpQy2SOuAk4xBQSW6a48HFjcL xpqZ4pSQM9WyR7iWhyaubTf5J4c8DeuRU1gqVD5HpBySZhPSUUSQK9RYgBdTMM+IAYk0 q6r8B6qMDlVuVcbmWQT5/R/2qiYt1sb1Rrvl59FKSh7IPfwXSef7WVifVULt0k1jNC9u s3MmBKIPohBho/5JrpVxSEP/ZHBAAdHOJFtg5jXf1kX+dofzQ/4JPjxYNZEnwxBRb4Fj DOLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rV5Hbwe0; 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 ej6-20020a056402368600b004357cd89b1csi703658edb.356.2022.06.18.21.55.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jun 2022 21:55:23 -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=rV5Hbwe0; 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 E5AFC84280; Sun, 19 Jun 2022 06:55:21 +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="rV5Hbwe0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3AAC5843AF; Sun, 19 Jun 2022 06:55:21 +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-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) (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 7900983AB5 for ; Sun, 19 Jun 2022 06:55:18 +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-x433.google.com with SMTP id u37so7496877pfg.3 for ; Sat, 18 Jun 2022 21:55:18 -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=OQTFGvRYn5WIUiOi3l1h8249DAxFlXTYgHCA0grQrLE=; b=rV5Hbwe0/kYsG+A1isHhzROPnqcW4GuMBH8XaldRDeQBgAigE7I+ow4Ijf3HbiSLfw WrC2VbOy/pAyxBRWnMNUwTCt1rvaN8tIbMKZpPRv52AjzrubQq5mumGI1/oaBVWh0GYA VBy1nQi6ExhZF56LhfXd1i5AaRQ5D35m4ziurHilp0J9QVreq0CfHI0uFgNTGnZ20mJV E2uO0A55uebTez97peyn7Dv8JR/eRE0d1LAY4jHTVMvF+755LpIBvUboZ8ngZX76VP7n yovkDsjtFk3jn3QJj5aDUaO+NXlQNhKa0Yb3N2AN1XL33PWIYTTGL+UEj6bVrd29oSKE mC6g== 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=OQTFGvRYn5WIUiOi3l1h8249DAxFlXTYgHCA0grQrLE=; b=FLyzy6M4Fs4qnPT6HNnwfBTikHmP/UqqhR7zqtFNVXAL1yqlGYNO/+u1byUnfuxPyZ ge0XLDHE22T+YVjVQRu54W24CnRngt4ARRtecuDCdKGfoNPAcYeAPc50rUWgpxHjh91U 7Zgfei0VQppUXcBf+AQXJvVDwB37jrO2NATkYgm+Kl4It7zPd4YoB/sEKZsYvSXpI2hu 6yPJDQQ5DegROTLrqWv8RHRDfE9KgaX2DGzOC2/9YA8fDziCkW9pCEOt9zG+ldFZ1+Xj fLbcQ7KkFnGV9qwFp72QIT16a2V+IISCkwYW7e6Ov4aSjJtVLqksZk61O42pBxng+ugv w3ug== X-Gm-Message-State: AJIora/tGYDeCOxFAClrJG7UxqO8D8tR7HZCxmQwe/14X8auyZt3htZ0 OY+l2Ytn4gVbihogv4BAw/ganRGX81AItw== X-Received: by 2002:a63:67c3:0:b0:3fe:465:bfa2 with SMTP id b186-20020a6367c3000000b003fe0465bfa2mr16062137pgc.12.1655614516335; Sat, 18 Jun 2022 21:55:16 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id 9-20020aa79149000000b00518424f8922sm6381848pfi.77.2022.06.18.21.55.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jun 2022 21:55:16 -0700 (PDT) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Francois Ozog , Mark Kettenis , Masahisa Kojima Subject: [PATCH v8 0/9] enable menu-driven UEFI variable maintenance Date: Sun, 19 Jun 2022 13:55:58 +0900 Message-Id: <20220619045607.1669-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.5 at phobos.denx.de X-Virus-Status: Clean This series add the menu-driven UEFI boot variable maintenance and removable media support in bootmenu. Different from previous version, thie series adds a new U-Boot command "efimenu" to invoke the UEFI boot-related variable maintenance menu. Note that menu-driven UEFI Secure Boot key management patch series will follow. Source code can be cloned with: $ git clone https://git.linaro.org/people/masahisa.kojima/u-boot.git -b kojima/efi_menu_upstream_v8_0618 [Major Changes] - command name is changed from "efimenu" to "eficonfig" - there is detailed chang Masahisa Kojima (9): efi_loader: expose END device path node 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 | 99 +- cmd/eficonfig.c | 1872 ++++++++++++++++++++++++++++++ common/menu.c | 6 + doc/usage/cmd/bootmenu.rst | 74 ++ doc/usage/cmd/eficonfig.rst | 50 + doc/usage/index.rst | 1 + include/efi_config.h | 91 ++ include/efi_loader.h | 63 + include/menu.h | 2 + lib/efi_loader/efi_bootmgr.c | 4 + lib/efi_loader/efi_boottime.c | 52 +- lib/efi_loader/efi_console.c | 78 ++ lib/efi_loader/efi_device_path.c | 2 +- lib/efi_loader/efi_disk.c | 11 + lib/efi_loader/efi_file.c | 75 +- 17 files changed, 2437 insertions(+), 51 deletions(-) create mode 100644 cmd/eficonfig.c create mode 100644 doc/usage/cmd/eficonfig.rst create mode 100644 include/efi_config.h