Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Oct 2014 04:13:09 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r273680 - stable/10/sys/boot/fdt
Message-ID:  <201410260413.s9Q4D9So043956@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Sun Oct 26 04:13:08 2014
New Revision: 273680
URL: https://svnweb.freebsd.org/changeset/base/273680

Log:
  MFC r273298:
  
    The U-Boot README says fdt_addr_r is the right env var for fdt data
    loaded into ram, but vendors also use fdtaddr and fdt_addr.  Check the
    recommended variable first and fall back to the others.

Modified:
  stable/10/sys/boot/fdt/fdt_loader_cmd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/boot/fdt/fdt_loader_cmd.c
==============================================================================
--- stable/10/sys/boot/fdt/fdt_loader_cmd.c	Sun Oct 26 04:11:32 2014	(r273679)
+++ stable/10/sys/boot/fdt/fdt_loader_cmd.c	Sun Oct 26 04:13:08 2014	(r273680)
@@ -310,10 +310,13 @@ fdt_setup_fdtp()
 
 	/*
 	 * If the U-boot environment contains a variable giving the address of a
-	 * valid blob in memory, use it.  Board vendors use both fdtaddr and
-	 * fdt_addr names.
+	 * valid blob in memory, use it.  The U-boot README says the right
+	 * variable for fdt data loaded into ram is fdt_addr_r, so try that
+	 * first.  Board vendors also use both fdtaddr and fdt_addr names.
 	 */
-	s = ub_env_get("fdtaddr");
+	s = ub_env_get("fdt_addr_r");
+	if (s == NULL)
+		s = ub_env_get("fdtaddr");
 	if (s == NULL)
 		s = ub_env_get("fdt_addr");
 	if (s != NULL && *s != '\0') {



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