blob: f94cf151e06ab2e142bbf2b867ae8a2de0e255af [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
Daniel Mentz27f3d2a2016-10-04 16:34:27 -070017suffix-$(CONFIG_KERNEL_LZMA) := lzma
Vineet Gupta104058e2013-03-22 22:04:27 +053018
Daniel Mentz27f3d2a2016-10-04 16:34:27 -070019targets += uImage
20targets += uImage.bin
21targets += uImage.gz
22targets += uImage.lzma
23extra-y += vmlinux.bin
24extra-y += vmlinux.bin.gz
25extra-y += vmlinux.bin.lzma
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053026
27$(obj)/vmlinux.bin: vmlinux FORCE
28 $(call if_changed,objcopy)
29
30$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
31 $(call if_changed,gzip)
32
Daniel Mentz27f3d2a2016-10-04 16:34:27 -070033$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
34 $(call if_changed,lzma)
35
Vineet Gupta104058e2013-03-22 22:04:27 +053036$(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
37 $(call if_changed,uimage,none)
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053038
Vineet Gupta104058e2013-03-22 22:04:27 +053039$(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
40 $(call if_changed,uimage,gzip)
41
Daniel Mentz27f3d2a2016-10-04 16:34:27 -070042$(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE
43 $(call if_changed,uimage,lzma)
44
Vineet Gupta104058e2013-03-22 22:04:27 +053045$(obj)/uImage: $(obj)/uImage.$(suffix-y)
46 @ln -sf $(notdir $<) $@
47 @echo ' Image $@ is ready'