aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boot/compressed
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boot/compressed')
-rw-r--r--arch/sh/boot/compressed/Makefile28
-rw-r--r--arch/sh/boot/compressed/head_32.S4
-rw-r--r--arch/sh/boot/compressed/misc.c4
3 files changed, 31 insertions, 5 deletions
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile
index cfa5a087a886..23bc849d9c64 100644
--- a/arch/sh/boot/compressed/Makefile
+++ b/arch/sh/boot/compressed/Makefile
@@ -6,11 +6,13 @@
6 6
7targets := vmlinux vmlinux.bin vmlinux.bin.gz \ 7targets := vmlinux vmlinux.bin vmlinux.bin.gz \
8 vmlinux.bin.bz2 vmlinux.bin.lzma \ 8 vmlinux.bin.bz2 vmlinux.bin.lzma \
9 vmlinux.bin.lzo \ 9 vmlinux.bin.xz vmlinux.bin.lzo \
10 head_$(BITS).o misc.o piggy.o 10 head_$(BITS).o misc.o piggy.o
11 11
12OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/cache.o 12OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/cache.o
13 13
14GCOV_PROFILE := n
15
14# 16#
15# IMAGE_OFFSET is the load offset of the compression loader 17# IMAGE_OFFSET is the load offset of the compression loader
16# 18#
@@ -25,8 +27,6 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \
25 $(CONFIG_BOOT_LINK_OFFSET)]') 27 $(CONFIG_BOOT_LINK_OFFSET)]')
26endif 28endif
27 29
28LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
29
30ifeq ($(CONFIG_MCOUNT),y) 30ifeq ($(CONFIG_MCOUNT),y)
31ORIG_CFLAGS := $(KBUILD_CFLAGS) 31ORIG_CFLAGS := $(KBUILD_CFLAGS)
32KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) 32KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
@@ -35,7 +35,25 @@ endif
35LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \ 35LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \
36 -T $(obj)/../../kernel/vmlinux.lds 36 -T $(obj)/../../kernel/vmlinux.lds
37 37
38$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE 38#
39# Pull in the necessary libgcc bits from the in-kernel implementation.
40#
41lib1funcs-$(CONFIG_SUPERH32) := ashiftrt.S ashldi3.c ashrsi3.S ashlsi3.S \
42 lshrsi3.S
43lib1funcs-obj := \
44 $(addsuffix .o, $(basename $(addprefix $(obj)/, $(lib1funcs-y))))
45
46lib1funcs-dir := $(srctree)/arch/$(SRCARCH)/lib
47ifeq ($(BITS),64)
48 lib1funcs-dir := $(addsuffix $(BITS), $(lib1funcs-dir))
49endif
50
51KBUILD_CFLAGS += -I$(lib1funcs-dir)
52
53$(addprefix $(obj)/,$(lib1funcs-y)): $(obj)/%: $(lib1funcs-dir)/% FORCE
54 $(call cmd,shipped)
55
56$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(lib1funcs-obj) FORCE
39 $(call if_changed,ld) 57 $(call if_changed,ld)
40 @: 58 @:
41 59
@@ -50,6 +68,8 @@ $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
50 $(call if_changed,bzip2) 68 $(call if_changed,bzip2)
51$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE 69$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
52 $(call if_changed,lzma) 70 $(call if_changed,lzma)
71$(obj)/vmlinux.bin.xz: $(vmlinux.bin.all-y) FORCE
72 $(call if_changed,xzkern)
53$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE 73$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE
54 $(call if_changed,lzo) 74 $(call if_changed,lzo)
55 75
diff --git a/arch/sh/boot/compressed/head_32.S b/arch/sh/boot/compressed/head_32.S
index 200c1d4f1efe..3e150326f1fd 100644
--- a/arch/sh/boot/compressed/head_32.S
+++ b/arch/sh/boot/compressed/head_32.S
@@ -91,7 +91,9 @@ bss_start_addr:
91end_addr: 91end_addr:
92 .long _end 92 .long _end
93init_sr: 93init_sr:
94 .long 0x400000F0 /* Privileged mode, Bank=0, Block=0, IMASK=0xF */ 94 .long 0x500000F0 /* Privileged mode, Bank=0, Block=1, IMASK=0xF */
95kexec_magic:
96 .long 0x400000F0 /* magic used by kexec to parse zImage format */
95init_stack_addr: 97init_stack_addr:
96 .long stack_start 98 .long stack_start
97decompress_kernel_addr: 99decompress_kernel_addr:
diff --git a/arch/sh/boot/compressed/misc.c b/arch/sh/boot/compressed/misc.c
index 27140a6b365d..95470a472d2c 100644
--- a/arch/sh/boot/compressed/misc.c
+++ b/arch/sh/boot/compressed/misc.c
@@ -61,6 +61,10 @@ static unsigned long free_mem_end_ptr;
61#include "../../../../lib/decompress_unlzma.c" 61#include "../../../../lib/decompress_unlzma.c"
62#endif 62#endif
63 63
64#ifdef CONFIG_KERNEL_XZ
65#include "../../../../lib/decompress_unxz.c"
66#endif
67
64#ifdef CONFIG_KERNEL_LZO 68#ifdef CONFIG_KERNEL_LZO
65#include "../../../../lib/decompress_unlzo.c" 69#include "../../../../lib/decompress_unlzo.c"
66#endif 70#endif