[lkml]   [2009]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: 2.6.33-rc1: LZMA kernel fails to decompress
Michael Tokarev wrote:
> Tvrtko Ursulin wrote:
>> Hi,
>> When run under VMware, LZMA compressed 2.6.33-rc1 instantly reboots in the
>> decompression stage. At least I suppose so, because switching to GZIP makes
>> it work.
> Switch /bin/sh from dash to bash and recompile (actually relink) - it should work.
> /mjt

I can confirm this. A similar issue used to exist for older kernels,
which then got fixed by replacing "echo" with "/bin/echo" in the
size_append command scripts/Makefile.lib . The reason why this was
needed is that some shells (such as dash) have a defective built-in echo
command. Specifying the full path forces to use the system echo command
rather than the broken shell builtin.

In 2.6.33, for some reason, echo has been replaced with printf. With a
_pathless_ printf! The fix is the same as in earlier kernels: add the path.

With the attached patch applied, the kernel compiles correctly even if
sh is linked to dash.



diff -ur linux-2.6.33-rc2/scripts/Makefile.lib linux-2.6.33-rc2.fixed/scripts/Makefile.lib
--- linux-2.6.33-rc2/scripts/Makefile.lib 2009-12-24 21:09:41.000000000 +0000
+++ linux-2.6.33-rc2.fixed/scripts/Makefile.lib 2009-12-27 18:34:23.000000000 +0000
@@ -213,7 +213,7 @@

# Bzip2 and LZMA do not include size in file... so we have to fake that;
# append the size as a 32-bit littleendian number as gzip does.
-size_append = printf $(shell \
+size_append = /usr/bin/printf $(shell \
dec_size=0; \
for F in $1; do \
fsize=$$(stat -c "%s" $$F); \
 \ /
  Last update: 2009-12-27 19:53    [W:0.073 / U:2.856 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site