blob: 43c41191de5d9e37ba600bf250868c6387ad5f30 [file] [log] [blame]
Magnus Damm3c928322009-07-29 15:04:05 +00001#
2# linux/arch/sh/boot/romimage/Makefile
3#
Magnus Damm4705b2e2010-05-18 14:43:15 +00004# create an romImage file suitable for burning to flash/mmc from zImage
Magnus Damm3c928322009-07-29 15:04:05 +00005#
6
Magnus Damm6a5a0b92009-12-04 06:42:35 +00007targets := vmlinux head.o zeropage.bin piggy.o
Magnus Damm4705b2e2010-05-18 14:43:15 +00008load-y := 0
Magnus Damm3c928322009-07-29 15:04:05 +00009
Magnus Damm4705b2e2010-05-18 14:43:15 +000010mmcif-load-$(CONFIG_CPU_SUBTYPE_SH7724) := 0xe5200000 # ILRAM
11mmcif-obj-$(CONFIG_CPU_SUBTYPE_SH7724) := $(obj)/mmcif-sh7724.o
12load-$(CONFIG_ROMIMAGE_MMCIF) := $(mmcif-load-y)
13obj-$(CONFIG_ROMIMAGE_MMCIF) := $(mmcif-obj-y)
14
15LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(load-y) -e romstart \
Magnus Damm6a5a0b92009-12-04 06:42:35 +000016 -T $(obj)/../../kernel/vmlinux.lds
Magnus Damm3c928322009-07-29 15:04:05 +000017
Magnus Damm4705b2e2010-05-18 14:43:15 +000018$(obj)/vmlinux: $(obj)/head.o $(obj-y) $(obj)/piggy.o FORCE
Magnus Damm3c928322009-07-29 15:04:05 +000019 $(call if_changed,ld)
Magnus Damm3c928322009-07-29 15:04:05 +000020
Magnus Damm6a5a0b92009-12-04 06:42:35 +000021OBJCOPYFLAGS += -j .empty_zero_page
22
23$(obj)/zeropage.bin: vmlinux FORCE
24 $(call if_changed,objcopy)
25
Magnus Damm3c928322009-07-29 15:04:05 +000026LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
27
Magnus Damm6a5a0b92009-12-04 06:42:35 +000028$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/zeropage.bin arch/sh/boot/zImage FORCE
Magnus Damm3c928322009-07-29 15:04:05 +000029 $(call if_changed,ld)