diff options
author | Stany MARCEL <stanypub@gmail.com> | 2013-11-27 13:48:43 (GMT) |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-12-13 14:17:32 (GMT) |
commit | 07a1a0c93161733ff4473ebb7d642eb8b68d974e (patch) | |
tree | ab7b62daef37e181fce83d773fb9623e7b1a2f18 /common | |
parent | 93f70dfd58ff0c291c88af57785f131d534d5559 (diff) | |
download | u-boot-07a1a0c93161733ff4473ebb7d642eb8b68d974e.tar.xz |
Correct vxWorks elf boot to load at correct address
argv[0] contains bootvx (command name) not the load address, if called with
argv < 2 use load_addr, else use address argument given to the command.
Signed-off-by: Stany MARCEL <smarcel@novasys-ingenierie.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_elf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/cmd_elf.c b/common/cmd_elf.c index f741f6b..ab9c7e3 100644 --- a/common/cmd_elf.c +++ b/common/cmd_elf.c @@ -156,16 +156,16 @@ int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) * If we don't know where the image is then we're done. */ - if (argc < 1) + if (argc < 2) addr = load_addr; else - addr = simple_strtoul(argv[0], NULL, 16); + addr = simple_strtoul(argv[1], NULL, 16); #if defined(CONFIG_CMD_NET) /* * Check to see if we need to tftp the image ourselves before starting */ - if ((argc == 1) && (strcmp(argv[0], "tftp") == 0)) { + if ((argc == 2) && (strcmp(argv[1], "tftp") == 0)) { if (NetLoop(TFTPGET) <= 0) return 1; printf("Automatic boot of VxWorks image at address 0x%08lx ...\n", |