Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 
0003 # uImage build relies on mkimage being availble on your host for ARC target
0004 # You will need to build u-boot for ARC, rename mkimage to arc-elf32-mkimage
0005 # and make sure it's reacable from your PATH
0006 
0007 OBJCOPYFLAGS= -O binary -R .note -R .note.gnu.build-id -R .comment -S
0008 
0009 LINUX_START_TEXT = $$($(READELF) -h vmlinux | \
0010                         grep "Entry point address" | grep -o 0x.*)
0011 
0012 UIMAGE_LOADADDR    = $(CONFIG_LINUX_LINK_BASE)
0013 UIMAGE_ENTRYADDR   = $(LINUX_START_TEXT)
0014 
0015 targets += vmlinux.bin
0016 targets += vmlinux.bin.gz
0017 targets += vmlinux.bin.lzma
0018 targets += uImage.bin
0019 targets += uImage.gz
0020 targets += uImage.lzma
0021 
0022 $(obj)/vmlinux.bin: vmlinux FORCE
0023         $(call if_changed,objcopy)
0024 
0025 $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
0026         $(call if_changed,gzip)
0027 
0028 $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
0029         $(call if_changed,lzma)
0030 
0031 $(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
0032         $(call if_changed,uimage,none)
0033 
0034 $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
0035         $(call if_changed,uimage,gzip)
0036 
0037 $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE
0038         $(call if_changed,uimage,lzma)