From patchwork Wed Sep 23 21:15:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 1370092 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=walle.cc header.i=@walle.cc header.a=rsa-sha256 header.s=mail2016061301 header.b=OgqfFcIR; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BxWFL4CxMz9sR4 for ; Thu, 24 Sep 2020 07:16:22 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C103D824C6; Wed, 23 Sep 2020 23:16:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=walle.cc header.i=@walle.cc header.b="OgqfFcIR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 293F6824DB; Wed, 23 Sep 2020 23:16:09 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from ssl.serverraum.org (ssl.serverraum.org [176.9.125.105]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C02278246A for ; Wed, 23 Sep 2020 23:16:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michael@walle.cc Received: from apollo.fritz.box (unknown [IPv6:2a02:810c:c200:2e91:6257:18ff:fec4:ca34]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id E10D822F53; Wed, 23 Sep 2020 23:16:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1600895765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=BKn3A566Y+2PvDmdh+JpYVXJBmIeLhx/LcVJCUPDyJc=; b=OgqfFcIRub8Z9fBKkDEEDzrI4eREi1iiFT47n7p/sAL6kCK+/+453sJnwuBxe8sBO+MLMJ 0yC3CYDU3s5q2u+OqXyLbi7/FASih3OhPK0qfEzU1qwWpxzNPbZmypWKBvz+Oz2YuO2xx7 eBBpyFYUGJl5ZGriF4eIVnB+rDZUsc8= From: Michael Walle To: u-boot@lists.denx.de Cc: Heinrich Schuchardt , Rob Clark , Michael Walle Subject: [PATCH] distro_bootcmd: call EFI bootmgr even without having /EFI/boot Date: Wed, 23 Sep 2020 23:15:50 +0200 Message-Id: <20200923211550.18678-1-michael@walle.cc> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Currently, the EFI bootmgr is only called if there is a EFI binary inside the path for removable media is found, i.e. /EFI/boot/. This doesn't make sense. It is the duty of the bootmgr to find out the path and name of the EFI binary to boot. It should be called even if there is no /EFI/boot directory. Thus, call the bootmgr before we try to boot the EFI binary inside the removable media path. Signed-off-by: Michael Walle --- include/config_distro_bootcmd.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index fc0935fa21..c745f115f8 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -123,12 +123,14 @@ #define BOOTENV_SHARED_EFI \ - "boot_efi_binary=" \ + "boot_efi_bootmgr=" \ "if fdt addr ${fdt_addr_r}; then " \ "bootefi bootmgr ${fdt_addr_r};" \ "else " \ "bootefi bootmgr ${fdtcontroladdr};" \ - "fi;" \ + "fi\0" \ + \ + "boot_efi_binary=" \ "load ${devtype} ${devnum}:${distro_bootpart} " \ "${kernel_addr_r} efi/boot/"BOOTEFI_NAME"; " \ "if fdt addr ${fdt_addr_r}; then " \ @@ -152,6 +154,7 @@ "run load_efi_dtb; " \ "fi;" \ "done;" \ + "run boot_efi_bootmgr;" \ "if test -e ${devtype} ${devnum}:${distro_bootpart} " \ "efi/boot/"BOOTEFI_NAME"; then " \ "echo Found EFI removable media binary " \