diff options
author | Magnus Damm <damm@igel.co.jp> | 2009-07-29 15:04:05 +0000 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-07-30 00:24:03 +0900 |
commit | 3c928320b2254cb6c8d8a7919a1fcf94ca7cae66 (patch) | |
tree | ee2682b83916592c63202cb8749e1e35cfc5728a /arch/sh/boot/romimage | |
parent | fd78a76aefb5bf28a11d6960d29e03a11db62320 (diff) | |
download | linux-3c928320b2254cb6c8d8a7919a1fcf94ca7cae66.tar.bz2 |
sh: romImage support V2
This patch contains support for the romImage build target V2.
The resulting romImage file should be burned to rom
or flash and could be used as small boot loader.
Board code should keep their setup code in the file
romimage.h located in their mach include directory.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boot/romimage')
-rw-r--r-- | arch/sh/boot/romimage/Makefile | 19 | ||||
-rw-r--r-- | arch/sh/boot/romimage/head.S | 10 | ||||
-rw-r--r-- | arch/sh/boot/romimage/vmlinux.scr | 6 |
3 files changed, 35 insertions, 0 deletions
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 @@ +# +# linux/arch/sh/boot/romimage/Makefile +# +# create an image suitable for burning to flash from zImage +# + +targets := vmlinux head.o + +OBJECTS = $(obj)/head.o +LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext 0 -e romstart + +$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE + $(call if_changed,ld) + @: + +LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T + +$(obj)/piggy.o: $(obj)/vmlinux.scr arch/sh/boot/zImage FORCE + $(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 @@ +/* + * linux/arch/sh/boot/romimage/head.S + * + * Board specific setup code, executed before zImage loader + */ + +.text + .global romstart +romstart: +#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 @@ +SECTIONS +{ + .text : { + *(.data) + } +} |