diff options
author | gonzo <gonzo@FreeBSD.org> | 2015-08-15 21:47:07 +0000 |
---|---|---|
committer | gonzo <gonzo@FreeBSD.org> | 2015-08-15 21:47:07 +0000 |
commit | c9ef6a18eafdd5511db029cf4d5f0c5187d1f14c (patch) | |
tree | 760eeb5a1e0160d77fa559236ac2b8741a19532f /sys/boot | |
parent | 45d8f68705cf2bbf0f3117ccc61eea95f0171baa (diff) | |
download | FreeBSD-src-c9ef6a18eafdd5511db029cf4d5f0c5187d1f14c.zip FreeBSD-src-c9ef6a18eafdd5511db029cf4d5f0c5187d1f14c.tar.gz |
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
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/uboot/fdt/uboot_fdt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/boot/uboot/fdt/uboot_fdt.c b/sys/boot/uboot/fdt/uboot_fdt.c index 86f46e9..6b646f6 100644 --- a/sys/boot/uboot/fdt/uboot_fdt.c +++ b/sys/boot/uboot/fdt/uboot_fdt.c @@ -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') { |