From patchwork Fri Sep 2 14:23:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 602170 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp1508412mae; Fri, 2 Sep 2022 07:22:07 -0700 (PDT) X-Google-Smtp-Source: AA6agR4gZiMHlMdIP5pHx7XAVkpasDC+BFnMFT/RfoR0ydh9BIa5jE0lfKFR6T1Dy3OnPLhqZ3us X-Received: by 2002:a17:907:a420:b0:741:4a58:eac8 with SMTP id sg32-20020a170907a42000b007414a58eac8mr21234631ejc.346.1662128527325; Fri, 02 Sep 2022 07:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662128527; cv=none; d=google.com; s=arc-20160816; b=xIJnRO6CSmgeHLec2TTYLr7BeZMO44BIp89GejYcL1GmEmkMD5ncCCmUbULHIBSysf nczKUPB1ooK22kHAktz9JZviTXOoEJM/b4/KfEDToE0tAdIt5zKoamQrqYmahQ+cypln Ok0DpCvpfCZ0IF6sKWjMicimwAJnZPDzQJ4hDijUQGZa+npfo74TXbNDXR7NS93ZCS51 +3ctHmpoMLpgKaSuOJr9qhSyudjcNn5TK4OjyvkGr9ZaE1Deio3TooERhnXzbluq1E66 6iB0oNZOaA4GMJim1w4sKFjIvwjtjduV7g606ngBfYnVCcEKHriR42ollfG7cjVDl0t3 QLgA== 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=edbKcj9MJPnMAmZpthKKCdcJcfFmrfGiFv+UoETOY6Q=; b=ON/kGpYuvcS+ZX5WnD4PnbQH/OkpVq33C2BSxsb44vbBuk3XVpkZ+GI8WZT5D1yJEx sHoNRe3VOiq8zpnjlQ0rZsr/xsJ2vQQ0KXxyynQGteqCfqt7q1f3DoV6qvYcegfhUbHp TmFObed3e6Q2xF3qnhTxLgK9g4We28u8GzkYHcslF0H87PrS11s0Q9a0mQB0A53gFZf7 yvxPfhGVs1QT3UF1tBacgW1LLDh9rl2BaxXuDf0l4DJWz4wDgyF3TegvbttySJwIW3KK kRNHWMfybPTbS+b3IHdD5OG4u3TF5lovRqia6D8I2ltje3p43Ap82I2Bzr7PsIJdWn2h TNgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tURXTHLE; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id y11-20020a056402358b00b0043df9ca3ff8si2228450edc.50.2022.09.02.07.22.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Sep 2022 07:22:07 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tURXTHLE; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 659E484A8B; Fri, 2 Sep 2022 16:22:04 +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="tURXTHLE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 31E4084AA0; Fri, 2 Sep 2022 16:22:03 +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-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) (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 297C984A86 for ; Fri, 2 Sep 2022 16:22:00 +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-x631.google.com with SMTP id p18so2016435plr.8 for ; Fri, 02 Sep 2022 07:22:00 -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=edbKcj9MJPnMAmZpthKKCdcJcfFmrfGiFv+UoETOY6Q=; b=tURXTHLEIRb6DRqPhc0OP7iCwim5WMNCHIWiVHCX1jj6XhZMIbYbcoF7Im/ZeOEWKL M0D99qyo5NR67IN4ewqRms2hpMscatxCGIZon5dTuGV8reK7G1avK2gcSwEu8hzw9UbM +j96fMXhHSE11xGliVujVXKtmXCevKZZmo6Qgb57+0qw/ZsJDNlrTi3dbcBYwPb7jpdr EcQyr4Lq5o3nEP6LnRou7UgNqwa93IkNT6FYmRBX+m/y98Rwk4IwhQhlb/Qw7VBntBUZ YLf1NRylrnmBTSdzKD8LkNNX5CZCGK93yTdWSokopJPJUKbOMa6PbCPfoGVmMfsHVM1K 9RzA== 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=edbKcj9MJPnMAmZpthKKCdcJcfFmrfGiFv+UoETOY6Q=; b=ZjjWZnM3cQxwNybXUnwWqKVs2aCPaPgzGhEUxckvdpKNUb8oewpqc8KGmVk0pypEB9 Yd8Pibrux8LZEXYvjzuheILCy/O3BtOYzkgQ451GICdHMxzmV0UHQBW6Nf40tjqc05Ay YzeRMyzJHmh1ay7EMMnhkV0IJkAGgZ4RZiQfli2jATQN3RnZPZ7ZncOv5f5Z6T5/wmtC 7McXRs8vnCKQeekKsxbL3eBfwewz2FlhxwZu+zpN28EGe7RCmZkInJErWRQ44Bc6/59y snREovtCXFUfnp6d+quLuh0Ex5gewCXjq0P9e8h7dGDY3cinvr3EWWnVMhXcxCggzc2C 7a9g== X-Gm-Message-State: ACgBeo3WnQCGFqwUNM1FUoQc8K8aw9LWOoGAlI5v+yFhEKqGmRS+Xpio NcR6pIb/LaQutc/kc6UUB/rnK2TN5af8Sw== X-Received: by 2002:a17:902:f105:b0:173:37d3:799e with SMTP id e5-20020a170902f10500b0017337d3799emr35925564plb.88.1662128517988; Fri, 02 Sep 2022 07:21:57 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id i8-20020a17090332c800b0017272667a56sm1678485plr.196.2022.09.02.07.21.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Sep 2022 07:21:57 -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 v15 00/10] enable menu-driven UEFI variable maintenance Date: Fri, 2 Sep 2022 23:23:39 +0900 Message-Id: <20220902142349.16722-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_v15 [Major Changes] - rebased to v2022.10-rc3 - there is detailed changelog in each commit 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 | 2462 +++++++++++++++++ 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 | 350 +++ 19 files changed, 3393 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