android_kernel_xiaomi_sm8350/arch/powerpc/boot
David Gibson ad9d2716cf [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>
2007-03-13 13:35:01 +11:00
..
dts [POWERPC] Remove unused, undocumented #cpus property from cpus node 2007-03-09 15:03:24 +11:00
.gitignore [POWERPC] Add files build to .gitignore 2006-12-04 20:41:29 +11:00
addnote.c
addRamDisk.c
crt0.S
div64.S
dummy.c
elf.h
flatdevtree_env.h
flatdevtree_misc.c [POWERPC] Cleanup zImage handling of kernel entry with flat device tree 2006-12-04 20:39:34 +11:00
flatdevtree.c
flatdevtree.h
gunzip_util.c [POWERPC] zImage: Add more flexible gunzip convenience functions 2007-03-13 13:35:01 +11:00
gunzip_util.h [POWERPC] zImage: Add more flexible gunzip convenience functions 2007-03-13 13:35:01 +11:00
hack-coff.c
install.sh
io.h [POWERPC] Add non-OF serial console support 2006-10-23 12:49:19 +10:00
main.c [POWERPC] zImage: Add more flexible gunzip convenience functions 2007-03-13 13:35:01 +11:00
Makefile [POWERPC] zImage: Add more flexible gunzip convenience functions 2007-03-13 13:35:01 +11:00
mktree.c [POWERPC] Add mktree utility to arch/powerpc/boot 2006-10-24 15:01:27 +10:00
ns16550.c [POWERPC] Add non-OF serial console support 2006-10-23 12:49:19 +10:00
of.c
ops.h [POWERPC] Cleanup zImage handling of kernel entry with flat device tree 2006-12-04 20:39:34 +11:00
page.h
ppc_asm.h
README
rs6000.h
serial.c [POWERPC] Add non-OF serial console support 2006-10-23 12:49:19 +10:00
simple_alloc.c [POWERPC] Add simple memory allocator to bootwrapper 2006-10-23 12:49:19 +10:00
stdio.c
stdio.h
string.h
string.S
types.h
util.S [POWERPC] Add non-OF serial console support 2006-10-23 12:49:19 +10:00
wrapper [PATCH] Remove dtb file created by wrapper script 2006-11-13 14:48:58 +11:00
zImage.coff.lds.S
zImage.lds.S [POWERPC] Make sure initrd and dtb sections get into zImage correctly 2006-11-09 16:00:06 +11:00

To extract the kernel vmlinux, System.map, .config or initrd from the zImage binary:

objcopy -j .kernel:vmlinux -O binary zImage vmlinux.gz
objcopy -j .kernel:System.map -O binary zImage System.map.gz
objcopy -j .kernel:.config -O binary zImage config.gz
objcopy -j .kernel:initrd -O binary zImage.initrd initrd.gz


	Peter