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