* MA 02111-1307 USA
*/
-#if defined(CONFIG_CMD_XIMG)
/*
* Multi Image extract
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;
size_t fit_len;
#endif
- verify = getenv_verify ();
+ verify = getenv_yesno ("verify");
if (argc > 1) {
addr = simple_strtoul(argv[1], NULL, 16);
}
/* 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;
return 1;
}
- data = (ulong *)fit_data;
+ data = (ulong)fit_data;
len = (ulong)fit_len;
break;
#endif
}
U_BOOT_CMD(imxtract, 4, 1, do_imgextract,
- "imxtract- extract a part of a multi-image\n",
- "addr part [dest]\n"
- " - extract <part> from legacy image at <addr> and copy to <dest>\n"
+ "extract a part of a multi-image",
+ "addr part [dest]\n"
+ " - extract <part> from legacy image at <addr> and copy to <dest>"
#if defined(CONFIG_FIT)
- "addr uname [dest]\n"
- " - extract <uname> subimage from FIT image at <addr> and copy to <dest>\n"
+ "\n"
+ "addr uname [dest]\n"
+ " - extract <uname> subimage from FIT image at <addr> and copy to <dest>"
#endif
);
-
-#endif