pxe: use bootz instead of bootm
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index ed09d21..0d0efa4 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -597,6 +597,7 @@
static void label_boot(struct pxe_label *label)
{
char *bootm_argv[] = { "bootm", NULL, NULL, NULL, NULL };
+ char initrd_str[22];
int bootm_argc = 3;
label_print(label);
@@ -621,7 +622,10 @@
return;
}
- bootm_argv[2] = getenv("ramdisk_addr_r");
+ bootm_argv[2] = initrd_str;
+ strcpy(bootm_argv[2], getenv("ramdisk_addr_r"));
+ strcat(bootm_argv[2], ":");
+ strcat(bootm_argv[2], getenv("filesize"));
} else {
bootm_argv[2] = "-";
}
@@ -665,7 +669,11 @@
if (bootm_argv[3])
bootm_argc = 4;
+#ifdef CONFIG_CMD_BOOTZ
+ do_bootz(NULL, 0, bootm_argc, bootm_argv);
+#else
do_bootm(NULL, 0, bootm_argc, bootm_argv);
+#endif
}
/*