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: 1669594 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=HTruiIcG; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MCGbc4lVqz1yhJ for ; Wed, 24 Aug 2022 16:36:58 +1000 (AEST) 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-Google-Smtp-Source: AA6agR6ag7RdO2YtNfY8R6oCG8pehTNBqzxFxO7FK3tLeD3MDO7NaV+IKB2sBlT9241BmdYJf2FB6w== 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