summaryrefslogtreecommitdiff
path: root/cmd/pxe_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/pxe_utils.c')
-rw-r--r--cmd/pxe_utils.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c
index 8716e782f6..b9d9a5786c 100644
--- a/cmd/pxe_utils.c
+++ b/cmd/pxe_utils.c
@@ -322,7 +322,8 @@ static int label_localboot(struct pxe_label *label)
if (label->append) {
char bootargs[CONFIG_SYS_CBSIZE];
- cli_simple_process_macros(label->append, bootargs);
+ cli_simple_process_macros(label->append, bootargs,
+ sizeof(bootargs));
env_set("bootargs", bootargs);
}
@@ -430,7 +431,8 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label)
strcat(bootargs, ip_str);
strcat(bootargs, mac_str);
- cli_simple_process_macros(bootargs, finalbootargs);
+ cli_simple_process_macros(bootargs, finalbootargs,
+ sizeof(finalbootargs));
env_set("bootargs", finalbootargs);
printf("append: %s\n", finalbootargs);
}
@@ -451,11 +453,14 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label)
/*
* fdt usage is optional:
- * It handles the following scenarios. All scenarios are exclusive
+ * It handles the following scenarios.
*
- * Scenario 1: If fdt_addr_r specified and "fdt" label is defined in
- * pxe file, retrieve fdt blob from server. Pass fdt_addr_r to bootm,
- * and adjust argc appropriately.
+ * Scenario 1: If fdt_addr_r specified and "fdt" or "fdtdir" label is
+ * defined in pxe file, retrieve fdt blob from server. Pass fdt_addr_r to
+ * bootm, and adjust argc appropriately.
+ *
+ * If retrieve fails and no exact fdt blob is specified in pxe file with
+ * "fdt" label, try Scenario 2.
*
* Scenario 2: If there is an fdt_addr specified, pass it along to
* bootm, and adjust argc appropriately.
@@ -521,9 +526,13 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label)
free(fdtfilefree);
if (err < 0) {
- printf("Skipping %s for failure retrieving fdt\n",
- label->name);
- goto cleanup;
+ bootm_argv[3] = NULL;
+
+ if (label->fdt) {
+ printf("Skipping %s for failure retrieving FDT\n",
+ label->name);
+ goto cleanup;
+ }
}
} else {
bootm_argv[3] = NULL;