]> git.baikalelectronics.ru Git - kernel.git/commit
[POWERPC] zImage: Add more flexible gunzip convenience functions
authorDavid Gibson <david@gibson.dropbear.id.au>
Mon, 5 Mar 2007 03:24:52 +0000 (14:24 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 13 Mar 2007 02:35:01 +0000 (13:35 +1100)
commit53c359ad7120717862250b90fef43576717048b6
treed91ea074bd35c61c86b3c012a41622d5016fc919
parentff6d9fbc4b2d97e6db6085a22c2d32ebb5fcbc38
[POWERPC] zImage: Add more flexible gunzip convenience functions

At present, arch/powerpc/boot/main.c includes a gunzip() function
which is a convenient wrapper around zlib.  However, it doesn't
conveniently allow decompressing part of an image to one location,
then the remainder to a different address.

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.

The patch also converts main.c to use the new wrappers, using the new
flexibility to avoid decompressing the vmlinux's ELF header twice as
we did previously.  That in turn means we avoid extending our
allocations for the vmlinux to allow space for the extra copy of the
ELF header.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/boot/Makefile
arch/powerpc/boot/gunzip_util.c [new file with mode: 0644]
arch/powerpc/boot/gunzip_util.h [new file with mode: 0644]
arch/powerpc/boot/main.c