Linux 5.8-rc4
[linux/fpc-iii.git] / arch / arc / boot / Makefile
blob538b92f4dd2530459c190c80517412200a46bd6e
1 # SPDX-License-Identifier: GPL-2.0
2 targets := vmlinux.bin vmlinux.bin.gz uImage
4 # uImage build relies on mkimage being availble on your host for ARC target
5 # You will need to build u-boot for ARC, rename mkimage to arc-elf32-mkimage
6 # and make sure it's reacable from your PATH
8 OBJCOPYFLAGS= -O binary -R .note -R .note.gnu.build-id -R .comment -S
10 LINUX_START_TEXT = $$(readelf -h vmlinux | \
11 grep "Entry point address" | grep -o 0x.*)
13 UIMAGE_LOADADDR = $(CONFIG_LINUX_LINK_BASE)
14 UIMAGE_ENTRYADDR = $(LINUX_START_TEXT)
16 suffix-y := bin
17 suffix-$(CONFIG_KERNEL_GZIP) := gz
18 suffix-$(CONFIG_KERNEL_LZMA) := lzma
20 targets += uImage
21 targets += uImage.bin
22 targets += uImage.gz
23 targets += uImage.lzma
24 extra-y += vmlinux.bin
25 extra-y += vmlinux.bin.gz
26 extra-y += vmlinux.bin.lzma
28 $(obj)/vmlinux.bin: vmlinux FORCE
29 $(call if_changed,objcopy)
31 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
32 $(call if_changed,gzip)
34 $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
35 $(call if_changed,lzma)
37 $(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
38 $(call if_changed,uimage,none)
40 $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
41 $(call if_changed,uimage,gzip)
43 $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE
44 $(call if_changed,uimage,lzma)
46 $(obj)/uImage: $(obj)/uImage.$(suffix-y)
47 @ln -sf $(notdir $<) $@
48 @echo ' Image $@ is ready'