From patchwork Wed Aug 24 06:37:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 599721 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp2942697mae; Tue, 23 Aug 2022 23:36:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR62JoWXIWjzvuuA0uBvOF46/ScBr5yBuEnaZHByRPsA/PRxxSVBppclvZRZ0VFIZWXqrPvs X-Received: by 2002:a05:6402:2816:b0:434:ed38:16f3 with SMTP id h22-20020a056402281600b00434ed3816f3mr6319847ede.116.1661323008932; Tue, 23 Aug 2022 23:36:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661323008; cv=none; d=google.com; s=arc-20160816; b=bFv9H/7Xjo9EB2PWLrXczaTB5Px2BlPpX2I9z2Tkt49P8J9fEqi12hXA9rBCwLUsPC ZZuatbHVEJaro1oNPbj5cRT11QtjHdEjLP+oIiNeXJho7+N6+RY55DQ2q1CpV1f9Jrb1 brsPHSthAQdLF2Zn2VhkUF4J8U7LBe7aR+/uKuJ2KLIA7f5fXSubd0/Q6rRkmr4KWFv1 fX4/klHErxHFmBtGJ6++twHvVxJcx684vygG7oOJIds2OCh6k6A7wSuGuwHoJCGgl5jg ydJ53Pm3W2t1ja81+7UpEPnRES+hF+b4w3qN53ARGk0kjhkKxIQG72WQ6JRX708KBTyZ 4SCQ== 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=C8EsY3Y2L8dIdHvz8P4Uks8uC2f22NvkaCKyg9s0AKg=; b=Avwl/FM8xEOHEZSR2kDm0AwKa54L0PBKmhSphJ6mWtziAFQrY4JrEWgNVff9Dtz9ae omNHJnjDjWbtfWOh29SxbNjb2HtNaqVv4OJ/hZppZdm6O2mfjGrr116xsLNNXH07xnqI BQhNrs+RHQM2lpigxCA1w+vLILKTOnc/NvZyFCIB0pAMddMkjojy1oOpTqksOypARGGw 7oGbOPnzg5NGNmdEcCEB7PKGwyGGiPH0IlTELrmuzcUJqHgK5/qHLndoG+fz6ZkfRj3T q2gNZPpy7qe+cMFXch8rsM5q6deIz2yeBEGHWW+411rCAHzLKwefBdj6S02wex0aXOSG TF1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HTruiIcG; 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 qa18-20020a170907869200b0073d8e16fd75si1474741ejc.567.2022.08.23.23.36.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Aug 2022 23:36:48 -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=HTruiIcG; 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 B857E8482B; Wed, 24 Aug 2022 08:36:45 +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="HTruiIcG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9144F8483E; Wed, 24 Aug 2022 08:36:44 +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-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) (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 A7055847FC for ; Wed, 24 Aug 2022 08:36:41 +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-pl1-x62b.google.com with SMTP id g8so10943980plq.11 for ; Tue, 23 Aug 2022 23:36:41 -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; bh=C8EsY3Y2L8dIdHvz8P4Uks8uC2f22NvkaCKyg9s0AKg=; b=HTruiIcG79J8AeOxmzC8CrUyLTCC9DA9lZYE3qkLGqRPRRzjCeXbry6gEPr6xXHTx0 9B+n/tGl6gYZuPQCPR2hKCdI56Bc9dIwOgmfAUaRq4eSoYhy4KPAdNBkVaOGbA3BafzD V5o2LvVEUGe5FA3YE5Sev0aIQTQYpPJIAemXzHAEx/SO7jXu9wDRE5VF5wnRCnzOGjhW udq7mjIjTB8N0Hr66u5HBWSQtLGaQ+7iP8MA9fr4eku29u+/Utq0aBvFpYU+KBWiwELP 2PA0pTRVL1S2XJSXYIiOP+IFuO8nlZ9Xbfd9d1fGpFMUisgVTLceV9p9zPqCN2xZn5LI Isqw== 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; bh=C8EsY3Y2L8dIdHvz8P4Uks8uC2f22NvkaCKyg9s0AKg=; b=srCbZEGDcFD/i5EkcmROLqi6H722Ozz344/Zodz/OhVtQgOeD/H+HjjKRqy/lsWTCY J4rRi7yS4jNBU7dIXagS2HSqW5OB/GsG72ujNBC5ncQUAN3C5MGSVOxgvHJAh9ajYHeD K+bfI2Fz1U5ZOLr7BeEnnywzZ4IaUY2twx6Frvle0AoBPUBuGJJN2wDpSJ/a+7InLYyH UkdEEHiWUvYJHSsXSYzca+0jzEZZUuRk2HMBWI/a4JHHgkLtT3mlVsR+Aj/J0PTeXspo XKiqk0zd9Pu1VjYuzQ0yOJQUf6pwEdyExWzxK795Iof/Va3gw5AhaKu4UHTDC8gPfzGB p4qA== X-Gm-Message-State: ACgBeo3qfU1G9gbnb/0tiNci6WRSjXKxkhc1GqFe1cYyuD8vpQ/Aun1d qYKxtMKmYAeVL+fcGnIdp64bTXL09plwhA== X-Received: by 2002:a17:90a:ea0c:b0:1fa:c77a:cb05 with SMTP id w12-20020a17090aea0c00b001fac77acb05mr6834863pjy.228.1661322999616; Tue, 23 Aug 2022 23:36:39 -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.36.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Aug 2022 23:36:39 -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 v13 0/9] enable menu-driven UEFI variable maintenance Date: Wed, 24 Aug 2022 15:37:31 +0900 Message-Id: <20220824063740.5760-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. Initrd file selection and python based unit test are added in v10. Source code can be cloned with: $ git clone https://git.linaro.org/people/masahisa.kojima/u-boot.git -b kojima/eficonfig_upstream_v13 [Major Changes] - there is detailed changelog in each commit Masahisa Kojima (9): 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: 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 | 2430 +++++++++++++++++ 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 | 97 + 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 | 332 +++ 19 files changed, 3342 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