lkml.org 
[lkml]   [2009]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.33-rc1: LZMA kernel fails to decompress
Alain Knaff wrote:
> 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.

It should be pathless, or else we'll come to issue when printf is in /bin
vs /usr/bin and the like.

But you're wrong, and this has been discussed already in this very thread.
Neither approach is right. The whole issues is not because of "defects"
in sh or printf or echo, but because of over-expectations. POSIX does not
specify that printf should support \x (hexadecimal) escape sequences or
that echo should interpret _any_ escape sequences at all. "Non-defective"
system echo is *extension* to standard. Set $POSIXLY_CORRECT with GNU
echo or printf and you should have the same issue again.

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

What I think should be done here is to revert my patch (that replaces
/bin/echo with printf, so that /bin/echo will be used) and test the
real solution, which is to stop doing all this hackery altogether,
and calculate the size the right way instead. Sam already posted a
possible solution, and it seems to be correct.

/mjt


\
 
 \ /
  Last update: 2009-12-27 21:21    [from the cache]
©2003-2011 Jasper Spaans