aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boot/compressed/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boot/compressed/Makefile')
-rw-r--r--arch/sh/boot/compressed/Makefile50
1 files changed, 46 insertions, 4 deletions
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile
index efb01dc3c8c3..9531bf1b7c2f 100644
--- a/arch/sh/boot/compressed/Makefile
+++ b/arch/sh/boot/compressed/Makefile
@@ -1,5 +1,47 @@
1ifeq ($(CONFIG_SUPERH32),y) 1#
2include ${srctree}/arch/sh/boot/compressed/Makefile_32 2# linux/arch/sh/boot/compressed/Makefile
3else 3#
4include ${srctree}/arch/sh/boot/compressed/Makefile_64 4# create a compressed vmlinux image from the original vmlinux
5#
6
7targets := vmlinux vmlinux.bin vmlinux.bin.gz \
8 head_$(BITS).o misc_$(BITS).o piggy.o
9
10OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc_$(BITS).o $(obj)/cache.o
11
12ifdef CONFIG_SH_STANDARD_BIOS
13OBJECTS += $(obj)/../../kernel/sh_bios.o
5endif 14endif
15
16#
17# IMAGE_OFFSET is the load offset of the compression loader
18#
19IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
20 $$[$(CONFIG_PAGE_OFFSET) + \
21 $(KERNEL_MEMORY) + \
22 $(CONFIG_BOOT_LINK_OFFSET)]')
23
24LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
25
26ifeq ($(CONFIG_FUNCTION_TRACER),y)
27ORIG_CFLAGS := $(KBUILD_CFLAGS)
28KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
29endif
30
31LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \
32 -T $(obj)/../../kernel/vmlinux.lds
33
34$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE
35 $(call if_changed,ld)
36 @:
37
38$(obj)/vmlinux.bin: vmlinux FORCE
39 $(call if_changed,objcopy)
40
41$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
42 $(call if_changed,gzip)
43
44OBJCOPYFLAGS += -R .empty_zero_page
45
46$(obj)/piggy.o: $(obj)/piggy.S $(obj)/vmlinux.bin.gz FORCE
47 $(call if_changed,as_o_S)