Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7EBDBEB64D9 for ; Mon, 19 Jun 2023 21:23:58 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CBB13860A9; Mon, 19 Jun 2023 23:23:55 +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="blWL92KC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6EFE3860BB; Mon, 19 Jun 2023 23:23:54 +0200 (CEST) Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) (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 D99A086093 for ; Mon, 19 Jun 2023 23:23:51 +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=raymond.mao@linaro.org Received: by mail-qv1-xf2f.google.com with SMTP id 6a1803df08f44-62de5392c7bso25712896d6.2 for ; Mon, 19 Jun 2023 14:23:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687209830; x=1689801830; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=yEWaZkvoqvdSokrK5vZn/Qz9nQVHdXQse2CjAHawUss=; b=blWL92KCLbkz/LT+eEfRj4uhVe0LZkGda2i+F8T37F2QLHO38hmUwxldbVelMnyp4c bvGJC9BJDPf4/bTE9jyW5Vkhnr4m844oaGwFeRakoZkRTbiwg1KlIe0G+ZRWJePqo+fM L11qLAXm4cxfTl3EvcsCIWOwJz7G9JTteQ17V98LhmHVpJpsrEnKksR6tOQ4hj3+Vr/Z PNRu4+Fazfkju8Ov44Djt90KJqSCxR8S2IoxGe7eAJJJlHLFzKn63RFGo5Uk95MP/nN4 cHM8GozdscIOXK25RA1A+iFhAXc4cqq8eDsBFdtuvbgE1oocWYNdySIt+S6dNVMuh2RC ycsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687209830; x=1689801830; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yEWaZkvoqvdSokrK5vZn/Qz9nQVHdXQse2CjAHawUss=; b=DdpPruEliAe5e58s807ogGej20mOkHaky3vvqFS2ARLY1vsYbZz4y365R8qJ3hOoLj L6KW3/6gzIdM/v72FoprPKbScAyMr9DqawQz1hxs1tJB3gjQ6WaYhwZam5jFQZMKA7rb Cez/wrJXCvQ8aX1qvM9tsNF1MqiInMtpB2h9U+iqvAmF7sPCaoySW/DtZWk41gCJh3ej HhTcpN3/EzbB2alKG/mQ1nCpXpexRFHo2dR+ui+EUZkptIZYTjHovrFdJVfk/jKLrtOb Zq1eY5MFcXA3KW+mmOK7duQxPcRH4R4Oqatka6MYeMyrrVxl3HezIehE51AXkU2soCDX O8gA== X-Gm-Message-State: AC+VfDw4RGnNE/xaHTrI35ppQ/Txgpn+pSd+pR4zPmvvpcUxYJeUH6mr a9QlLa5ERNuKa6ATh38TCzH/ENqrxWBYsGCRWe8= X-Google-Smtp-Source: ACHHUZ5ZS3dU/SPyUHNHmZ5OsAJEwY48MoPEMlTEakiBc8UlHfbchu4dDQm/75lSRrTdb9VYvTIOwg== X-Received: by 2002:a05:6214:5199:b0:630:1531:acf2 with SMTP id kl25-20020a056214519900b006301531acf2mr6335775qvb.46.1687209830338; Mon, 19 Jun 2023 14:23:50 -0700 (PDT) Received: from ubuntu.localdomain (cpe688f2e182063-cm688f2e182060.sdns.net.rogers.com. [174.114.251.9]) by smtp.gmail.com with ESMTPSA id e8-20020a0ce3c8000000b005ef442226bbsm412407qvl.8.2023.06.19.14.23.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 14:23:49 -0700 (PDT) From: Raymond Mao To: u-boot@lists.denx.de Cc: Raymond Mao , Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Masahisa Kojima Subject: [PATCH v10 0/4] Boot variables management for removable media Date: Mon, 19 Jun 2023 14:22:57 -0700 Message-Id: <20230619212303.128288-1-raymond.mao@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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.8 at phobos.denx.de X-Virus-Status: Clean Major changes: 1.Rename and move bootorder and bootoption apis from cmd to lib for re-use between eficonfig and bootmgr 2.Fix incorrect return code of boot option update Correct the return code for out-of-memory and no boot option found 3.Changes for complying to EFI spec ยง3.5.1.1 'Removable Media Boot Behavior'. Boot variables can be automatically generated during a removable media is probed. At the same time, unused boot variables will be detected and removed. 4.The boot variables automatically generated for removable medias should be with short form of device path without device nodes. This is a requirement for the case that a removable media is plugged into a different port but is still able to work with the existing boot variables. Raymond Mao (4): Move bootorder and bootoption apis to lib Fix incorrect return code of boot option update Boot var automatic management for removable medias Load option with short device path for boot vars cmd/bootmenu.c | 4 +- cmd/eficonfig.c | 410 +---------------------------------- include/efi_config.h | 5 - include/efi_loader.h | 11 + lib/efi_loader/efi_bootmgr.c | 385 ++++++++++++++++++++++++++++++++ lib/efi_loader/efi_disk.c | 18 ++ lib/efi_loader/efi_helper.c | 25 +++ lib/efi_loader/efi_setup.c | 7 + 8 files changed, 455 insertions(+), 410 deletions(-) -- 2.25.1