[OLPC-devel] Re: Not so good news (Was: good news)

Eric W. Biederman ebiederm at xmission.com
Sat Aug 5 04:13:27 EDT 2006

"Carl-Daniel U. Hailfinger" <c-d.hailfinger.devel.2006 at gmx.net> writes:

> Eric,
> can you take a look at this? It seems the interactions between elfboot and nrv2b
> compressed payload are slightly buggy. I reattached Richard's bootlog.txt to
> this mail and the patch to OLPC buildrom (olpc-nrv2b-support-02.diff) so you
> have most of the info in one place.

When we are using a compressed kernel and a compressed initrd do we actually
get any savings by further compressing things with nrv2b?

> The things I found fishy in bootlog.txt are:
> n_type: 00000002 n_name(8): ELFBoot  n_desc(7): unknown
>                                                 ^^^^^^^
> (the initrd?)

This is the linux version.  Apparently mkelfImage couldn't
figure out which version of linux you were feeding it. 

> n_type: 00000003 n_name(8): ELFBoot  n_desc(2): \0xf9j
>                                                 ^^^^^^
> (corruption? or uninitialized garbage?)

This is the image checksum.

This looks like a debugging print out.  I don't see corruption

> Dropping non PT_LOAD segment
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> (why is that segment there at all if we don't want to load it?)

It's meta information about what we are loading.

>     83:stream_skip() - overflowed source buffer
>                        ^^^^^^^^^^^^^^^^^^^^^^^^
> (that means either rom, bytes or rom_end are wrong.)


> Image checksum: 6af9 != computed checksum: d8f8
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> (because the stream read was aborted a few lines earlier)
> Cannot Load ELF Image
> (the final blow from previous errors)
> Side note: OLPC is using mkelfImage-2.5. Would there be any reason to upgrade to
> 2.7 (the nrv2b compression patch uses mkelfImage with vmlinux and uncompressed
> initrd)?

Interesting.  I haven't seen that patch.  It does explain why we can't
figure out the linux version.  I would actually have suspected a bzImage and
a well compressed initramfs (cpio not built into the kernel) would have been
smaller than nrv2b compression.

If there is truly a gain to doing compression like this?  nrv2b is a decent
compressor but I think for large sizes gzip is probably the better compressor.
I believe I have a formula for a compressor of arbitrary ELF executables
if anyone is interested.  I have never seen the value in putting the decompressor
in LinuxBIOS for this stuff.

> Richard Smith wrote:
>> > Ron/Jordan, could you please test whether buildrom builds functional
>> > images with the attached patch? No changes in LinuxBIOS necessary as
>> > those are already upstream in the checked out version.
>> Perhaps I didn't get something right but they fail for me.
>> Bootlog attached.
> Richard, what does it spew out with this debug patch
> (linuxbios-debug-precopressed-rom-stream01.diff)? rom_end should be the same in
> all lines unless there was some programming error.
> Regards,
> Carl-Daniel
> P.S. This is the last mail before I'll vanish for 14 days. Have fun and I hope
> you find the bug.

Have fun.


More information about the Devel mailing list