[U-Boot] [PATCH 6/6] pxe: additionaly check for fdt_file env variable

Dennis Gilmore dennis at ausil.us
Thu Mar 20 23:13:01 CET 2014


some boards have used fdt_file while others have used fdtfile to
define the name of the fdt file. If we do notget a fdtfile environment
variable, additionally check for fdt_file.

Signed-off-by: Dennis Gilmore <dennis at ausil.us>
---
 common/cmd_pxe.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 3483328..c58e471 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -712,6 +712,13 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
 			char *f1, *f2, *f3, *f4, *slash;
 
 			f1 = getenv("fdtfile");
+			/*
+			 * some boards have used fdt_file as the environment variable for
+			 * defining the device tree file so lets check for fdt_file also.
+			 */
+			if (!f1) {
+				f1 = getenv("fdt_file");
+			}
 			if (f1) {
 				f2 = "";
 				f3 = "";
-- 
1.9.0



More information about the U-Boot mailing list