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