diff options
author | Michael Brandt <Michael.Brandt@stericsson.com> | 2009-12-22 15:06:09 +0100 |
---|---|---|
committer | Michael Brandt <Michael.Brandt@stericsson.com> | 2009-12-22 15:06:09 +0100 |
commit | 257e7c347fd32438604da5e7996b902688d9611b (patch) | |
tree | 74fe0aa3fcaad4c9a3bd1c3dfc172531400cdd45 /common/cmd_bootm.c | |
parent | 0c9ff2faf4cf516dd6631ba18a4bcc5b739eb4c6 (diff) | |
parent | 87d93a1ba2ae23550e1370adb7a3b00af0831165 (diff) |
Merge branch 'master' of http://git.denx.de/u-boot
Conflicts:
include/usb/musb_udc.h
Diffstat (limited to 'common/cmd_bootm.c')
-rw-r--r-- | common/cmd_bootm.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index e16552ec3..94ddac37c 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -57,9 +57,12 @@ #include <lzma/LzmaTools.h> #endif /* CONFIG_LZMA */ +#ifdef CONFIG_LZO +#include <linux/lzo.h> +#endif /* CONFIG_LZO */ + DECLARE_GLOBAL_DATA_PTR; -extern int gunzip (void *dst, int dstlen, unsigned char *src, unsigned long *lenp); #ifndef CONFIG_SYS_BOOTM_LEN #define CONFIG_SYS_BOOTM_LEN 0x800000 /* use 8MByte as default max gunzip size */ #endif @@ -405,6 +408,24 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress) *load_end = load + unc_len; break; #endif /* CONFIG_LZMA */ +#ifdef CONFIG_LZO + case IH_COMP_LZO: + printf (" Uncompressing %s ... ", type_name); + + int ret = lzop_decompress((const unsigned char *)image_start, + image_len, (unsigned char *)load, + &unc_len); + if (ret != LZO_E_OK) { + printf ("LZO: uncompress or overwrite error %d " + "- must RESET board to recover\n", ret); + if (boot_progress) + show_boot_progress (-6); + return BOOTM_ERR_RESET; + } + + *load_end = load + unc_len; + break; +#endif /* CONFIG_LZO */ default: printf ("Unimplemented compression type %d\n", comp); return BOOTM_ERR_UNIMPLEMENTED; |