From patchwork Mon Sep 12 08:33:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 604979 Delivered-To: patch@linaro.org Received: by 2002:a05:6504:2213:b0:1da:4c02:b5e7 with SMTP id z19csp2442743ltw; Mon, 12 Sep 2022 01:32:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR6ZjDsxTlzSsDdQTHNZV7Au4nYe6y9fi5oz1v+v5jCo1RW5cCUTKONJWpoT6PKQHkYUkGHT X-Received: by 2002:a17:907:75cd:b0:779:5bfe:5d92 with SMTP id jl13-20020a17090775cd00b007795bfe5d92mr12355754ejc.23.1662971521415; Mon, 12 Sep 2022 01:32:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662971521; cv=none; d=google.com; s=arc-20160816; b=ZJMS0gAuu9TyRvLt+XRXB+eYnuzE1t71CJocXtVA0szDvh0iBw1c957KUaztpLU8dq ttk7Ui7A4vQm8lkxqbrJmmsual/HDfAwq9qJ5v46rzPytREl6yKOU+jKhRJXNw/9KHUH B7qpM4umhkcXAbguklA4PMbL8if9LyPBsRAYcOf8RTzF0QExkjJvR4M8kxuei73mCfCL KGC251EBfBVUSkH8jQC8maRyTljeVJsftxDlBqyg1OELMfRsvO7WzQKfZcF4ZIeXjisF Z6I6bKNYUmjS2qj5Ghj47Z5XUXj3CeY9x1gYWyYsnYtJXGe7hCsf9KTbdBFhrh5t/0gU YdRg== 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=6dS6UbM9/KcH9dna/wjZN2DtljcOlLz+JhjyzG9fO4Q=; b=nLh1mMkpJ57bK0LnJXoo0gN3YMlPogxxXB76f14zaQbZNE6FQNdhbDWRd5azw1XOrE asdfx0kdgjxu3V1Wc24srvbghXXS0Dn9FHCottRY76yJau8cZ5XKXoLVl9Me48QFYQKB P8rEuUkltlFFGKZ3ncCpKhLZSM6VPc3TxKn2jyBu+yC9dwmTw/OS3HKO9MJyQl+K/tIv BvL0CGovMIKKUeWkpITVTo1mCV2uvTeimXTkerbNq2PE+5i+ShVVIzACVdj5dzx6LBjU h/Vz9evGbLWe0f3HBjXHUhVV5cbRAhqjSERKCW/5mF1thzaIHCI0Xj68YhJ98WVubkhB Y60Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B6x1p0P0; 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 du15-20020a17090772cf00b0077d7fa3ff93si2270265ejc.66.2022.09.12.01.32.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Sep 2022 01:32:01 -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=B6x1p0P0; 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 2570F84A86; Mon, 12 Sep 2022 10:31:57 +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="B6x1p0P0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7671984A45; Mon, 12 Sep 2022 10:31:54 +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-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) (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 5C88484560 for ; Mon, 12 Sep 2022 10:31:47 +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-x532.google.com with SMTP id c24so7585292pgg.11 for ; Mon, 12 Sep 2022 01:31:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=6dS6UbM9/KcH9dna/wjZN2DtljcOlLz+JhjyzG9fO4Q=; b=B6x1p0P02M1FwmN1sQLP6zd8flG/xRAG8+tnu8Pyo60pySdUgpozf8BUlRT4QuoyW5 N6gqTH+0joUZtkxUnW3ByVOOoxLXCj9nREFtKW+PV/ma5j9XRLLVmeLBnT2VgzarreEf uu5Np1F70ly7EMDgFPy3Cjr+1HjfWHgZDOuL1Lhm+sBqCACXdBETmNolHqM9YX2dtsAn tbsT3NzzgwDplv8wWAxVFK6sMmBIqjCjl2fUxOJ8ajt2ZSCL0NDU9PMQ9aM/aFqX60hK aNVfOswJ02vtGJyCxvU6g/6C5eFhQBHqPMI5PBnMHIXNtv1rOMg5kK4gwCyd41r5cXYf EHTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=6dS6UbM9/KcH9dna/wjZN2DtljcOlLz+JhjyzG9fO4Q=; b=SffAPBUzcTVzBAsnFWq4cL9Qd5bxHZ6qbT1ALzi7cOyTl7hw9GBj+7biayxEjrLIW3 b2ZLijNBXC3cJ2lg0rwqhJlJ46l5nWSDkxgKeWk9e8/vAZs2u8KjH5xqDdbSS6igD6pU Vam3d/V9S6VHWldq5G/nFj9IqZ4ntFlOHyHMzDxdTpO1q3Eoa8JUzZ+AYXqD942hoVHm RrzlCy3AarzepR4LzgZq5Yfs50txd3nGRbYQHyRwpKQcgtVKlNHpD2Sms+D8DB4L7VJk +CXkWJSb5t0q1pGL6kIAw9Ii46Bst6a8XS0Srn+XJUVfWvuscsov6GSFdrFGbXWVViDX hmTQ== X-Gm-Message-State: ACgBeo2qyrzBrA/bKJYFS0SG0J9jjzagoLzhls9myEy2okJI3iRJ7Uko C9Llo5wSrxU5C9uDZzYAZnOr9jSHzpW1iw== X-Received: by 2002:a05:6a00:1488:b0:542:78a:3f8a with SMTP id v8-20020a056a00148800b00542078a3f8amr8353300pfu.85.1662971505370; Mon, 12 Sep 2022 01:31:45 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id d15-20020a621d0f000000b00540ad46bc1dsm4698506pfd.157.2022.09.12.01.31.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Sep 2022 01:31:44 -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 v17 00/10] enable menu-driven UEFI variable maintenance Date: Mon, 12 Sep 2022 17:33:49 +0900 Message-Id: <20220912083359.24510-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. Source code can be cloned with: $ git clone https://git.linaro.org/people/masahisa.kojima/u-boot.git -b kojima/eficonfig_upstream_v17 [Major Changes] - sort the directory and file name Masahisa Kojima (10): eficonfig: menu-driven addition of UEFI boot option eficonfig: add "Edit Boot Option" menu entry menu: add KEY_PLUS, KEY_MINUS and KEY_SPACE handling eficonfig: add "Delete Boot Option" menu entry bootmenu: add removable media entries eficonfig: scan media device in eficonfig startup eficonfig: add "Change Boot Order" menu entry doc:bootmenu: add description for UEFI boot support doc:eficonfig: add documentation for eficonfig command test: unit test for eficonfig cmd/Kconfig | 7 + cmd/Makefile | 1 + cmd/bootmenu.c | 22 +- cmd/eficonfig.c | 2502 +++++++++++++++++ common/menu.c | 9 + configs/sandbox_defconfig | 1 + doc/usage/cmd/bootmenu.rst | 74 + doc/usage/cmd/eficonfig.rst | 71 + doc/usage/index.rst | 1 + include/efi_config.h | 98 + include/efi_loader.h | 53 + include/menu.h | 3 + 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 | 50 + lib/efi_loader/efi_file.c | 75 +- test/py/tests/test_eficonfig/conftest.py | 40 + .../py/tests/test_eficonfig/test_eficonfig.py | 354 +++ 19 files changed, 3437 insertions(+), 53 deletions(-) create mode 100644 cmd/eficonfig.c create mode 100644 doc/usage/cmd/eficonfig.rst create mode 100644 include/efi_config.h create mode 100644 test/py/tests/test_eficonfig/conftest.py create mode 100644 test/py/tests/test_eficonfig/test_eficonfig.py