From patchwork Tue Feb 22 16:02: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: 545041 Delivered-To: patch@linaro.org Received: by 2002:adf:a34a:0:0:0:0:0 with SMTP id d10csp367257wrb; Tue, 22 Feb 2022 08:01:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJyflzHS3DhW37HCEao+Z6CCTJgdsS8kyZOi8uHMQVxgxs4EMq/zwOyzyhIgBR3qWYzUonMe X-Received: by 2002:a50:fc05:0:b0:408:4d18:5070 with SMTP id i5-20020a50fc05000000b004084d185070mr27473697edr.365.1645545682655; Tue, 22 Feb 2022 08:01:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645545682; cv=none; d=google.com; s=arc-20160816; b=OuSYJF59XHMJfNLeqnRUPeR02QAZP3E4c3kKozTIat54U+rgRMoRCXUzlwFuRZG5Rp KlSAQ9Z/2fklD0lAYmqoJX+/P2hpk3QThS+J+wGjmg5TpGMvFIsnpmhx9IN/wO6k432p r6950dvi/SDmrRZW3JFu1CLqd+v8KAUQBrElQhT6pgm8RpUwZ+V7RJx8xFKJZJlLSiqU hyiJIWhaYD2w900lHAOXjdpNMIjcvLdXyC+l0F66cWq1RDPSqREgVYS53pEKJFHyvtvw OYBsTdweUdliD9VciFDCrvQiHcPOaFuOxRfHhJQtKjsjLzKhbUBwTnPmBWbrAJVeabja c/WA== 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=AreQfvInGs3s4h+ZOmPwV7Qlu0xdJg7V4KLhUcXpkE0=; b=FTfV8PFgTrws0qpdyQfC4nRlZJSWgDiyIdqAFlWaTOF43oHclOCYMtg7GrJV42Brlk kcY3Sheo+WT4zDgWL72O3F98karts1DbQu4cOYFzZLAxLk6QGVX6xYKrO2WNilC3iUcu A7yPJuFA8SyZLcp81LXc/g1ENu0v9IAjoUbtRFljy8a+YbLjnY8sW3K7muGdGnKXvLn/ 6frB4uuhyf8VgDDhSkD0J4fKY0UUAGyOZAVWqeWWlBHj7fCkXADVwInbgbaNc9uuCwGF N/3SMxQ32ZngGm0PfVNaegcXpfMl6Er0FmBf6QtZr9yMnpamOBMXCzXoUx5Ehev69Bd7 uNyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=orzp2f9d; 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 n6si12619539edr.535.2022.02.22.08.01.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Feb 2022 08:01:22 -0800 (PST) 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=orzp2f9d; 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 4E3EE83CA0; Tue, 22 Feb 2022 17:01:21 +0100 (CET) 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="orzp2f9d"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 67E4F83CA2; Tue, 22 Feb 2022 17:01:19 +0100 (CET) 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-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) (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 C26F783C97 for ; Tue, 22 Feb 2022 17:01:14 +0100 (CET) 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-x532.google.com with SMTP id o23so958206pgk.13 for ; Tue, 22 Feb 2022 08:01:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=AreQfvInGs3s4h+ZOmPwV7Qlu0xdJg7V4KLhUcXpkE0=; b=orzp2f9dKr9arpZJ8uJlVqcTyjupnhZU08yaOlgytoO+yHSenTgkTTpPyTV5SWqJGr 4pceoPGgqkxpizqbTRqOF3/wnwUgFxfg9rg9bHku2aOaTTEHLWNoSRGZvV09mkjAJybO qZauRTwCilbpmN513usQ0J1c+WXHN3ZkXw34CMFYhcWW9W3WVZgvVXLId+0xwPVLRelI cQBB0ePUvprL8Q2pAs3npE997ZVhRFLQYO2lb9W6AAEvdViD1nQnwgRSx5Y82FXiWxcJ of0F8y2zZby5EvbQoJh/a6FT6/kR7o3RAd0tTqWkTtbMQJBo/IO+C84fG6Few8Wyy9Jh tTFA== 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=AreQfvInGs3s4h+ZOmPwV7Qlu0xdJg7V4KLhUcXpkE0=; b=UC6r4e5rTmPRDjHfLewDh+WCvij4zwLoXJBqqieU+afZ2xkqtCy4GpWuB/SPFI2hGB dR1aP7dZYQDrM76zNCCKe+62ucltGpAJZCCnDeFQ1dz3n1AqC6jboA86dPAppBG5eQrO a16vZptDlM6w647+R7D4lH3OqHgXq/BpiRQLFu+cYHvXCSinbA66O+g6L7xE+FvTdCKi fA/oKfMzjEEJI2m5Am0ji8AyCCJXG87yQnJy1z1rDEscqvMPpK7MlMdAWYhXfbbHC40L 9LKgBfsdiD6lbi5CkDdu8X13LtWZbQFDL6aYVO6Zb43HWNY0a63/qO6jVCEZnx8AROXJ gdbg== X-Gm-Message-State: AOAM5307vu3djQoStRFwti1zlBYXC8CBUC5rjkqdpDXncwYXliANwQn/ tgTNeao9bDRrbAyjriL7mHHKhA+cIxABhg== X-Received: by 2002:a05:6a00:124b:b0:4f0:eaa7:4677 with SMTP id u11-20020a056a00124b00b004f0eaa74677mr20704600pfi.85.1645545672987; Tue, 22 Feb 2022 08:01:12 -0800 (PST) Received: from localhost.localdomain ([2400:2411:502:a100:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id h6sm3017683pjs.30.2022.02.22.08.01.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Feb 2022 08:01:12 -0800 (PST) From: Masahisa Kojima To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Takahiro Akashi , Francois Ozog , Mark Kettenis , Masahisa Kojima Subject: [RFC PATCH v2 0/4] enable menu-driven boot device selection Date: Wed, 23 Feb 2022 01:02:31 +0900 Message-Id: <20220222160235.24748-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.5 at phobos.denx.de X-Virus-Status: Clean This patch series adds the menu-driven boot device selection. This menu also provides the functionality to add and delete Boot#### variable, and edit the BootOrder variable. This menu appears with the command "bootefi bootmgr", the menu structure is as follows. * Menu structure [Boot Manager] -> select Boot#### to boot [Boot Manager Maintenance] - [Add Boot Option] -> add new Boot#### variable - [Delete Boot Option] -> delete existing Boot#### variable - [Change Boot Order] -> update BootOrder variable * Things to consider - eliminate EFI_CALLs - replacement of ANSI_CLEAR_CONSOLE * Remaining items - Support of adding Boot#### other than block device(e.g. network) - error notification Masahisa Kojima (4): efi_loader: add menu-driven boot device selection lib/charset: add u16_strlcat() function test: unit test for u16_strlcat() efi_loader: add menu-driven UEFI Boot Variable maintenance cmd/bootmenu.c | 145 ----- common/menu.c | 137 ++++ include/charset.h | 15 + include/efi_loader.h | 27 + include/menu.h | 20 + lib/charset.c | 20 + lib/efi_loader/Kconfig | 20 + lib/efi_loader/efi_bootmgr.c | 1105 ++++++++++++++++++++++++++++++++- lib/efi_loader/efi_boottime.c | 55 +- lib/efi_loader/efi_console.c | 81 +++ lib/efi_loader/efi_file.c | 74 ++- test/unicode_ut.c | 45 ++ 12 files changed, 1548 insertions(+), 196 deletions(-)