diff options
| author | Wolfgang Denk <wd@denx.de> | 2009-12-15 23:38:34 +0100 | 
|---|---|---|
| committer | Wolfgang Denk <wd@denx.de> | 2009-12-15 23:38:34 +0100 | 
| commit | bb3bcfa2426cc6a0aecec7270e3ee67ca843a125 (patch) | |
| tree | 0314e3d8e8d9e4d568a496fca27db33d66e68bb4 /common/cmd_bootm.c | |
| parent | a200a7c04d89853d2a1395b96d8ca5e3dd754551 (diff) | |
| parent | 4b142febff71eabdb7ddbb125c7b583b24ddc434 (diff) | |
| download | olio-uboot-2014.01-bb3bcfa2426cc6a0aecec7270e3ee67ca843a125.tar.xz olio-uboot-2014.01-bb3bcfa2426cc6a0aecec7270e3ee67ca843a125.zip | |
Merge branch 'next' of ../next
Diffstat (limited to 'common/cmd_bootm.c')
| -rw-r--r-- | common/cmd_bootm.c | 22 | 
1 files changed, 22 insertions, 0 deletions
| diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index e16552ec3..efd6aec0c 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -57,6 +57,10 @@  #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); @@ -405,6 +409,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; |