LZMA and LZO causes compile error
If both LZMA and LZO compressions are used there is a compile error in cmd_bootm.c Signed-off-by: Matthias Weisser <weisserm@arcor.de>
This commit is contained in:
parent
a2740dd00d
commit
60fdc5f2f0
|
@ -333,6 +333,9 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
|
||||||
ulong image_start = os.image_start;
|
ulong image_start = os.image_start;
|
||||||
ulong image_len = os.image_len;
|
ulong image_len = os.image_len;
|
||||||
uint unc_len = CONFIG_SYS_BOOTM_LEN;
|
uint unc_len = CONFIG_SYS_BOOTM_LEN;
|
||||||
|
#if defined(CONFIG_LZMA) || defined(CONFIG_LZO)
|
||||||
|
int ret;
|
||||||
|
#endif /* defined(CONFIG_LZMA) || defined(CONFIG_LZO) */
|
||||||
|
|
||||||
const char *type_name = genimg_get_type_name (os.type);
|
const char *type_name = genimg_get_type_name (os.type);
|
||||||
|
|
||||||
|
@ -390,7 +393,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
|
||||||
SizeT lzma_len = unc_len;
|
SizeT lzma_len = unc_len;
|
||||||
printf (" Uncompressing %s ... ", type_name);
|
printf (" Uncompressing %s ... ", type_name);
|
||||||
|
|
||||||
int ret = lzmaBuffToBuffDecompress(
|
ret = lzmaBuffToBuffDecompress(
|
||||||
(unsigned char *)load, &lzma_len,
|
(unsigned char *)load, &lzma_len,
|
||||||
(unsigned char *)image_start, image_len);
|
(unsigned char *)image_start, image_len);
|
||||||
unc_len = lzma_len;
|
unc_len = lzma_len;
|
||||||
|
@ -408,7 +411,7 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
|
||||||
case IH_COMP_LZO:
|
case IH_COMP_LZO:
|
||||||
printf (" Uncompressing %s ... ", type_name);
|
printf (" Uncompressing %s ... ", type_name);
|
||||||
|
|
||||||
int ret = lzop_decompress((const unsigned char *)image_start,
|
ret = lzop_decompress((const unsigned char *)image_start,
|
||||||
image_len, (unsigned char *)load,
|
image_len, (unsigned char *)load,
|
||||||
&unc_len);
|
&unc_len);
|
||||||
if (ret != LZO_E_OK) {
|
if (ret != LZO_E_OK) {
|
||||||
|
|
Loading…
Reference in a new issue