Magnus Damm | 3c92832 | 2009-07-29 15:04:05 +0000 | [diff] [blame] | 1 | # |
| 2 | # linux/arch/sh/boot/romimage/Makefile |
| 3 | # |
Magnus Damm | 4705b2e | 2010-05-18 14:43:15 +0000 | [diff] [blame] | 4 | # create an romImage file suitable for burning to flash/mmc from zImage |
Magnus Damm | 3c92832 | 2009-07-29 15:04:05 +0000 | [diff] [blame] | 5 | # |
| 6 | |
Magnus Damm | 6a5a0b9 | 2009-12-04 06:42:35 +0000 | [diff] [blame] | 7 | targets := vmlinux head.o zeropage.bin piggy.o |
Magnus Damm | 4705b2e | 2010-05-18 14:43:15 +0000 | [diff] [blame] | 8 | load-y := 0 |
Magnus Damm | 3c92832 | 2009-07-29 15:04:05 +0000 | [diff] [blame] | 9 | |
Magnus Damm | 4705b2e | 2010-05-18 14:43:15 +0000 | [diff] [blame] | 10 | mmcif-load-$(CONFIG_CPU_SUBTYPE_SH7724) := 0xe5200000 # ILRAM |
| 11 | mmcif-obj-$(CONFIG_CPU_SUBTYPE_SH7724) := $(obj)/mmcif-sh7724.o |
| 12 | load-$(CONFIG_ROMIMAGE_MMCIF) := $(mmcif-load-y) |
| 13 | obj-$(CONFIG_ROMIMAGE_MMCIF) := $(mmcif-obj-y) |
| 14 | |
| 15 | LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(load-y) -e romstart \ |
Magnus Damm | 6a5a0b9 | 2009-12-04 06:42:35 +0000 | [diff] [blame] | 16 | -T $(obj)/../../kernel/vmlinux.lds |
Magnus Damm | 3c92832 | 2009-07-29 15:04:05 +0000 | [diff] [blame] | 17 | |
Magnus Damm | 4705b2e | 2010-05-18 14:43:15 +0000 | [diff] [blame] | 18 | $(obj)/vmlinux: $(obj)/head.o $(obj-y) $(obj)/piggy.o FORCE |
Magnus Damm | 3c92832 | 2009-07-29 15:04:05 +0000 | [diff] [blame] | 19 | $(call if_changed,ld) |
Magnus Damm | 3c92832 | 2009-07-29 15:04:05 +0000 | [diff] [blame] | 20 | |
Magnus Damm | 6a5a0b9 | 2009-12-04 06:42:35 +0000 | [diff] [blame] | 21 | OBJCOPYFLAGS += -j .empty_zero_page |
| 22 | |
| 23 | $(obj)/zeropage.bin: vmlinux FORCE |
| 24 | $(call if_changed,objcopy) |
| 25 | |
Magnus Damm | 3c92832 | 2009-07-29 15:04:05 +0000 | [diff] [blame] | 26 | LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T |
| 27 | |
Magnus Damm | 6a5a0b9 | 2009-12-04 06:42:35 +0000 | [diff] [blame] | 28 | $(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/zeropage.bin arch/sh/boot/zImage FORCE |
Magnus Damm | 3c92832 | 2009-07-29 15:04:05 +0000 | [diff] [blame] | 29 | $(call if_changed,ld) |