aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sh/Makefile2
-rw-r--r--arch/sh/boot/Makefile11
-rw-r--r--arch/sh/boot/romimage/Makefile19
-rw-r--r--arch/sh/boot/romimage/head.S10
-rw-r--r--arch/sh/boot/romimage/vmlinux.scr6
-rw-r--r--arch/sh/include/mach-common/romimage.h1
6 files changed, 46 insertions, 3 deletions
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index c46b3d508f22..2a7e73faee89 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -195,7 +195,7 @@ libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y)
195libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y) 195libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y)
196 196
197BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.srec \ 197BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.srec \
198 zImage vmlinux.srec 198 zImage vmlinux.srec romImage
199PHONY += maketools $(BOOT_TARGETS) FORCE 199PHONY += maketools $(BOOT_TARGETS) FORCE
200 200
201maketools: include/linux/version.h FORCE 201maketools: include/linux/version.h FORCE
diff --git a/arch/sh/boot/Makefile b/arch/sh/boot/Makefile
index dd2a852041e9..a1316872be6f 100644
--- a/arch/sh/boot/Makefile
+++ b/arch/sh/boot/Makefile
@@ -24,9 +24,9 @@ suffix-$(CONFIG_KERNEL_GZIP) := gz
24suffix-$(CONFIG_KERNEL_BZIP2) := bz2 24suffix-$(CONFIG_KERNEL_BZIP2) := bz2
25suffix-$(CONFIG_KERNEL_LZMA) := lzma 25suffix-$(CONFIG_KERNEL_LZMA) := lzma
26 26
27targets := zImage vmlinux.srec uImage uImage.srec uImage.gz uImage.bz2 uImage.lzma 27targets := zImage vmlinux.srec romImage uImage uImage.srec uImage.gz uImage.bz2 uImage.lzma
28extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma 28extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma
29subdir- := compressed 29subdir- := compressed romimage
30 30
31$(obj)/zImage: $(obj)/compressed/vmlinux FORCE 31$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
32 $(call if_changed,objcopy) 32 $(call if_changed,objcopy)
@@ -35,6 +35,13 @@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
35$(obj)/compressed/vmlinux: FORCE 35$(obj)/compressed/vmlinux: FORCE
36 $(Q)$(MAKE) $(build)=$(obj)/compressed $@ 36 $(Q)$(MAKE) $(build)=$(obj)/compressed $@
37 37
38$(obj)/romImage: $(obj)/romimage/vmlinux FORCE
39 $(call if_changed,objcopy)
40 @echo ' Kernel: $@ is ready'
41
42$(obj)/romimage/vmlinux: $(obj)/zImage FORCE
43 $(Q)$(MAKE) $(build)=$(obj)/romimage $@
44
38KERNEL_MEMORY := 0x00000000 45KERNEL_MEMORY := 0x00000000
39ifeq ($(CONFIG_PMB_FIXED),y) 46ifeq ($(CONFIG_PMB_FIXED),y)
40KERNEL_MEMORY := $(shell /bin/bash -c 'printf "0x%08x" \ 47KERNEL_MEMORY := $(shell /bin/bash -c 'printf "0x%08x" \
diff --git a/arch/sh/boot/romimage/Makefile b/arch/sh/boot/romimage/Makefile
new file mode 100644
index 000000000000..5806eee84f6f
--- /dev/null
+++ b/arch/sh/boot/romimage/Makefile
@@ -0,0 +1,19 @@
1#
2# linux/arch/sh/boot/romimage/Makefile
3#
4# create an image suitable for burning to flash from zImage
5#
6
7targets := vmlinux head.o
8
9OBJECTS = $(obj)/head.o
10LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext 0 -e romstart
11
12$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
13 $(call if_changed,ld)
14 @:
15
16LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
17
18$(obj)/piggy.o: $(obj)/vmlinux.scr arch/sh/boot/zImage FORCE
19 $(call if_changed,ld)
diff --git a/arch/sh/boot/romimage/head.S b/arch/sh/boot/romimage/head.S
new file mode 100644
index 000000000000..97a087bc9c4a
--- /dev/null
+++ b/arch/sh/boot/romimage/head.S
@@ -0,0 +1,10 @@
1/*
2 * linux/arch/sh/boot/romimage/head.S
3 *
4 * Board specific setup code, executed before zImage loader
5 */
6
7.text
8 .global romstart
9romstart:
10#include <romimage.h>
diff --git a/arch/sh/boot/romimage/vmlinux.scr b/arch/sh/boot/romimage/vmlinux.scr
new file mode 100644
index 000000000000..287c08f8b4bb
--- /dev/null
+++ b/arch/sh/boot/romimage/vmlinux.scr
@@ -0,0 +1,6 @@
1SECTIONS
2{
3 .text : {
4 *(.data)
5 }
6}
diff --git a/arch/sh/include/mach-common/romimage.h b/arch/sh/include/mach-common/romimage.h
new file mode 100644
index 000000000000..267e24112d82
--- /dev/null
+++ b/arch/sh/include/mach-common/romimage.h
@@ -0,0 +1 @@
/* do nothing here by default */