aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/compressed/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/boot/compressed/Makefile')
-rw-r--r--arch/arm/boot/compressed/Makefile32
1 files changed, 28 insertions, 4 deletions
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 0c74a6fab95..e4f32a8e002 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -26,6 +26,10 @@ HEAD = head.o
26OBJS += misc.o decompress.o 26OBJS += misc.o decompress.o
27FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c 27FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c
28 28
29# string library code (-Os is enforced to keep it much smaller)
30OBJS += string.o
31CFLAGS_string.o := -Os
32
29# 33#
30# Architecture dependencies 34# Architecture dependencies
31# 35#
@@ -89,21 +93,41 @@ suffix_$(CONFIG_KERNEL_GZIP) = gzip
89suffix_$(CONFIG_KERNEL_LZO) = lzo 93suffix_$(CONFIG_KERNEL_LZO) = lzo
90suffix_$(CONFIG_KERNEL_LZMA) = lzma 94suffix_$(CONFIG_KERNEL_LZMA) = lzma
91 95
96# Borrowed libfdt files for the ATAG compatibility mode
97
98libfdt := fdt_rw.c fdt_ro.c fdt_wip.c fdt.c
99libfdt_hdrs := fdt.h libfdt.h libfdt_internal.h
100
101libfdt_objs := $(addsuffix .o, $(basename $(libfdt)))
102
103$(addprefix $(obj)/,$(libfdt) $(libfdt_hdrs)): $(obj)/%: $(srctree)/scripts/dtc/libfdt/%
104 $(call cmd,shipped)
105
106$(addprefix $(obj)/,$(libfdt_objs) atags_to_fdt.o): \
107 $(addprefix $(obj)/,$(libfdt_hdrs))
108
109ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y)
110OBJS += $(libfdt_objs) atags_to_fdt.o
111endif
112
92targets := vmlinux vmlinux.lds \ 113targets := vmlinux vmlinux.lds \
93 piggy.$(suffix_y) piggy.$(suffix_y).o \ 114 piggy.$(suffix_y) piggy.$(suffix_y).o \
94 font.o font.c head.o misc.o $(OBJS) 115 lib1funcs.o lib1funcs.S font.o font.c head.o misc.o $(OBJS)
95 116
96# Make sure files are removed during clean 117# Make sure files are removed during clean
97extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S 118extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S $(libfdt) $(libfdt_hdrs)
98 119
99ifeq ($(CONFIG_FUNCTION_TRACER),y) 120ifeq ($(CONFIG_FUNCTION_TRACER),y)
100ORIG_CFLAGS := $(KBUILD_CFLAGS) 121ORIG_CFLAGS := $(KBUILD_CFLAGS)
101KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) 122KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
102endif 123endif
103 124
104ccflags-y := -fpic -fno-builtin 125ccflags-y := -fpic -fno-builtin -I$(obj)
105asflags-y := -Wa,-march=all 126asflags-y := -Wa,-march=all
106 127
128# Supply kernel BSS size to the decompressor via a linker symbol.
129KBSS_SZ = $(shell size $(obj)/../../../../vmlinux | awk 'END{print $$3}')
130LDFLAGS_vmlinux = --defsym _kernel_bss_size=$(KBSS_SZ)
107# Supply ZRELADDR to the decompressor via a linker symbol. 131# Supply ZRELADDR to the decompressor via a linker symbol.
108ifneq ($(CONFIG_AUTO_ZRELADDR),y) 132ifneq ($(CONFIG_AUTO_ZRELADDR),y)
109LDFLAGS_vmlinux += --defsym zreladdr=$(ZRELADDR) 133LDFLAGS_vmlinux += --defsym zreladdr=$(ZRELADDR)
@@ -123,7 +147,7 @@ LDFLAGS_vmlinux += -T
123# For __aeabi_uidivmod 147# For __aeabi_uidivmod
124lib1funcs = $(obj)/lib1funcs.o 148lib1funcs = $(obj)/lib1funcs.o
125 149
126$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S FORCE 150$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S
127 $(call cmd,shipped) 151 $(call cmd,shipped)
128 152
129# We need to prevent any GOTOFF relocs being used with references 153# We need to prevent any GOTOFF relocs being used with references