diff options
Diffstat (limited to 'arch/arm/boot/compressed/Makefile')
-rw-r--r-- | arch/arm/boot/compressed/Makefile | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index a6b30b35ca65..21f56ff32797 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -26,6 +26,10 @@ HEAD = head.o | |||
26 | OBJS += misc.o decompress.o | 26 | OBJS += misc.o decompress.o |
27 | FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c | 27 | FONTC = $(srctree)/drivers/video/console/font_acorn_8x8.c |
28 | 28 | ||
29 | # string library code (-Os is enforced to keep it much smaller) | ||
30 | OBJS += string.o | ||
31 | CFLAGS_string.o := -Os | ||
32 | |||
29 | # | 33 | # |
30 | # Architecture dependencies | 34 | # Architecture dependencies |
31 | # | 35 | # |
@@ -89,21 +93,41 @@ suffix_$(CONFIG_KERNEL_GZIP) = gzip | |||
89 | suffix_$(CONFIG_KERNEL_LZO) = lzo | 93 | suffix_$(CONFIG_KERNEL_LZO) = lzo |
90 | suffix_$(CONFIG_KERNEL_LZMA) = lzma | 94 | suffix_$(CONFIG_KERNEL_LZMA) = lzma |
91 | 95 | ||
96 | # Borrowed libfdt files for the ATAG compatibility mode | ||
97 | |||
98 | libfdt := fdt_rw.c fdt_ro.c fdt_wip.c fdt.c | ||
99 | libfdt_hdrs := fdt.h libfdt.h libfdt_internal.h | ||
100 | |||
101 | libfdt_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 | |||
109 | ifeq ($(CONFIG_ARM_ATAG_DTB_COMPAT),y) | ||
110 | OBJS += $(libfdt_objs) atags_to_fdt.o | ||
111 | endif | ||
112 | |||
92 | targets := vmlinux vmlinux.lds \ | 113 | targets := 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 |
97 | extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S | 118 | extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S $(libfdt) $(libfdt_hdrs) |
98 | 119 | ||
99 | ifeq ($(CONFIG_FUNCTION_TRACER),y) | 120 | ifeq ($(CONFIG_FUNCTION_TRACER),y) |
100 | ORIG_CFLAGS := $(KBUILD_CFLAGS) | 121 | ORIG_CFLAGS := $(KBUILD_CFLAGS) |
101 | KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) | 122 | KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) |
102 | endif | 123 | endif |
103 | 124 | ||
104 | ccflags-y := -fpic -fno-builtin | 125 | ccflags-y := -fpic -fno-builtin -I$(obj) |
105 | asflags-y := -Wa,-march=all | 126 | asflags-y := -Wa,-march=all |
106 | 127 | ||
128 | # Supply kernel BSS size to the decompressor via a linker symbol. | ||
129 | KBSS_SZ = $(shell size $(obj)/../../../../vmlinux | awk 'END{print $$3}') | ||
130 | LDFLAGS_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. |
108 | ifneq ($(CONFIG_AUTO_ZRELADDR),y) | 132 | ifneq ($(CONFIG_AUTO_ZRELADDR),y) |
109 | LDFLAGS_vmlinux += --defsym zreladdr=$(ZRELADDR) | 133 | LDFLAGS_vmlinux += --defsym zreladdr=$(ZRELADDR) |
@@ -123,7 +147,7 @@ LDFLAGS_vmlinux += -T | |||
123 | # For __aeabi_uidivmod | 147 | # For __aeabi_uidivmod |
124 | lib1funcs = $(obj)/lib1funcs.o | 148 | lib1funcs = $(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 |