From patchwork Wed Aug 24 04:27:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 599711 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp2894261mae; Tue, 23 Aug 2022 21:26:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR7nbft/IudfB73u/WVGDqW14C25rYzSconON4tvVGZR/N+gjAdbmpcLEQpB53SY6jVTzbjS X-Received: by 2002:a50:fd88:0:b0:446:956d:d83e with SMTP id o8-20020a50fd88000000b00446956dd83emr6115519edt.308.1661315210796; Tue, 23 Aug 2022 21:26:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661315210; cv=none; d=google.com; s=arc-20160816; b=leZVrcc0E8CnfiDTGgoEizGhfOjknjtovpwifbyaq/r7Di5P1GTI9MYHNLWxcHr5+N AGpz212T4iAHIOLxSOZqMQbmLgFOSeKeryd06hSsJcv30EZ3LhuCqxUx/TD/TwVhzPjS GDMDc40lci6M5/k8kjLYfSogRw93yTruagOQOj1igoBaHMOPzgDcMCEwoOjkau1xRQ0E NQfaII2/8pl8fvC/Kd6awTgA8HNqLLu0TK5mNIuP026yxndpqcysmb8q1/6NIad4rkWl 0vtxFwdg4P7yNb+s0pvvx7GDgiKt34j1b4AR2Lsvv4/Q2L5+3HxSKHbsAJ6FsF6SQwv0 g1bA== 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=Wik4TBEcyz4tdN2+rtSpgT6GjE17GPF7nY8AoSUcJQc=; b=0IZlIJ4vGBOvPIRsfArZ9Sw5pd8ahsUE7QFzwJvdNmKowjcBUYidmnr1buSex8b/hL LXFI5Py9CqvqH7+naKq09jublIoNKI5YQiMLemmSipp4M7YoKxWD398+B4ltXTJ/HyvT V2uy0ywSQd8gOUXli0OOMq2D8z7avDe+aced/0qzcA6nKkKzLBksIdzTNcgdb5L5f1RS H3W13102GX/PJxFksokQBI5s2p6K85ETfcTf4DwEZJECbNYLE5KvqwxXgmvJD0pkak53 JSymPfnKTxwHrdye2jBpEiZSYcxf8V1XIdhD7330HufDVmE2sqpBsblz0MhBr4upWjFp D0SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ApHJc7CY; 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 du6-20020a17090772c600b0073d72e1633bsi1769369ejc.908.2022.08.23.21.26.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Aug 2022 21:26:50 -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=ApHJc7CY; 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 0DE578452F; Wed, 24 Aug 2022 06:26:48 +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="ApHJc7CY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ABD078452F; Wed, 24 Aug 2022 06:26:46 +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-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) (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 416CD8456E for ; Wed, 24 Aug 2022 06:26:43 +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-pj1-x102f.google.com with SMTP id r14-20020a17090a4dce00b001faa76931beso366476pjl.1 for ; Tue, 23 Aug 2022 21:26:43 -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=Wik4TBEcyz4tdN2+rtSpgT6GjE17GPF7nY8AoSUcJQc=; b=ApHJc7CYnSrJY8l+2gEX3YyLlumtyr5RV1RHM+tpF9R5yebbfvtw1q6Jj/zm/slkv0 ZXsScc9+3TeX3qRhASdCoxLSFss5VVXnxpaf88t6fRn+kqmew5CZzG01PlhEeCwQcu72 SYK3G0dyQYh4YSXoGY05nPwlfKk94hhnNzbU0MNPM02YyFimhfGAjJi8s6T0Z/62BYHJ q0YUTZJl2tzTL6Po7tArhiLhHnOZ40IxB3lIVUyeg4S3DwfGaaY/OfrFEwrIUbnTy0BI aQP6RVVjKdVGIxkTpIBM4SwbK1tcAqO5F+3Vw3wR4fsYB8LfCpkUv4LWpgfzzrCHhDL9 onbA== 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=Wik4TBEcyz4tdN2+rtSpgT6GjE17GPF7nY8AoSUcJQc=; b=R2aTjnTZnJcp6p0hsorwbSywh17iHqmCdz/Dpf6v8GnQK8VBsV4L3p9q9Mu7AEode/ ibYqLXM/h9tX8g5/JuIFWiGH6B4dlfxAsSTItmUizp/GGlIhQhCmH29x37qOE2/WFkjl v9r/Krr5jt0tNRBGiOop9JkLpeL/RFyxmT2OZfdBxlzrkgWA1fkZddlifVhGb6jEVo+U a8MWXqlJ+Qp8maKyKQO1pV+QIsyrYzPlHvcUl0oJMUZ8uzK5tfpQvqGkQjPA13ivy0CJ AAG5Rp5NQkzAck63/SSavXfx2OLq/7UoKO4gxE891zKDjT8etGncNWy7aYFVPZ8FkSzH 5aYQ== X-Gm-Message-State: ACgBeo1WunZ2OqWu5XUZbB8iJutiuSB/OonifmIfTJBzh7WSZfxiI0y7 rd8TJaLjy3AKBxwzVE5ikZx3KJOpjxFgYg== X-Received: by 2002:a17:902:76cb:b0:170:9f15:b9a1 with SMTP id j11-20020a17090276cb00b001709f15b9a1mr27035176plt.95.1661315201199; Tue, 23 Aug 2022 21:26:41 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id g21-20020a170902d1d500b0016397da033csm11280965plb.62.2022.08.23.21.26.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Aug 2022 21:26:40 -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 v12 0/9] enable menu-driven UEFI variable maintenance Date: Wed, 24 Aug 2022 13:27:40 +0900 Message-Id: <20220824042749.27434-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_v12 [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 | 2443 +++++++++++++++++ common/menu.c | 9 + configs/sandbox_defconfig | 1 + doc/usage/cmd/bootmenu.rst | 74 + doc/usage/cmd/eficonfig.rst | 63 + 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, 3347 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