From patchwork Fri Feb 25 01:32:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 545896 Delivered-To: patch@linaro.org Received: by 2002:ac0:d8d1:0:0:0:0:0 with SMTP id b17csp732917imj; Thu, 24 Feb 2022 17:31:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmnQpiLFKkuEDr775+Ar4C8QHyz5kllbVl0I8ySTn0SUhHScHAUSHIyZqRffCigInJx6w+ X-Received: by 2002:a17:906:960c:b0:6cf:cd37:658c with SMTP id s12-20020a170906960c00b006cfcd37658cmr4442668ejx.325.1645752707151; Thu, 24 Feb 2022 17:31:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645752707; cv=none; d=google.com; s=arc-20160816; b=aYvhp3KlbIBMriEcfHR9l2yebwyksQ7lsongYA0uHfnBi9/qYVZ/s6oBEUw6ewLGEL /MlikCdMNGr93rl1Gt8DmAR4fd57NJZaWaxWMSdmowSupm3tGVv4C+3mvzgKpEIJqy+r 4RqMNyEdKTHxsa0uATcvJag92d1fc9lAbgJxQkjl5UVyISQjsBjgGn+8Wfg/ZjMgXoO3 k97N6jv+NzKCBcteFkaT5YSUfkwffXJQ+lHtp5+fqnCR8iJmmVORk/m5pEBgj/IvIxYt VQrQfQUgX4PYJZ7ephT27U643L3kU/n4nPEd11em1fUyLkj4bc7lZeTbjqYS586yDHTD YXEw== 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=e6johMUOD08mCq/kdhqLSB5hBEyauG2AIyEJ7NNnnWCld6KZg/aA/ptt89TacdApCC cOf9QXf1va6LBZuFGMFdKnRN9CZep2xMQHVOzgwDVKQ66vg1OufMr2kq7qk/kOnfuJIe NdGTZvm3q9kOLeQNUINQ63kwHeRyEKS0YM0tRysc9Uqh8/gwSprAeOeseMOA/118BOKu 7LeDzblakmOtWWOkPKm5X7yWrZcEkBOxhSNWPH/LyCRNTFORzVZcArJp8i3k0Ii8qJda RSZBYBL4pSGQAuoYpqenkuzK9iONVc3eLLLcCNOOXk27ktXKTAxGjodOgmQtT4u8tTP/ lf2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pRZysGlJ; 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 f14-20020a170906824e00b006cfd0097f6asi674445ejx.650.2022.02.24.17.31.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 17:31:47 -0800 (PST) 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=pRZysGlJ; 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 2E02A83C64; Fri, 25 Feb 2022 02:31:43 +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="pRZysGlJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D6BD483C58; Fri, 25 Feb 2022 02:31:40 +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-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) (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 84AAB83C58 for ; Fri, 25 Feb 2022 02:31:37 +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-pj1-x102b.google.com with SMTP id em10-20020a17090b014a00b001bc3071f921so7154887pjb.5 for ; Thu, 24 Feb 2022 17:31:37 -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=pRZysGlJY4DYpoq0PfKQteX7G8rKtcXCSOO6z9s4KbHkwhqurVdlcDIyjRl3AJxy/b mj/WTOAmcAhjE9+MUl0uYyqB/8BIl4BY7UQiP7NOJnBTobJ1lD0quO3DZXGj4HhjeJlG KsE0LjJ6GPJouUo1mK05BqjJeM/quxzTrv4BWIr/8q030qfgpWw4UUtQwp7udrQl+FNX jrddPurOSYl/Jv7jt0cEI9Rs70zVnHakO4P72nj9S89UEthfCiWa6xnqO90Xet2R2c0F iuEcGCDHxK7VryuN6+z26Petn80kzaprXjhrYwcJ36ovj8rD19o30hKxrD27NYyHdUge JDWQ== 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=NMNZOo0oBUTuRwT6LXvcaJfXCyaSk+ShReIinMswX4pHP7Z98KoX3SAYtW8kO+wApT WOijYPD1cf/UA74pQ4exsgxqLeoNhQjCkfpKiJXHz5LETwJSuR4czNULszoyfrdZ7pbN 6D+Jc7B3RFAAxCTRL5ReTNSjpgMW3+GX+mNtla/KprRxZKSbwU9tN/vQwPf+vBQflfra uN0wzZXqCzDF3YTKv+kx9y89r9BxDiDFprRWghuRxCKNf36URjoXZTbYdQ30caE60DI6 UKodefVj8cUc/pJQZPb7WwoJpqXyFAawzC87eDaqCLliSdqBsfDbg7uY8Z89CWjBiHSz PpJA== X-Gm-Message-State: AOAM531xuO+7jzIk0jID3lww9abGw8MSykawk4wSxKz/MkBAaTIGtxJB VpalCQt7quEOzZZdMtpDmaynyZd4cosApQ== X-Received: by 2002:a17:903:22c6:b0:14d:8a9b:a9ad with SMTP id y6-20020a17090322c600b0014d8a9ba9admr5206654plg.141.1645752695827; Thu, 24 Feb 2022 17:31:35 -0800 (PST) Received: from localhost.localdomain ([2400:2411:502:a100:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id n18-20020a056a00213200b004e17d967d13sm703888pfj.124.2022.02.24.17.31.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 17:31:35 -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: [RESEND RFC PATCH v2 0/4] enable menu-driven boot device selection Date: Fri, 25 Feb 2022 10:32:53 +0900 Message-Id: <20220225013257.15674-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(-)