blob: 5648748c285f52c46a5fbe8df1d5c8e683cafc88 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Vineet Guptacfdbc2e2013-01-18 15:12:20 +05302
3# uImage build relies on mkimage being availble on your host for ARC target
4# You will need to build u-boot for ARC, rename mkimage to arc-elf32-mkimage
5# and make sure it's reacable from your PATH
Vineet Guptacfdbc2e2013-01-18 15:12:20 +05306
7OBJCOPYFLAGS= -O binary -R .note -R .note.gnu.build-id -R .comment -S
8
Masahiro Yamada3a71e422020-11-22 04:36:57 +09009LINUX_START_TEXT = $$($(READELF) -h vmlinux | \
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053010 grep "Entry point address" | grep -o 0x.*)
11
12UIMAGE_LOADADDR = $(CONFIG_LINUX_LINK_BASE)
13UIMAGE_ENTRYADDR = $(LINUX_START_TEXT)
Vineet Gupta104058e2013-03-22 22:04:27 +053014
Masahiro Yamadaa4e070c2020-11-22 04:36:56 +090015targets += vmlinux.bin
16targets += vmlinux.bin.gz
17targets += vmlinux.bin.lzma
Daniel Mentz27f3d2a2016-10-04 16:34:27 -070018targets += uImage.bin
19targets += uImage.gz
20targets += uImage.lzma
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053021
22$(obj)/vmlinux.bin: vmlinux FORCE
23 $(call if_changed,objcopy)
24
25$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
26 $(call if_changed,gzip)
27
Daniel Mentz27f3d2a2016-10-04 16:34:27 -070028$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
29 $(call if_changed,lzma)
30
Vineet Gupta104058e2013-03-22 22:04:27 +053031$(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
32 $(call if_changed,uimage,none)
Vineet Guptacfdbc2e2013-01-18 15:12:20 +053033
Vineet Gupta104058e2013-03-22 22:04:27 +053034$(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
35 $(call if_changed,uimage,gzip)
36
Daniel Mentz27f3d2a2016-10-04 16:34:27 -070037$(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE
38 $(call if_changed,uimage,lzma)