summaryrefslogtreecommitdiff
path: root/arch/i386/lib/zimage.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-10-11 10:00:34 +0200
committerWolfgang Denk <wd@denx.de>2010-10-11 10:00:34 +0200
commitbfc7bea6adc46e1db2f5a5e3464d7652ed67c864 (patch)
tree4399dca93e4c42a3f652dd5b0b6143ab4aef50f4 /arch/i386/lib/zimage.c
parent29840de6b6d322e9cca3d22d254a1d066afbef02 (diff)
parentc868af3e57610b41c6ed4fd8d8744d8cc0a21b29 (diff)
downloadolio-uboot-2014.01-bfc7bea6adc46e1db2f5a5e3464d7652ed67c864.tar.xz
olio-uboot-2014.01-bfc7bea6adc46e1db2f5a5e3464d7652ed67c864.zip
Merge branch 'master' of git://git.denx.de/u-boot-x86
Diffstat (limited to 'arch/i386/lib/zimage.c')
-rw-r--r--arch/i386/lib/zimage.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/i386/lib/zimage.c b/arch/i386/lib/zimage.c
index 89fe015e6..0c4207269 100644
--- a/arch/i386/lib/zimage.c
+++ b/arch/i386/lib/zimage.c
@@ -248,7 +248,8 @@ void boot_zimage(void *setup_base)
int do_zboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
void *base_ptr;
- void *bzImage_addr;
+ void *bzImage_addr = NULL;
+ char *s;
ulong bzImage_size = 0;
disable_interrupts();
@@ -256,10 +257,17 @@ int do_zboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* Setup board for maximum PC/AT Compatibility */
setup_pcat_compatibility();
- /* argv[1] holds the address of the bzImage */
- bzImage_addr = (void *)simple_strtoul(argv[1], NULL, 16);
+ if (argc >= 2)
+ /* argv[1] holds the address of the bzImage */
+ s = argv[1];
+ else
+ s = getenv("fileaddr");
+
+ if (s)
+ bzImage_addr = (void *)simple_strtoul(s, NULL, 16);
- if (argc == 3)
+ if (argc >= 3)
+ /* argv[2] holds the size of the bzImage */
bzImage_size = simple_strtoul(argv[2], NULL, 16);
/* Lets look for*/
@@ -282,7 +290,7 @@ int do_zboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
}
U_BOOT_CMD(
- zboot, 3, 0, do_zboot,
+ zboot, 2, 0, do_zboot,
"Boot bzImage",
""
);