X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=cmd%2Fpxe.c;h=0a07f14ca8fa94a8e15097cd9b394fc7705344ae;hb=6a34af5b411ed316b66547ac575d2669df223dc6;hp=080b3760de0074d2468a838a12ce850ac510b059;hpb=9c3193f8d03d4074fa6ca6b783246b97d8dc2ff5;p=u-boot diff --git a/cmd/pxe.c b/cmd/pxe.c index 080b3760de..0a07f14ca8 100644 --- a/cmd/pxe.c +++ b/cmd/pxe.c @@ -571,7 +571,7 @@ static void label_print(void *data) /* * Boot a label that specified 'localboot'. This requires that the 'localcmd' - * environment variable is defined. Its contents will be executed as U-boot + * environment variable is defined. Its contents will be executed as U-Boot * command. If the label specified an 'append' line, its contents will be * used to overwrite the contents of the 'bootargs' environment variable prior * to running 'localcmd'. @@ -620,7 +620,7 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label) char initrd_str[22]; char mac_str[29] = ""; char ip_str[68] = ""; - int bootm_argc = 3; + int bootm_argc = 2; int len = 0; ulong kernel_addr; void *buf; @@ -652,8 +652,6 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label) strcpy(bootm_argv[2], getenv("ramdisk_addr_r")); strcat(bootm_argv[2], ":"); strcat(bootm_argv[2], getenv("filesize")); - } else { - bootm_argv[2] = "-"; } if (get_relfile_envaddr(cmdtp, label->kernel, "kernel_addr_r") < 0) { @@ -785,8 +783,11 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label) if (!bootm_argv[3]) bootm_argv[3] = getenv("fdt_addr"); - if (bootm_argv[3]) + if (bootm_argv[3]) { + if (!bootm_argv[2]) + bootm_argv[2] = "-"; bootm_argc = 4; + } kernel_addr = genimg_get_kernel_addr(bootm_argv[1]); buf = map_sysmem(kernel_addr, 0); @@ -1438,7 +1439,7 @@ static struct pxe_menu *parse_pxefile(cmd_tbl_t *cmdtp, unsigned long menucfg) } /* - * Converts a pxe_menu struct into a menu struct for use with U-boot's generic + * Converts a pxe_menu struct into a menu struct for use with U-Boot's generic * menu code. */ static struct menu *pxe_menu_to_menu(struct pxe_menu *cfg)