2 # linux/arch/arm/boot/compressed/Makefile
4 # create a compressed vmlinuz image from the original vmlinux
9 FONTC = drivers/video/console/font_acorn_8x8.c
12 # Architecture dependencies
14 ifeq ($(CONFIG_ARCH_ACORN),y)
15 OBJS += ll_char_wr.o font.o
18 ifeq ($(CONFIG_ARCH_SHARK),y)
19 OBJS += head-shark.o ofw-shark.o
22 ifeq ($(CONFIG_ARCH_CAMELOT),y)
23 OBJS += head-epxa10db.o
26 ifeq ($(CONFIG_ARCH_L7200),y)
30 ifeq ($(CONFIG_ARCH_CLPS7500),y)
31 HEAD = head-clps7500.o
34 ifeq ($(CONFIG_ARCH_P720T),y)
35 # Borrow this code from SA1100
39 ifeq ($(CONFIG_ARCH_SA1100),y)
41 ifeq ($(CONFIG_SA1100_NANOENGINE),y)
46 ifeq ($(CONFIG_CPU_XSCALE),y)
50 ifeq ($(CONFIG_DEBUG_ICEDCC),y)
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)
67 SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
69 targets := vmlinux vmlinux.lds piggy.gz piggy.o font.o \
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)
81 ifneq ($(PARAMS_PHYS),)
82 LDFLAGS_vmlinux += --defsym params_phys=$(PARAMS_PHYS)
84 LDFLAGS_vmlinux += -p --no-undefined -X \
85 $(shell $(CC) $(CFLAGS) --print-libgcc-file-name) -T
87 # Don't allow any static data in misc.o, which
88 # would otherwise mess up our GOT table
89 CFLAGS_misc.o := -Dstatic=
91 $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
92 $(addprefix $(obj)/, $(OBJS)) FORCE
96 $(obj)/piggy.gz: $(obj)/../Image FORCE
97 $(call if_changed,gzip)
99 $(obj)/piggy.o: $(obj)/piggy.gz FORCE
101 CFLAGS_font.o := -Dstatic=
102 $(obj)/font.o: $(FONTC)
104 $(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/arm/boot/Makefile .config
105 @sed "$(SEDFLAGS)" < $< > $@
107 $(obj)/misc.o: $(obj)/misc.c include/asm/arch/uncompress.h lib/inflate.c