From patchwork Wed Apr 1 23:28:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Robinson X-Patchwork-Id: 1265407 X-Patchwork-Delegate: twarren@nvidia.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=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=b9BXXhaN; 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 48t2Tk1kPVz9sRN for ; Thu, 2 Apr 2020 10:29:30 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E481180428; Thu, 2 Apr 2020 01:29:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="b9BXXhaN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A07E9803DB; Thu, 2 Apr 2020 01:29:11 +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,FREEMAIL_FROM,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (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 35C0580117 for ; Thu, 2 Apr 2020 01:29:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pbrobinson@gmail.com Received: by mail-wm1-x341.google.com with SMTP id t128so1547527wma.0 for ; Wed, 01 Apr 2020 16:29:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HYIj6lfyDW7YU2p4tyZjMo7xosHtOrtnvbib7m1sX2Y=; b=b9BXXhaNuN25igaHQe4YDJhWWA0CNhtYP1SUsRgDisYre6Jh9ASTIV81Jqg4lHCzBV OFMVR9qeiSe693rDwuz9gfZHSBdV/vPcohn+AC5aqJWCrZhjysx/YcTiC9rN2gIA8r4/ yLQU3WZ7XOn72SonZR5jLeDSHob2LFR4fT5SKqncfUC9r9zTyfD5ecVlEsdyjnIcKvMw iLbIX6YfUZoWDmJcu2ompz20DVbFkaJNRPHv4BNgS1Pl3ccQeQSUDM4T2KHK3gu+MQsg 5PrXuBNFj10pKLy6y07U7jQhwXUD1zRRyo9LF0ivQxi3YsUCQNdnuM1wW8aEqCx2s+Wz 8MCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HYIj6lfyDW7YU2p4tyZjMo7xosHtOrtnvbib7m1sX2Y=; b=j/fuOYpPs2V6QhDPPmLsgqkhmezIyJNDUOM6j5aGAD6OJVp4rQEgcAuTTahgQ3q+F1 6n4rZBhyHIGNe98GErSlPDOghXBJelv2AoMR+/fmaOmXnL8m5C8TQOWusxYZmKEn5wbg Rlka8FKBBZrKxchgJVZ2fLtCK1fMzc+V2BTn+yaUCQJHhaCIcmcLZa14q+fZeJ+SzAkC 2O0HBmRWp/N7l0fIZrc2vtFBskocroMWEKJ2HGCt426T1eohEVNwrrRVdOxV+WSYpdiE srCFnp0KcQdHM0te4XajoVn9gOuXPwSCurteOtTaEvyYMes8kmmWtVdMjHlABaFNL70P gfgg== X-Gm-Message-State: AGi0PubKJJOEESjx8Nr/suATP5TyClpl0NzIFnvusvmYUf1DIadQmUWb uUF0BBgybIhos8UXQpxMOCg= X-Google-Smtp-Source: APiQypJjRj5sLSDSRlf/rhKnYbebdGBRtpNeRFkSqgzwYbQPSaSuY1j6K0W7z9AbAvFSXkGmjvqM3w== X-Received: by 2002:a05:600c:20a:: with SMTP id 10mr381718wmi.189.1585783746806; Wed, 01 Apr 2020 16:29:06 -0700 (PDT) Received: from morpheus.roving-it.com.com (2.e.6.5.c.a.a.1.a.8.0.3.1.e.3.c.1.8.6.2.1.1.b.f.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:fb11:2681:c3e1:308a:1aac:56e2]) by smtp.googlemail.com with ESMTPSA id a12sm3396349wmj.22.2020.04.01.16.29.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 16:29:06 -0700 (PDT) From: Peter Robinson To: Tom Warren , Thierry Reding , Stephen Warren , u-boot@lists.denx.de Cc: Peter Robinson Subject: [PATCH 2/2] arm: tegra: add options for BOOTENV_EFI_SET_FDTFILE_FALLBACK for tegra186 Date: Thu, 2 Apr 2020 00:28:55 +0100 Message-Id: <20200401232855.494797-2-pbrobinson@gmail.com> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200401232855.494797-1-pbrobinson@gmail.com> References: <20200401232855.494797-1-pbrobinson@gmail.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 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.2 at phobos.denx.de X-Virus-Status: Clean Upstream linux DT naming doesn't align with the U-Boot DT, which may not always be the case so this allows using BOOTENV_EFI_SET_FDTFILE_FALLBACK where it might be appropriate for some boards. Signed-off-by: Peter Robinson --- This is a bit of a hack for the Jetson TX2 because the U-Boot config using a different naming for the DT naming to upstream Linux, I'm not sure what naming L4T uses, and whether the 000/500 variants are widely enough available or whether they use differnet DTs in L4T. Welcome to suggestions of a better way to fix this one but it works for booting the TX2 on Fedora using UEFI.. include/config_distro_bootcmd.h | 2 ++ include/configs/tegra186-common.h | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index fc0935fa21..fd1c5f5afa 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -118,8 +118,10 @@ "setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; " \ "fi; " #else +#ifndef BOOTENV_EFI_SET_FDTFILE_FALLBACK #define BOOTENV_EFI_SET_FDTFILE_FALLBACK #endif +#endif #define BOOTENV_SHARED_EFI \ diff --git a/include/configs/tegra186-common.h b/include/configs/tegra186-common.h index 5c3ad35c76..d5f21e0907 100644 --- a/include/configs/tegra186-common.h +++ b/include/configs/tegra186-common.h @@ -20,6 +20,12 @@ /* Generic Interrupt Controller */ #define CONFIG_GICV2 +#undef FDTFILE +#define BOOTENV_EFI_SET_FDTFILE_FALLBACK \ + "if test -z \"${fdtfile}\" -a -n \"${soc}\"; then " \ + "setenv efi_fdtfile ${vendor}/${soc}-${board}${boardver}.dtb; " \ + "fi; " + /* * Memory layout for where various images get loaded by boot scripts: * @@ -49,7 +55,6 @@ "scriptaddr=0x90000000\0" \ "pxefile_addr_r=0x90100000\0" \ "kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \ - "fdtfile=" FDTFILE "\0" \ "fdt_addr_r=0x82000000\0" \ "ramdisk_addr_r=0x82100000\0"