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 CE77EC77B7A for ; Fri, 26 May 2023 21:37:55 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4F430846A2; Fri, 26 May 2023 23:37:53 +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="b/KRZXzy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3813185D24; Fri, 26 May 2023 23:37:52 +0200 (CEST) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (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 AD8528464D for ; Fri, 26 May 2023 23:37:49 +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-qk1-x72b.google.com with SMTP id af79cd13be357-75b0df81142so163716785a.2 for ; Fri, 26 May 2023 14:37:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685137068; x=1687729068; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=J5uIoWDg34F9MiJ4ImrONsdekNmlkSf8u4XzzttmEDs=; b=b/KRZXzyYP5V31VMxGdTveZt7hhGHXQ8LvtHk1P4E3V21Eh/psFhrIVrX9/rWDY0Xp eDvV7QFVEN3i//3FIITK6awXCvy19QpaFVyrGkxoOV709EKKkyM6B17JA8gZ0BIieiDL fmmXwhkFzi+aNXE/ZZGEbkVZ2+ewxw89lR/aPCGKFZZfxEt/Wr+CvZggecUeT1oWhHry 4y3esy40utuSD/puaNZrZebsNyQAnlFq5nyCfq+EuchlQKxSxuReRk00/27IIiQgwB6M jEljbbqSAJjiGKJGmslYl5nx/lM+SLB6LGmglmGQm+0gszqsjvoVsxTRfqiWvrloNftL UPog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685137068; x=1687729068; 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=J5uIoWDg34F9MiJ4ImrONsdekNmlkSf8u4XzzttmEDs=; b=VLzCV3duZ3hObwv1G8vaiXj2wgy+77BovBrKVRHAqRFl3jjrGkfzsAcE3mc+UV/Kmz HdwiwRFhU9ud2s8IuGQ9p7GBFOxwj+loesqhtxmYMep8xpcY+hWwJRDVFcYf0pw2l+aD X2M6O1wccmSm/37Awq4VXBzHa2up5fiNctk0Vep5yA7nNkvYKB6y+f0RiwccBax7Biio 4/XWVxi4hcfMfrhJpJlPgtq7fsiQD+qIOesNr7zJRFpYhuS7/xlAq2kInZRvQ/+lY1ON CmKKaRmrj8TNpzwv1UaptRNyyBR/KhyXlFVXHDdP9AZj/CU/TWVGChHQW5p+KkBqSESH 9q1g== X-Gm-Message-State: AC+VfDyYgGqBIcvfClubgKobF78A9Zlw94KRSPRaX7eyALvQZgBARAcq kdrjBEjyuRjf+jPwlFJkMjDI++KpNtbsocB/eEY= X-Google-Smtp-Source: ACHHUZ6/uVDAF3M/wLhx6I17agqdDc1jwr3/DFKFPAQ0YcZfuhCpFNeinOtwDsloaxzTddmPOIKeTA== X-Received: by 2002:a05:620a:81b:b0:75b:23a0:decb with SMTP id s27-20020a05620a081b00b0075b23a0decbmr818493qks.73.1685137067971; Fri, 26 May 2023 14:37:47 -0700 (PDT) Received: from ubuntu.localdomain (cpe688f2e182063-cm688f2e182060.sdns.net.rogers.com. [174.114.251.9]) by smtp.gmail.com with ESMTPSA id p22-20020a05620a15f600b0075b196ae392sm1437529qkm.104.2023.05.26.14.37.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 14:37:47 -0700 (PDT) From: Raymond Mao To: u-boot@lists.denx.de Cc: Raymond Mao , Heinrich Schuchardt , Ilias Apalodimas , Simon Glass , Masahisa Kojima Subject: [PATCH v6 0/3] Boot variables management for removable media Date: Fri, 26 May 2023 14:36:47 -0700 Message-Id: <20230526213650.990816-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.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. 3.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 (3): Move bootorder and bootoption apis to lib Boot var automatic management for removable medias Load option with short device path for boot vars cmd/bootmenu.c | 2 +- cmd/eficonfig.c | 408 +---------------------------------- include/efi_config.h | 5 - include/efi_loader.h | 11 + lib/efi_loader/efi_bootmgr.c | 381 ++++++++++++++++++++++++++++++++ lib/efi_loader/efi_disk.c | 7 + lib/efi_loader/efi_helper.c | 25 +++ lib/efi_loader/efi_setup.c | 5 + 8 files changed, 436 insertions(+), 408 deletions(-) -- 2.25.1