1 # SPDX-License-Identifier: GPL-2.0
2 targets := vmlinux.bin vmlinux.bin.gz
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)
18 targets += uImage.lzma
19 extra-y += vmlinux.bin
20 extra-y += vmlinux.bin.gz
21 extra-y += vmlinux.bin.lzma
23 $(obj)/vmlinux.bin: vmlinux FORCE
24 $(call if_changed,objcopy)
26 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
27 $(call if_changed,gzip)
29 $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
30 $(call if_changed,lzma)
32 $(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
33 $(call if_changed,uimage,none)
35 $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
36 $(call if_changed,uimage,gzip)
38 $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE
39 $(call if_changed,uimage,lzma)