[PATCH 6/15] zImage: Add more flexible gunzip convenience functions

David Gibson david at gibson.dropbear.id.au
Sat Mar 17 23:59:05 EST 2007


On Fri, Mar 16, 2007 at 09:24:02AM -0700, Geoff Levand wrote:
> David Gibson wrote:
> > This patch adds a new set of more flexible convenience wrappers around
> > zlib, moving them to their own file, gunzip_util.c, in the process.
> > These wrappers allow decompressing sections of the compressed image to
> > different locations.  In addition, they transparently handle
> > uncompressed data, avoiding special case code to handle uncompressed
> > vmlinux images.
> 
> Hi.
> 
> I was waiting for the zimage churn to settle before looking into this
> change, but I though I would let you know so you can keep it in mind
> if you do any work here.
> 
> As I mentioned in another mail, the PS3's 1st stage loader (in the
> hypervisor) supports loading a gzipped binary memory image from flash.
> So for Linux, that would be a gzipped zImage.  Since the entire zImage
> is uncompressed by the loader, there is no need to have the kernel image
> compressed on its own, nor to include the zlib code in the wrapper.
> 
> Here is a functional expression of what we have now, and what would
> be ideal:
> 
> zImage.gz = gzip(wrapper bits + zlib + gzip(vmlinx) + dtb)
> 
> zImage.gz = gzip(wrapper bits + vmlinx + dtb)

Ok.  The only bit of that we don't do already is omitting zlib from an
zImage with a decompressed kernel.  I imagine that's a fairly marginal
gain, and slightly fiddly to achieve, but we can probably arrange it
if we want.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson



More information about the Linuxppc-dev mailing list