diff options
author | ian <ian@FreeBSD.org> | 2014-10-20 01:52:17 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-10-20 01:52:17 +0000 |
commit | ee6cf8f91f4a1f2a4a63762f9f48170f460ad2ad (patch) | |
tree | f3e9e98b4dc36255ec198aa50dc0ad7de36066c0 /sys/boot/fdt/fdt_loader_cmd.c | |
parent | 4a3d5910e2f211d6f048d619d90b9a06a237ad9b (diff) | |
download | FreeBSD-src-ee6cf8f91f4a1f2a4a63762f9f48170f460ad2ad.zip FreeBSD-src-ee6cf8f91f4a1f2a4a63762f9f48170f460ad2ad.tar.gz |
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.
Diffstat (limited to 'sys/boot/fdt/fdt_loader_cmd.c')
-rw-r--r-- | sys/boot/fdt/fdt_loader_cmd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/boot/fdt/fdt_loader_cmd.c b/sys/boot/fdt/fdt_loader_cmd.c index 24c6382..b753ce2 100644 --- a/sys/boot/fdt/fdt_loader_cmd.c +++ b/sys/boot/fdt/fdt_loader_cmd.c @@ -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') { |