Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Aug 2015 21:47:07 +0000 (UTC)
From:      Oleksandr Tymoshenko <gonzo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r286815 - head/sys/boot/uboot/fdt
Message-ID:  <201508152147.t7FLl7DJ081651@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gonzo
Date: Sat Aug 15 21:47:07 2015
New Revision: 286815
URL: https://svnweb.freebsd.org/changeset/base/286815

Log:
  Make dtb file configurable via loader(8) variable. ubldr already checks
  "fdt_file" and "fdtfile" U-Boot variables. Add one more check for
  "fdt_file" loader(8) variable.
  
  loader(8) variable takes precedence over u-boot env one

Modified:
  head/sys/boot/uboot/fdt/uboot_fdt.c

Modified: head/sys/boot/uboot/fdt/uboot_fdt.c
==============================================================================
--- head/sys/boot/uboot/fdt/uboot_fdt.c	Sat Aug 15 21:46:02 2015	(r286814)
+++ head/sys/boot/uboot/fdt/uboot_fdt.c	Sat Aug 15 21:47:07 2015	(r286815)
@@ -69,10 +69,11 @@ fdt_platform_load_dtb(void)
 	}
 
 	/*
-	 * If the U-boot environment contains a variable giving the name of a
-	 * file, use it if we can load and validate it.
+	 * Try to get FDT filename first from loader env and then from u-boot env
 	 */
-	s = ub_env_get("fdtfile");
+	s = getenv("fdt_file");
+	if (s == NULL)
+		s = ub_env_get("fdtfile");
 	if (s == NULL)
 		s = ub_env_get("fdt_file");
 	if (s != NULL && *s != '\0') {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508152147.t7FLl7DJ081651>