diff mbox

[0/3] fix some issues with the kernel decompressor

Message ID 20110420072156.GA28679@atomide.com
State New
Headers show

Commit Message

Tony Lindgren April 20, 2011, 7:21 a.m. UTC
* Nicolas Pitre <nicolas.pitre@linaro.org> [110419 21:12]:
> Here some patches to fix some issues with the zImage code.  The LZMA
> decompressor now works for me, and the DT append patch should work
> on all platforms now too.

Weird still no luck here booting n900 zImage.. LZMA image prints
corrupt error, and only works if the image is relocated further
by 1MB or so. With the following hack n900 boots, so some size
calculations still are wrong. No luck with DT append patch either.

Any ideas why the following helps on n900?

Tony

Comments

Nicolas Pitre April 20, 2011, 1 p.m. UTC | #1
On Wed, 20 Apr 2011, Tony Lindgren wrote:

> * Nicolas Pitre <nicolas.pitre@linaro.org> [110419 21:12]:
> > Here some patches to fix some issues with the zImage code.  The LZMA
> > decompressor now works for me, and the DT append patch should work
> > on all platforms now too.
> 
> Weird still no luck here booting n900 zImage.. LZMA image prints
> corrupt error, and only works if the image is relocated further
> by 1MB or so. With the following hack n900 boots, so some size
> calculations still are wrong. No luck with DT append patch either.
> 
> Any ideas why the following helps on n900?

No idea.  This could indicate that the lzma code is crapping into memory 
outside of its output buffer.  The fact that my patch #2/3 makes lzma 
decompression suddenly work for me with no apparent explanation is not 
reassuring either.


Nicolas
Tony Lindgren April 20, 2011, 4:55 p.m. UTC | #2
* Nicolas Pitre <nicolas.pitre@linaro.org> [110420 05:57]:
> On Wed, 20 Apr 2011, Tony Lindgren wrote:
> 
> > * Nicolas Pitre <nicolas.pitre@linaro.org> [110419 21:12]:
> > > Here some patches to fix some issues with the zImage code.  The LZMA
> > > decompressor now works for me, and the DT append patch should work
> > > on all platforms now too.
> > 
> > Weird still no luck here booting n900 zImage.. LZMA image prints
> > corrupt error, and only works if the image is relocated further
> > by 1MB or so. With the following hack n900 boots, so some size
> > calculations still are wrong. No luck with DT append patch either.
> > 
> > Any ideas why the following helps on n900?
> 
> No idea.  This could indicate that the lzma code is crapping into memory 
> outside of its output buffer.  The fact that my patch #2/3 makes lzma 
> decompression suddenly work for me with no apparent explanation is not 
> reassuring either.

With gzip kernel looks like I need to move the kernel further by 8MB
instead of 1MB for some reason..

Tony
Nicolas Pitre April 20, 2011, 5:19 p.m. UTC | #3
On Wed, 20 Apr 2011, Tony Lindgren wrote:

> * Nicolas Pitre <nicolas.pitre@linaro.org> [110420 05:57]:
> > On Wed, 20 Apr 2011, Tony Lindgren wrote:
> > 
> > > * Nicolas Pitre <nicolas.pitre@linaro.org> [110419 21:12]:
> > > > Here some patches to fix some issues with the zImage code.  The LZMA
> > > > decompressor now works for me, and the DT append patch should work
> > > > on all platforms now too.
> > > 
> > > Weird still no luck here booting n900 zImage.. LZMA image prints
> > > corrupt error, and only works if the image is relocated further
> > > by 1MB or so. With the following hack n900 boots, so some size
> > > calculations still are wrong. No luck with DT append patch either.
> > > 
> > > Any ideas why the following helps on n900?
> > 
> > No idea.  This could indicate that the lzma code is crapping into memory 
> > outside of its output buffer.  The fact that my patch #2/3 makes lzma 
> > decompression suddenly work for me with no apparent explanation is not 
> > reassuring either.
> 
> With gzip kernel looks like I need to move the kernel further by 8MB
> instead of 1MB for some reason..

What kernel config are you using?


Nicolas
Tony Lindgren April 21, 2011, 5:59 a.m. UTC | #4
* Nicolas Pitre <nicolas.pitre@linaro.org> [110420 10:16]:
> On Wed, 20 Apr 2011, Tony Lindgren wrote:
> 
> > * Nicolas Pitre <nicolas.pitre@linaro.org> [110420 05:57]:
> > > On Wed, 20 Apr 2011, Tony Lindgren wrote:
> > > 
> > > > * Nicolas Pitre <nicolas.pitre@linaro.org> [110419 21:12]:
> > > > > Here some patches to fix some issues with the zImage code.  The LZMA
> > > > > decompressor now works for me, and the DT append patch should work
> > > > > on all platforms now too.
> > > > 
> > > > Weird still no luck here booting n900 zImage.. LZMA image prints
> > > > corrupt error, and only works if the image is relocated further
> > > > by 1MB or so. With the following hack n900 boots, so some size
> > > > calculations still are wrong. No luck with DT append patch either.
> > > > 
> > > > Any ideas why the following helps on n900?
> > > 
> > > No idea.  This could indicate that the lzma code is crapping into memory 
> > > outside of its output buffer.  The fact that my patch #2/3 makes lzma 
> > > decompression suddenly work for me with no apparent explanation is not 
> > > reassuring either.
> > 
> > With gzip kernel looks like I need to move the kernel further by 8MB
> > instead of 1MB for some reason..
> 
> What kernel config are you using?

This is omap2plus_defconfig with DEBUG_LL and EARLY_PRINTK added on
v2.6.39-rc4 with no extra patches.

This same kernel binary boots everything except n900. It also boots
n8x0 just fine, and that too is using nolo bootloader with zImage.

Out of your three patches only the last one seems to make any difference
where it now prints an error about DT data not found if the DT append
patches are applied.

Tony
diff mbox

Patch

--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -307,6 +307,7 @@  dtb_check_done:
 		/* Round up to next 256-byte boundary. */
 		add	r10, r10, #256
 		bic	r10, r10, #255
+		orr	r10, r10, #0x00100000
 
 		sub	r9, r6, r5		@ size to copy
 		add	r9, r9, #31		@ rounded up to a multiple