aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/boot/Makefile
diff options
context:
space:
mode:
authorOlaf Hering <olh@suse.de>2005-10-28 20:46:38 -0400
committerPaul Mackerras <paulus@samba.org>2005-10-29 01:04:43 -0400
commit7054036fc526b741ba90ff1d077ac900362f30ed (patch)
tree90d4edc10a81861219eb3d37e2fd93814935c315 /arch/ppc64/boot/Makefile
parent8afe31c9eb92389f091a40def9650278ca66befd (diff)
[PATCH] ppc64 boot: remove zlib
Switch ppc64 to the in-kernel zlib, it has less bugs than the current one. The code in arch/ppc64/boot is compiled as 32bit, so it can not use the includes from include/asm. Copy all zlib related header files and convert them with sed. Reduce the scratch size to 47k, check possible changes at runtime. Signed-off-by: Olaf Hering <olh@suse.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/boot/Makefile')
-rw-r--r--arch/ppc64/boot/Makefile33
1 files changed, 32 insertions, 1 deletions
diff --git a/arch/ppc64/boot/Makefile b/arch/ppc64/boot/Makefile
index 33fdc8710891..3c78d72a84bb 100644
--- a/arch/ppc64/boot/Makefile
+++ b/arch/ppc64/boot/Makefile
@@ -27,10 +27,41 @@ BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
27BOOTLFLAGS := -Ttext 0x00400000 -e _start -T $(srctree)/$(src)/zImage.lds 27BOOTLFLAGS := -Ttext 0x00400000 -e _start -T $(srctree)/$(src)/zImage.lds
28OBJCOPYFLAGS := contents,alloc,load,readonly,data 28OBJCOPYFLAGS := contents,alloc,load,readonly,data
29 29
30src-boot := crt0.S string.S prom.c main.c zlib.c imagesize.c div64.S 30zlib := infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c
31zlibheader := infblock.h infcodes.h inffast.h inftrees.h infutil.h
32zliblinuxheader := zlib.h zconf.h zutil.h
33
34$(addprefix $(obj)/,$(zlib) main.o): $(addprefix $(obj)/,$(zliblinuxheader)) $(addprefix $(obj)/,$(zlibheader))
35#$(addprefix $(obj)/,main.o): $(addprefix $(obj)/,zlib.h)
36
37src-boot := crt0.S string.S prom.c main.c imagesize.c div64.S
38src-boot += $(zlib)
31src-boot := $(addprefix $(obj)/, $(src-boot)) 39src-boot := $(addprefix $(obj)/, $(src-boot))
32obj-boot := $(addsuffix .o, $(basename $(src-boot))) 40obj-boot := $(addsuffix .o, $(basename $(src-boot)))
33 41
42BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj)
43
44quiet_cmd_copy_zlib = COPY $@
45 cmd_copy_zlib = sed "s@__attribute_used__@@;s@<linux/\([^>]\+\).*@\"\1\"@" $< > $@
46
47quiet_cmd_copy_zlibheader = COPY $@
48 cmd_copy_zlibheader = sed "s@<linux/\([^>]\+\).*@\"\1\"@" $< > $@
49# stddef.h for NULL
50quiet_cmd_copy_zliblinuxheader = COPY $@
51 cmd_copy_zliblinuxheader = sed "s@<linux/string.h>@\"string.h\"@;s@<linux/kernel.h>@<stddef.h>@;s@<linux/\([^>]\+\).*@\"\1\"@" $< > $@
52
53$(addprefix $(obj)/,$(zlib)): $(obj)/%: $(srctree)/lib/zlib_inflate/%
54 $(call cmd,copy_zlib)
55
56$(addprefix $(obj)/,$(zlibheader)): $(obj)/%: $(srctree)/lib/zlib_inflate/%
57 $(call cmd,copy_zlibheader)
58
59$(addprefix $(obj)/,$(zliblinuxheader)): $(obj)/%: $(srctree)/include/linux/%
60 $(call cmd,copy_zliblinuxheader)
61
62clean-files := $(zlib) $(zlibheader) $(zliblinuxheader)
63
64
34quiet_cmd_bootcc = BOOTCC $@ 65quiet_cmd_bootcc = BOOTCC $@
35 cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< 66 cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
36 67