]> bbs.cooldavid.org Git - net-next-2.6.git/blame - arch/arm/boot/compressed/Makefile
Linux-2.6.12-rc2
[net-next-2.6.git] / arch / arm / boot / compressed / Makefile
CommitLineData
1da177e4
LT
1#
2# linux/arch/arm/boot/compressed/Makefile
3#
4# create a compressed vmlinuz image from the original vmlinux
5#
6
7HEAD = head.o
8OBJS = misc.o
9FONTC = drivers/video/console/font_acorn_8x8.c
10
11FONT = $(addprefix ../../../../drivers/video/console/, font_acorn_8x8.o)
12
13#
14# Architecture dependencies
15#
16ifeq ($(CONFIG_ARCH_ACORN),y)
17OBJS += ll_char_wr.o $(FONT)
18endif
19
20ifeq ($(CONFIG_ARCH_SHARK),y)
21OBJS += head-shark.o ofw-shark.o
22endif
23
24ifeq ($(CONFIG_ARCH_CAMELOT),y)
25OBJS += head-epxa10db.o
26endif
27
28ifeq ($(CONFIG_ARCH_L7200),y)
29OBJS += head-l7200.o
30endif
31
32ifeq ($(CONFIG_ARCH_CLPS7500),y)
33HEAD = head-clps7500.o
34endif
35
36ifeq ($(CONFIG_ARCH_P720T),y)
37# Borrow this code from SA1100
38OBJS += head-sa1100.o
39endif
40
41ifeq ($(CONFIG_ARCH_SA1100),y)
42OBJS += head-sa1100.o
43endif
44
45ifeq ($(CONFIG_CPU_XSCALE),y)
46OBJS += head-xscale.o
47endif
48
49ifeq ($(CONFIG_PXA_SHARPSL),y)
50OBJS += head-sharpsl.o
51endif
52
53ifeq ($(CONFIG_DEBUG_ICEDCC),y)
54OBJS += ice-dcc.o
55endif
56
57ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
58OBJS += big-endian.o
59endif
60
61#
62# We now have a PIC decompressor implementation. Decompressors running
63# from RAM should not define ZTEXTADDR. Decompressors running directly
64# from ROM or Flash must define ZTEXTADDR (preferably via the config)
65# FIXME: Previous assignment to ztextaddr-y is lost here. See SHARK
66ifeq ($(CONFIG_ZBOOT_ROM),y)
67ZTEXTADDR := $(CONFIG_ZBOOT_ROM_TEXT)
68ZBSSADDR := $(CONFIG_ZBOOT_ROM_BSS)
69else
70ZTEXTADDR := 0
71ZBSSADDR := ALIGN(4)
72endif
73
74SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
75
76targets := vmlinux vmlinux.lds piggy.gz piggy.o $(FONT) \
77 head.o misc.o $(OBJS)
78EXTRA_CFLAGS := -fpic
79EXTRA_AFLAGS :=
80
81# Supply ZRELADDR, INITRD_PHYS and PARAMS_PHYS to the decompressor via
82# linker symbols. We only define initrd_phys and params_phys if the
83# machine class defined the corresponding makefile variable.
84LDFLAGS_vmlinux := --defsym zreladdr=$(ZRELADDR)
85ifneq ($(INITRD_PHYS),)
86LDFLAGS_vmlinux += --defsym initrd_phys=$(INITRD_PHYS)
87endif
88ifneq ($(PARAMS_PHYS),)
89LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS)
90endif
91LDFLAGS_vmlinux += -p --no-undefined -X \
92 $(shell $(CC) $(CFLAGS) --print-libgcc-file-name) -T
93
94# Don't allow any static data in misc.o, which
95# would otherwise mess up our GOT table
96CFLAGS_misc.o := -Dstatic=
97
98$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
99 $(addprefix $(obj)/, $(OBJS)) FORCE
100 $(call if_changed,ld)
101 @:
102
103$(obj)/piggy.gz: $(obj)/../Image FORCE
104 $(call if_changed,gzip)
105
106$(obj)/piggy.o: $(obj)/piggy.gz FORCE
107
108CFLAGS_font_acorn_8x8.o := -Dstatic=
109
110$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile .config
111 @sed "$(SEDFLAGS)" < $< > $@
112
113$(obj)/misc.o: $(obj)/misc.c include/asm/arch/uncompress.h lib/inflate.c
114