summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-10-30 21:49:38 +0000
committerwdenk <wdenk>2003-10-30 21:49:38 +0000
commitb13fb01a62708492cae4b33c4d6fa9ae127905f4 (patch)
tree66ae0d558907465ecbebb815f8be02a4257e5c55 /common
parent5fa66df63afe2841ce27596996811469903373a7 (diff)
downloadtalos-obmc-uboot-b13fb01a62708492cae4b33c4d6fa9ae127905f4.tar.gz
talos-obmc-uboot-b13fb01a62708492cae4b33c4d6fa9ae127905f4.zip
* Fix parameter passing to standalone images with bootm command
* Patch by Kyle Harris, 30 Oct 2003: Fix build errors for ixdp425 board * Patch by David M. Horn, 29 Oct 2003: Fixes to build under CYGWIN * Get IceCube MGT5100 working (again)
Diffstat (limited to 'common')
-rw-r--r--common/cmd_bootm.c39
1 files changed, 21 insertions, 18 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 852eefd28f..e30d212b0c 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -149,7 +149,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
uint unc_len = 0x400000;
int i, verify;
char *name, *s;
- int (*appl)(cmd_tbl_t *, int, int, char *[]);
+ int (*appl)(int, char *[]);
image_header_t *hdr = &header;
s = getenv ("verify");
@@ -251,21 +251,24 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
SHOW_BOOT_PROGRESS (5);
switch (hdr->ih_type) {
- case IH_TYPE_STANDALONE: name = "Standalone Application";
- /* A second argument overwrites the load address */
- if (argc > 2) {
- hdr->ih_load = simple_strtoul(argv[2], NULL, 16);
- }
- break;
- case IH_TYPE_KERNEL: name = "Kernel Image";
- break;
- case IH_TYPE_MULTI: name = "Multi-File Image";
- len = ntohl(len_ptr[0]);
- /* OS kernel is always the first image */
- data += 8; /* kernel_len + terminator */
- for (i=1; len_ptr[i]; ++i)
- data += 4;
- break;
+ case IH_TYPE_STANDALONE:
+ name = "Standalone Application";
+ /* A second argument overwrites the load address */
+ if (argc > 2) {
+ hdr->ih_load = simple_strtoul(argv[2], NULL, 16);
+ }
+ break;
+ case IH_TYPE_KERNEL:
+ name = "Kernel Image";
+ break;
+ case IH_TYPE_MULTI:
+ name = "Multi-File Image";
+ len = ntohl(len_ptr[0]);
+ /* OS kernel is always the first image */
+ data += 8; /* kernel_len + terminator */
+ for (i=1; len_ptr[i]; ++i)
+ data += 4;
+ break;
default: printf ("Wrong Image Type for %s command\n", cmdtp->name);
SHOW_BOOT_PROGRESS (-5);
return 1;
@@ -362,8 +365,8 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
setenv("filesize", buf);
return 0;
}
- appl = (int (*)(cmd_tbl_t *, int, int, char *[]))ntohl(hdr->ih_ep);
- (*appl)(cmdtp, flag, argc-1, &argv[1]);
+ appl = (int (*)(int, char *[]))ntohl(hdr->ih_ep);
+ (*appl)(argc-1, &argv[1]);
return 0;
case IH_TYPE_KERNEL:
case IH_TYPE_MULTI:
OpenPOWER on IntegriCloud