From ad9d2716cfc1cda5a7e0d7bc0db45e3af8a4adbb Mon Sep 17 00:00:00 2001 From: David Gibson Date: Mon, 5 Mar 2007 14:24:52 +1100 Subject: [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 Signed-off-by: Paul Mackerras --- arch/powerpc/boot/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/powerpc/boot/Makefile') diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index dc779407de1..3628d868184 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -41,7 +41,8 @@ $(addprefix $(obj)/,$(zlib) main.o): $(addprefix $(obj)/,$(zliblinuxheader)) \ $(addprefix $(obj)/,$(zlibheader)) src-wlib := string.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \ - ns16550.c serial.c simple_alloc.c div64.S util.S $(zlib) + ns16550.c serial.c simple_alloc.c div64.S util.S \ + gunzip_util.c $(zlib) src-plat := of.c src-boot := crt0.S $(src-wlib) $(src-plat) empty.c -- cgit v1.2.3