Skip to content
Snippets Groups Projects
Commit 1bdd4683 authored by Stefan Roese's avatar Stefan Roese
Browse files

[PATCH] common/cmd_elf.c: Enable loadaddr as parameter in bootvx command


In the bootvx command the load address was only read from the env
variable "loadaddr" and not optionally passed as paramter as described
in the help. This is fixed with this patch. The behaviour is now the
same as in the bootelf command.

Signed-off-by: default avatarStefan Roese <sr@denx.de>
parent 4e26f107
No related branches found
No related tags found
No related merge requests found
...@@ -79,7 +79,7 @@ int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ...@@ -79,7 +79,7 @@ int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
* be either an ELF image or a raw binary. Will attempt to setup the * be either an ELF image or a raw binary. Will attempt to setup the
* bootline and other parameters correctly. * bootline and other parameters correctly.
* ====================================================================== */ * ====================================================================== */
int do_bootvx ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{ {
unsigned long addr; /* Address of image */ unsigned long addr; /* Address of image */
unsigned long bootaddr; /* Address to put the bootline */ unsigned long bootaddr; /* Address to put the bootline */
...@@ -96,12 +96,10 @@ int do_bootvx ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ...@@ -96,12 +96,10 @@ int do_bootvx ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
* If we don't know where the image is then we're done. * If we don't know where the image is then we're done.
*/ */
if ((tmp = getenv ("loadaddr")) != NULL) { if (argc < 2)
addr = simple_strtoul (tmp, NULL, 16); addr = load_addr;
} else { else
puts ("No load address provided\n"); addr = simple_strtoul (argv[1], NULL, 16);
return 1;
}
#if (CONFIG_COMMANDS & CFG_CMD_NET) #if (CONFIG_COMMANDS & CFG_CMD_NET)
/* Check to see if we need to tftp the image ourselves before starting */ /* Check to see if we need to tftp the image ourselves before starting */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment