#include <command.h>
#include <image.h>
#include <malloc.h>
-#include <zlib.h>
+#include <u-boot/zlib.h>
#include <bzlib.h>
#include <environment.h>
#include <lmb.h>
#endif
#ifdef CONFIG_LZMA
-#define _7ZIP_BYTE_DEFINED /* Byte already defined by zlib */
#include <lzma/LzmaTypes.h>
-#include <lzma/LzmaDecode.h>
+#include <lzma/LzmaDec.h>
#include <lzma/LzmaTools.h>
#endif /* CONFIG_LZMA */
} else {
printf (" Loading %s ... ", type_name);
- memmove_wd ((void *)load,
- (void *)image_start, image_len, CHUNKSZ);
+ if (load != image_start) {
+ memmove_wd ((void *)load,
+ (void *)image_start, image_len, CHUNKSZ);
+ }
}
*load_end = load + image_len;
puts("OK\n");
printf (" Uncompressing %s ... ", type_name);
if (gunzip ((void *)load, unc_len,
(uchar *)image_start, &image_len) != 0) {
- puts ("GUNZIP: uncompress or overwrite error "
+ puts ("GUNZIP: uncompress, out-of-mem or overwrite error "
"- must RESET board to recover\n");
if (boot_progress)
show_boot_progress (-6);
int ret = lzmaBuffToBuffDecompress(
(unsigned char *)load, &unc_len,
(unsigned char *)image_start, image_len);
- if (ret != LZMA_RESULT_OK) {
+ if (ret != SZ_OK) {
printf ("LZMA: uncompress or overwrite error %d "
"- must RESET board to recover\n", ret);
show_boot_progress (-6);
}
/* Unrecognized command */
else {
- printf ("Usage:\n%s\n", cmdtp->usage);
+ cmd_usage(cmdtp);
return 1;
}
if (images.state >= state) {
printf ("Trying to execute a command out of order\n");
- printf ("Usage:\n%s\n", cmdtp->usage);
+ cmd_usage(cmdtp);
return 1;
}
U_BOOT_CMD(
bootm, CONFIG_SYS_MAXARGS, 1, do_bootm,
- "bootm - boot application image from memory\n",
+ "boot application image from memory",
"[addr [arg ...]]\n - boot application image stored in memory\n"
"\tpassing arguments 'arg ...'; when booting a Linux kernel,\n"
"\t'arg' can be the address of an initrd image\n"
"\tbdt - OS specific bd_t processing\n"
"\tcmdline - OS specific command line processing/setup\n"
"\tprep - OS specific prep before relocation or go\n"
- "\tgo - start OS\n"
+ "\tgo - start OS"
);
/*******************************************************************/
U_BOOT_CMD(
boot, 1, 1, do_bootd,
- "boot - boot default, i.e., run 'bootcmd'\n",
- NULL
+ "boot default, i.e., run 'bootcmd'",
+ ""
);
/* keep old command name "bootd" for backward compatibility */
U_BOOT_CMD(
bootd, 1, 1, do_bootd,
- "bootd - boot default, i.e., run 'bootcmd'\n",
- NULL
+ "boot default, i.e., run 'bootcmd'",
+ ""
);
#endif
U_BOOT_CMD(
iminfo, CONFIG_SYS_MAXARGS, 1, do_iminfo,
- "iminfo - print header information for application image\n",
+ "print header information for application image",
"addr [addr ...]\n"
" - print header information for application image starting at\n"
" address 'addr' in memory; this includes verification of the\n"
- " image contents (magic number, header and payload checksums)\n"
+ " image contents (magic number, header and payload checksums)"
);
#endif
U_BOOT_CMD(
imls, 1, 1, do_imls,
- "imls - list all images found in flash\n",
+ "list all images found in flash",
"\n"
" - Prints information about all images found at sector\n"
- " boundaries in flash.\n"
+ " boundaries in flash."
);
#endif