[U-Boot] [PATCH] Refresh LZMA-lib to 4.65

Wolfgang Denk wd at denx.de
Thu Jul 16 23:11:29 CEST 2009


Dear rhabarber1848,

In message <h3l0ci$lhn$1 at ger.gmane.org> you wrote:
> 
> it seems I solved the problem.

Hm...

> The end value for the kernel was too high, the attached patch[1] should fix
> it, a LZMA-compressed kernel booted well. I did not test the bz2 case but
> it seems it suffers from the same bug.

Maybe lzmaBuffToBuffDecompress() stores an incorrect value in unc_len?

> diff -uNr u-boot-2009.06.org/common/cmd_bootm.c u-boot-2009.06/common/cmd_bootm.c
> --- u-boot-2009.06.org/common/cmd_bootm.c	2009-06-14 21:30:39.000000000 +0200
> +++ u-boot-2009.06/common/cmd_bootm.c	2009-07-15 18:28:28.000000000 +0200
> @@ -380,7 +380,7 @@
>  			return BOOTM_ERR_RESET;
>  		}
>  
> -		*load_end = load + unc_len;
> +		*load_end = load + image_len;
>  		break;
>  #endif /* CONFIG_BZIP2 */
>  #ifdef CONFIG_LZMA
> @@ -396,7 +396,7 @@
>  			show_boot_progress (-6);
>  			return BOOTM_ERR_RESET;
>  		}
> -		*load_end = load + unc_len;
> +		*load_end = load + image_len;

This seems definitely wrong to me. image_len is the length of the
_compressed_ image, which is not what we need here.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Wish not to seem, but to be, the best."                  - Aeschylus


More information about the U-Boot mailing list