cmd: pxe: Fix bootm argument count
authorAbhishek Shah <abhishek.shah@broadcom.com>
Tue, 19 Nov 2019 00:41:49 +0000 (16:41 -0800)
committerTom Rini <trini@konsulko.com>
Tue, 3 Dec 2019 13:43:24 +0000 (08:43 -0500)
pxe command parses the init ramfs address(through initrd lable in
pxe config file), but is not passing it to bootm command as argument
as bootm_argc count is not increased.

Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com>
Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/pxe.c

index 205997544623836b0976599046d9609d15351f2e..768e50aba610ed6a60336597b6b85f0e8d3abd94 100644 (file)
--- a/cmd/pxe.c
+++ b/cmd/pxe.c
@@ -663,6 +663,7 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
                strncpy(bootm_argv[2], env_get("ramdisk_addr_r"), 18);
                strcat(bootm_argv[2], ":");
                strncat(bootm_argv[2], env_get("filesize"), 9);
+               bootm_argc = 3;
        }
 
        if (get_relfile_envaddr(cmdtp, label->kernel, "kernel_addr_r") < 0) {