2 # linux/arch/arm/boot/compressed/Makefile
4 # create a compressed vmlinuz image from the original vmlinux
7 AFLAGS_head.o
+= -DTEXT_OFFSET
=$(TEXT_OFFSET
)
9 OBJS
= misc.o decompress.o
10 FONTC
= $(srctree
)/drivers
/video
/console
/font_acorn_8x8.c
13 # Architecture dependencies
15 ifeq ($(CONFIG_ARCH_ACORN
),y
)
16 OBJS
+= ll_char_wr.o font.o
19 ifeq ($(CONFIG_ARCH_SHARK
),y
)
20 OBJS
+= head-shark.o ofw-shark.o
23 ifeq ($(CONFIG_ARCH_P720T
),y
)
24 # Borrow this code from SA1100
28 ifeq ($(CONFIG_ARCH_SA1100
),y
)
32 ifeq ($(CONFIG_CPU_XSCALE
),y
)
36 ifeq ($(CONFIG_PXA_SHARPSL_DETECT_MACH_ID
),y
)
37 OBJS
+= head-sharpsl.o
40 ifeq ($(CONFIG_CPU_ENDIAN_BE32
),y
)
41 ifeq ($(CONFIG_CPU_CP15
),y
)
44 # The endian should be set by h/w design.
48 ifeq ($(CONFIG_ARCH_SHMOBILE
),y
)
49 OBJS
+= head-shmobile.o
53 # We now have a PIC decompressor implementation. Decompressors running
54 # from RAM should not define ZTEXTADDR. Decompressors running directly
55 # from ROM or Flash must define ZTEXTADDR (preferably via the config)
56 # FIXME: Previous assignment to ztextaddr-y is lost here. See SHARK
57 ifeq ($(CONFIG_ZBOOT_ROM
),y
)
58 ZTEXTADDR
:= $(CONFIG_ZBOOT_ROM_TEXT
)
59 ZBSSADDR
:= $(CONFIG_ZBOOT_ROM_BSS
)
65 SEDFLAGS
= s
/TEXT_START
/$(ZTEXTADDR
)/;s
/BSS_START
/$(ZBSSADDR
)/
67 suffix_
$(CONFIG_KERNEL_GZIP
) = gzip
68 suffix_
$(CONFIG_KERNEL_LZO
) = lzo
69 suffix_
$(CONFIG_KERNEL_LZMA
) = lzma
71 targets
:= vmlinux vmlinux.lds \
72 piggy.
$(suffix_y
) piggy.
$(suffix_y
).o \
73 font.o font.c head.o misc.o
$(OBJS
)
75 # Make sure files are removed during clean
76 extra-y
+= piggy.gzip piggy.lzo piggy.lzma lib1funcs.S
78 ifeq ($(CONFIG_FUNCTION_TRACER
),y
)
79 ORIG_CFLAGS
:= $(KBUILD_CFLAGS
)
80 KBUILD_CFLAGS
= $(subst -pg
, , $(ORIG_CFLAGS
))
83 EXTRA_CFLAGS
:= -fpic
-fno-builtin
84 EXTRA_AFLAGS
:= -Wa
,-march
=all
86 # Supply ZRELADDR to the decompressor via a linker symbol.
87 ifneq ($(CONFIG_AUTO_ZRELADDR
),y
)
88 LDFLAGS_vmlinux
:= --defsym zreladdr
=$(ZRELADDR
)
90 ifeq ($(CONFIG_CPU_ENDIAN_BE8
),y
)
91 LDFLAGS_vmlinux
+= --be8
95 # Report unresolved symbol references
96 LDFLAGS_vmlinux
+= --no-undefined
97 # Delete all temporary local symbols
99 # Next argument is a linker script
100 LDFLAGS_vmlinux
+= -T
102 # For __aeabi_uidivmod
103 lib1funcs
= $(obj
)/lib1funcs.o
105 $(obj
)/lib1funcs.S
: $(srctree
)/arch
/$(SRCARCH
)/lib
/lib1funcs.S FORCE
108 $(obj
)/vmlinux
: $(obj
)/vmlinux.lds
$(obj
)/$(HEAD
) $(obj
)/piggy.
$(suffix_y
).o \
109 $(addprefix $(obj
)/, $(OBJS
)) $(lib1funcs
) FORCE
110 $(call if_changed
,ld)
113 $(obj
)/piggy.
$(suffix_y
): $(obj
)/..
/Image FORCE
114 $(call if_changed
,$(suffix_y
))
116 $(obj
)/piggy.
$(suffix_y
).o
: $(obj
)/piggy.
$(suffix_y
) FORCE
118 CFLAGS_font.o
:= -Dstatic
=
120 $(obj
)/font.c
: $(FONTC
)
123 $(obj
)/vmlinux.lds
: $(obj
)/vmlinux.lds.in arch
/arm
/boot
/Makefile
$(KCONFIG_CONFIG
)
124 @sed
"$(SEDFLAGS)" < $< > $@