License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-block.git] / arch / arc / boot / Makefile
CommitLineData
b2441318 1# SPDX-License-Identifier: GPL-2.0
cfdbc2e1
VG
2targets := vmlinux.bin vmlinux.bin.gz uImage
3
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
cfdbc2e1
VG
7
8OBJCOPYFLAGS= -O binary -R .note -R .note.gnu.build-id -R .comment -S
9
10LINUX_START_TEXT = $$(readelf -h vmlinux | \
11 grep "Entry point address" | grep -o 0x.*)
12
13UIMAGE_LOADADDR = $(CONFIG_LINUX_LINK_BASE)
14UIMAGE_ENTRYADDR = $(LINUX_START_TEXT)
104058ed
VG
15
16suffix-y := bin
17suffix-$(CONFIG_KERNEL_GZIP) := gz
27f3d2a3 18suffix-$(CONFIG_KERNEL_LZMA) := lzma
104058ed 19
27f3d2a3
DM
20targets += uImage
21targets += uImage.bin
22targets += uImage.gz
23targets += uImage.lzma
24extra-y += vmlinux.bin
25extra-y += vmlinux.bin.gz
26extra-y += vmlinux.bin.lzma
cfdbc2e1
VG
27
28$(obj)/vmlinux.bin: vmlinux FORCE
29 $(call if_changed,objcopy)
30
31$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
32 $(call if_changed,gzip)
33
27f3d2a3
DM
34$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
35 $(call if_changed,lzma)
36
104058ed
VG
37$(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
38 $(call if_changed,uimage,none)
39
40$(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
41 $(call if_changed,uimage,gzip)
cfdbc2e1 42
27f3d2a3
DM
43$(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE
44 $(call if_changed,uimage,lzma)
45
104058ed
VG
46$(obj)/uImage: $(obj)/uImage.$(suffix-y)
47 @ln -sf $(notdir $<) $@
48 @echo ' Image $@ is ready'