• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# SPDX-License-Identifier: GPL-2.0
2targets := 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
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)
15
16targets += uImage.bin
17targets += uImage.gz
18targets += uImage.lzma
19extra-y += vmlinux.bin
20extra-y += vmlinux.bin.gz
21extra-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)
40