Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # SPDX-License-Identifier: GPL-2.0
  2. # uImage build relies on mkimage being availble on your host for ARC target
  3. # You will need to build u-boot for ARC, rename mkimage to arc-elf32-mkimage
  4. # and make sure it's reacable from your PATH
  5. OBJCOPYFLAGS= -O binary -R .note -R .note.gnu.build-id -R .comment -S
  6. LINUX_START_TEXT = $$($(READELF) -h vmlinux | \
  7. grep "Entry point address" | grep -o 0x.*)
  8. UIMAGE_LOADADDR = $(CONFIG_LINUX_LINK_BASE)
  9. UIMAGE_ENTRYADDR = $(LINUX_START_TEXT)
  10. targets += vmlinux.bin
  11. targets += vmlinux.bin.gz
  12. targets += vmlinux.bin.lzma
  13. targets += uImage.bin
  14. targets += uImage.gz
  15. targets += uImage.lzma
  16. $(obj)/vmlinux.bin: vmlinux FORCE
  17. $(call if_changed,objcopy)
  18. $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
  19. $(call if_changed,gzip)
  20. $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
  21. $(call if_changed,lzma)
  22. $(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
  23. $(call if_changed,uimage,none)
  24. $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
  25. $(call if_changed,uimage,gzip)
  26. $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE
  27. $(call if_changed,uimage,lzma)