blob: e597cb34c16a832e4d219fd95a688126427b34b3 [file] [log] [blame]
Vineet Guptacfdbc2e2013-01-18 15:12:20 +05301targets := vmlinux.bin vmlinux.bin.gz uImage
2
3# uImage build relies on mkimage being availble on your host for ARC target
4# You will need to build u-boot for ARC, rename mkimage to arc-elf32-mkimage
5# and make sure it's reacable from your PATH
Vineet Guptacfdbc2e2013-01-18 15:12:20 +05306
7OBJCOPYFLAGS= -O binary -R .note -R .note.gnu.build-id -R .comment -S
8
9LINUX_START_TEXT = $$(readelf -h vmlinux | \
10 grep "Entry point address" | grep -o 0x.*)
11
12UIMAGE_LOADADDR = $(CONFIG_LINUX_LINK_BASE)
13UIMAGE_ENTRYADDR = $(LINUX_START_TEXT)
Vineet Gupta104058e2013-03-22 22:04:27 +053014
15suffix-y := bin
16suffix-$(CONFIG_KERNEL_GZIP) := gz
17
18targets += uImage uImage.bin uImage.gz
19extra-y += vmlinux.bin vmlinux.bin.gz
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053020
21$(obj)/vmlinux.bin: vmlinux FORCE
22 $(call if_changed,objcopy)
23
24$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
25 $(call if_changed,gzip)
26
Vineet Gupta104058e2013-03-22 22:04:27 +053027$(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
28 $(call if_changed,uimage,none)
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053029
Vineet Gupta104058e2013-03-22 22:04:27 +053030$(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
31 $(call if_changed,uimage,gzip)
32
33$(obj)/uImage: $(obj)/uImage.$(suffix-y)
34 @ln -sf $(notdir $<) $@
35 @echo ' Image $@ is ready'