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