summaryrefslogtreecommitdiffstats
path: root/common/cmd_ximg.c
diff options
context:
space:
mode:
authorBartlomiej Sieka <tur@semihalf.com>2008-03-20 19:38:45 +0100
committerBartlomiej Sieka <tur@semihalf.com>2008-03-20 23:20:31 +0100
commitfbe7a155027beacebaee9b32e1ada781fe924bca (patch)
treeff3d15374e976762b2db6f3cc67f6d8f79e70436 /common/cmd_ximg.c
parent36cc8cbb3379d5166f882641123521735c469f92 (diff)
downloadtalos-obmc-uboot-fbe7a155027beacebaee9b32e1ada781fe924bca.tar.gz
talos-obmc-uboot-fbe7a155027beacebaee9b32e1ada781fe924bca.zip
[new uImage] Compilation and new uImage handling fixes for imxtract
Fix imxtract command not being compiled-in despite CONFIG_CMD_XIMG being in include/config_cmd_default.h. Fix few warnings and handling of new format images. Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
Diffstat (limited to 'common/cmd_ximg.c')
-rw-r--r--common/cmd_ximg.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/common/cmd_ximg.c b/common/cmd_ximg.c
index 77f68c44c7..7916fc1972 100644
--- a/common/cmd_ximg.c
+++ b/common/cmd_ximg.c
@@ -24,7 +24,6 @@
* MA 02111-1307 USA
*/
-#if defined(CONFIG_CMD_XIMG)
/*
* Multi Image extract
@@ -40,13 +39,12 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
ulong addr = load_addr;
ulong dest = 0;
ulong data, len, count;
- int i, verify;
+ int verify;
int part = 0;
char pbuf[10];
- char *s;
image_header_t *hdr;
#if defined(CONFIG_FIT)
- const char *uname;
+ const char *uname = NULL;
const void* fit_hdr;
int noffset;
const void *fit_data;
@@ -134,7 +132,7 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
}
/* get subimage node offset */
- noffset = fit_image_get_node (fit_hdr, fit_uname);
+ noffset = fit_image_get_node (fit_hdr, uname);
if (noffset < 0) {
printf ("Can't find '%s' FIT subimage\n", uname);
return 1;
@@ -160,7 +158,7 @@ do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
return 1;
}
- data = (ulong *)fit_data;
+ data = (ulong)fit_data;
len = (ulong)fit_len;
break;
#endif
@@ -190,5 +188,3 @@ U_BOOT_CMD(imxtract, 4, 1, do_imgextract,
" - extract <uname> subimage from FIT image at <addr> and copy to <dest>\n"
#endif
);
-
-#endif
OpenPOWER on IntegriCloud