bzImage -> vmlinux?

Ian Molton spyro at f2s.com
Tue Jul 13 10:43:33 PDT 2004


On Tue, 13 Jul 2004 11:16:28 +0100 (BST)
Ken Moffat <ken at kenmoffat.uklinux.net> wrote:

> > gunzip -c bzImage >~/vmlinux
> >
> > gunzip: bzImage: not in gzip format
> >
> > Nyet, didn't work.
> >
> 
>  I didn't say it was as simple as using gunzip :-)  I've never been
> sufficiently interested to do it, so far I just keep vmlinux around
> when I expect to have to compare multiple builds, but the kernel has
> an internal libz (and, it isn't exactly the same as any released libz)
>  In
> ppc we have a decompress_kernel function (arch/ppc/simple/misc.c), I'm
> sure x86 has something similar.

This isnt to do with the kernels internal libz.

this is *another* libz (and some extra code), which is slightly
modified, and 'hacked onto' the beginning of the gzipped kernel image.
its what does the initial decompression of the kernel and relocation to
its actual place of execution (if necessary).

for x86, its complicated by the need for an extra stage of bootloader,
or at least, used to be.

The kernel has an internal (again slightly modified) zlib to support
devices that need gzip type compression. it used to have multiple subtly
modified zlibs until somewhere late in 2.5 where they (all?) were merged
into one more portable form.

It is not considered 'secure' for this version of zlib to handle
userspace zlib needs, although I have never been quite sure *why* this
is, as theres nothing stopping the kernel zib code being mapped
*read-only* into userspace...



More information about the lfs-chat mailing list