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
This commit is contained in:
Oleksandr Tymoshenko 2015-08-15 21:47:07 +00:00
parent 217b4e023d
commit 34a1f44995
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286815

View File

@ -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') {