From patchwork Fri Jul 15 14:47: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: 590844 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5817:0:0:0:0 with SMTP id j23csp569491max; Fri, 15 Jul 2022 07:45:20 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tj/ayTVY+dEl3v5GWNT/pIgbhcJPdYRRHu8mPbKNu4Wj2du+Y4S4DuMzR4SPTCBl0xExnN X-Received: by 2002:a02:9384:0:b0:33f:4f23:f268 with SMTP id z4-20020a029384000000b0033f4f23f268mr7498985jah.213.1657896320498; Fri, 15 Jul 2022 07:45:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657896320; cv=none; d=google.com; s=arc-20160816; b=fUo6c+ZqFYsHLesT5ViOx8Z0lC5cjN3b83igsfCHNb/GwIhtOTi3s9x4Mpu0DQWxYZ 0XqCuUWVt4LxCl91SJkx5yttmXQPzniWt9ePYkXDHiw24pIF0xvkLmhkbhOSOnoiT+Hj yIo2bO/0Ho6dTvxdszVHnDfv1PKtytPjrv8ZMyCeN1t0sP4AulC86xPohhJXKbvs9iSh Kj0JhKbAifxtMKCFtS9pWDc1b3iPs+SQcpdOxnrdixb1D54svsOrDeGHUumhaHriSlso pnxQ096ETsvbdODEzczdSHQuz8RXn2iml7N1n8EIFBq+4sJZTe37k3UZuXK568kY2RK5 8cSA== 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=+3xV6Qgqf0R5+6rSqmnJSDuWMJHjIJhlrWH+4PigptA=; b=okUTRBJfqVp1vmbnn9G0/21yUK6EQORf/BotjfNuxFs87/ron5WSYtuT1HN7PILpUV 9Gs9Vmtpc8pD6F2vZEgeA827bZdoQKh2u+Gdx9mVieJK1XJE56Z9CAH5Tw/eCWBl1w6S OmuYUYzO37tZVBa8INKDGO75WaeqJehmNlO/TojzP2GPAdzo/Z+m0hl7tFw5ZElMIb2E 9yK+W/OvxgG2rp8krStDgMPLPTv9UKDgnm6QpgBDrAuc9GSgj1lmbbXCyUa1ubWekSye 9dPJ7dbQt71zoClVoYXwqsrjhe6HbdhivI23/HDW+Z4dNNXYIULi+8N5U/JoflyKDr0Y 51vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TV0Fr7VC; 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 p25-20020a02b399000000b00339e9f1a291si4604592jan.72.2022.07.15.07.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jul 2022 07:45:20 -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=TV0Fr7VC; 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 9C07180909; Fri, 15 Jul 2022 16:45:15 +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="TV0Fr7VC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9F567810E8; Fri, 15 Jul 2022 16:45:13 +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-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) (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 6258180584 for ; Fri, 15 Jul 2022 16:45:10 +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-x52a.google.com with SMTP id s206so4607708pgs.3 for ; Fri, 15 Jul 2022 07:45:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=+3xV6Qgqf0R5+6rSqmnJSDuWMJHjIJhlrWH+4PigptA=; b=TV0Fr7VC6ZVNyLpmKTMz3x+SjG9ZN3OjSHcrO0/4D2tuNXfsr8wXK5R83M3RSXxe7i TPJmpK0ZVzpJ79ZpEbxjRjbk1k8zVvg+2lzWO//L1RRoiFbBrWaUakGQ7Hp9GxtHKHwy k9rEka8rBV53vw8spqyjDM1Mgm0OZBdDJKwnLL/Yz+N/o/LrVy/rglQ+7jN8+388zDGN 6AV4TLYLJhahf7RjDSNodt9niyjxKKWXuRUOwR9S92ijdGFUh1GETJ+WKOIVioT5xisp jVxnqonZZbInSM0+Dqm2N7cwwja7iQN/Uoe1saDbvWdaHkfTwkXhcI0NYSeIi7mPL86b c/fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=+3xV6Qgqf0R5+6rSqmnJSDuWMJHjIJhlrWH+4PigptA=; b=mgq5XaB3d/QiAdgVs8IQhd+CQVu0cZzCdDZ0w9xp3KDEz9Iej0UvNjwa3ZsIbZHzxk iYaXBKGmiR44DndwTKLWBuxDm/QuOS/xuTst4CWwkLEg7kaurATruebGeCCKP2le47gk E+ng15BEvgGkpSv1UaXMMrY/wMKW+Inl32IKET00SPAJHdGyjK3z5V6MuP7icYM0uN7u mioR/e3n3PAsWQAZdflD7EjGBT3nJJdY2IsHGHEnV4MMhf5K5BkaVUm3FlPB5CuixAfM wniVVfq5DVJSScr9ak8FT+OQdz+8w71YnOHOfyUzjAkfHEJualhrpcoCAC0d2eeO+q50 AOPA== X-Gm-Message-State: AJIora+TI6PDFr6eMWubUzJDNXhT0JuQpI2JrID8jn6tFzZm96KsWJ4k u6BLPtulcjGGQC4CT59CpjL2e6VSeFGzZg== X-Received: by 2002:a05:6a00:8c7:b0:528:1aa1:5283 with SMTP id s7-20020a056a0008c700b005281aa15283mr14372246pfu.81.1657896308532; Fri, 15 Jul 2022 07:45:08 -0700 (PDT) Received: from localhost.localdomain ([240d:1a:cf7:5800:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id u16-20020a170903125000b001690d398401sm3719923plh.88.2022.07.15.07.45.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jul 2022 07:45:08 -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: [RESEND v9 0/9] enable menu-driven UEFI variable maintenance Date: Fri, 15 Jul 2022 23:47:40 +0900 Message-Id: <20220715144749.30564-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 Let me resend this series because previous post did not contain the version number of patches. 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. The python based test will follow this series. Source code can be cloned with: $ git clone https://git.linaro.org/people/masahisa.kojima/u-boot.git -b efi_menu_upstream_v9_0715 [Major Changes] - rebased efi-2022-10-rc1 - there is detailed changelog in each commit Masahisa Kojima (9): efi_loader: move udevice pointer into struct efi_object eficonfig: menu-driven addition of UEFI boot option eficonfig: add "Edit Boot Option" menu entry menu: add KEY_PLUS and KEY_MINUS handling eficonfig: add "Change Boot Order" menu entry eficonfig: add "Delete Boot Option" menu entry bootmenu: add removable media entries doc:bootmenu: add description for UEFI boot support doc:eficonfig: add documentation for eficonfig command cmd/Kconfig | 7 + cmd/Makefile | 1 + cmd/bootmenu.c | 103 +- cmd/eficonfig.c | 1992 +++++++++++++++++++++++++++++++++ common/menu.c | 6 + doc/usage/cmd/bootmenu.rst | 74 ++ doc/usage/cmd/eficonfig.rst | 49 + doc/usage/index.rst | 1 + include/efi_config.h | 91 ++ include/efi_loader.h | 71 ++ include/menu.h | 2 + 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 | 66 +- lib/efi_loader/efi_file.c | 75 +- 16 files changed, 2608 insertions(+), 59 deletions(-) create mode 100644 cmd/eficonfig.c create mode 100644 doc/usage/cmd/eficonfig.rst create mode 100644 include/efi_config.h