Linux 4.11-rc5
[linux/fpc-iii.git] / arch / arc / boot / Makefile
blobf94cf151e06ab2e142bbf2b867ae8a2de0e255af
1 targets := vmlinux.bin vmlinux.bin.gz uImage
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
7 OBJCOPYFLAGS= -O binary -R .note -R .note.gnu.build-id -R .comment -S
9 LINUX_START_TEXT = $$(readelf -h vmlinux | \
10 grep "Entry point address" | grep -o 0x.*)
12 UIMAGE_LOADADDR = $(CONFIG_LINUX_LINK_BASE)
13 UIMAGE_ENTRYADDR = $(LINUX_START_TEXT)
15 suffix-y := bin
16 suffix-$(CONFIG_KERNEL_GZIP) := gz
17 suffix-$(CONFIG_KERNEL_LZMA) := lzma
19 targets += uImage
20 targets += uImage.bin
21 targets += uImage.gz
22 targets += uImage.lzma
23 extra-y += vmlinux.bin
24 extra-y += vmlinux.bin.gz
25 extra-y += vmlinux.bin.lzma
27 $(obj)/vmlinux.bin: vmlinux FORCE
28 $(call if_changed,objcopy)
30 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
31 $(call if_changed,gzip)
33 $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
34 $(call if_changed,lzma)
36 $(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
37 $(call if_changed,uimage,none)
39 $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
40 $(call if_changed,uimage,gzip)
42 $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE
43 $(call if_changed,uimage,lzma)
45 $(obj)/uImage: $(obj)/uImage.$(suffix-y)
46 @ln -sf $(notdir $<) $@
47 @echo ' Image $@ is ready'