From: Rob Herring Date: Sun, 2 Dec 2012 21:00:24 -0600 Subject: [U-Boot] [PATCH 05/10] pxe: use bootz instead of bootm when enabled In-Reply-To: <1354503629-25621-1-git-send-email-robherring2@gmail.com> References: <1354503629-25621-1-git-send-email-robherring2@gmail.com> Message-ID: <1354503629-25621-6-git-send-email-robherring2@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Rob Herring Standard pxelinux servers would use zImage rather than u-boot image format, so use bootz instead of bootm if enabled. Signed-off-by: Rob Herring --- common/cmd_pxe.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c index 02ed645..cad5d36 100644 --- a/common/cmd_pxe.c +++ b/common/cmd_pxe.c @@ -579,6 +579,7 @@ static int label_localboot(struct pxe_label *label) static int 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); @@ -604,7 +605,10 @@ static int label_boot(struct pxe_label *label) return 1; } - 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] = "-"; } @@ -648,7 +652,11 @@ static int label_boot(struct pxe_label *label) 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 return 1; } -- 1.7.10.4