summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2006-11-29 12:53:15 +0100
committerStefan Roese <sr@denx.de>2006-11-29 16:13:43 +0100
commit1bdd46832aeb569f5e04b1f20f64318525b6525a (patch)
tree5ab0e5229f106e147ef94d1c3ea8ec5d331071a7 /common
parent4e26f1074c3ac1bd8fd094f0dc4a1c4a0b15a592 (diff)
downloadu-boot-imx-1bdd46832aeb569f5e04b1f20f64318525b6525a.zip
u-boot-imx-1bdd46832aeb569f5e04b1f20f64318525b6525a.tar.gz
u-boot-imx-1bdd46832aeb569f5e04b1f20f64318525b6525a.tar.bz2
[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: Stefan Roese <sr@denx.de>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_elf.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/common/cmd_elf.c b/common/cmd_elf.c
index 1d92bb3..0e3d56f 100644
--- a/common/cmd_elf.c
+++ b/common/cmd_elf.c
@@ -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
* 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 bootaddr; /* Address to put the bootline */
@@ -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 ((tmp = getenv ("loadaddr")) != NULL) {
- addr = simple_strtoul (tmp, NULL, 16);
- } else {
- puts ("No load address provided\n");
- return 1;
- }
+ if (argc < 2)
+ addr = load_addr;
+ else
+ addr = simple_strtoul (argv[1], NULL, 16);
#if (CONFIG_COMMANDS & CFG_CMD_NET)
/* Check to see if we need to tftp the image ourselves before starting */