GNU Linux-libre 5.10.217-gnu1
[releases.git] / arch / arc / boot / Makefile
1 # SPDX-License-Identifier: GPL-2.0
2 targets := vmlinux.bin vmlinux.bin.gz
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
7
8 OBJCOPYFLAGS= -O binary -R .note -R .note.gnu.build-id -R .comment -S
9
10 LINUX_START_TEXT = $$(readelf -h vmlinux | \
11                         grep "Entry point address" | grep -o 0x.*)
12
13 UIMAGE_LOADADDR    = $(CONFIG_LINUX_LINK_BASE)
14 UIMAGE_ENTRYADDR   = $(LINUX_START_TEXT)
15
16 targets += uImage.bin
17 targets += uImage.gz
18 targets += uImage.lzma
19 extra-y += vmlinux.bin
20 extra-y += vmlinux.bin.gz
21 extra-y += vmlinux.bin.lzma
22
23 $(obj)/vmlinux.bin: vmlinux FORCE
24         $(call if_changed,objcopy)
25
26 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
27         $(call if_changed,gzip)
28
29 $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
30         $(call if_changed,lzma)
31
32 $(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
33         $(call if_changed,uimage,none)
34
35 $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
36         $(call if_changed,uimage,gzip)
37
38 $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE
39         $(call if_changed,uimage,lzma)