Makefile 787 B

1234567891011121314151617181920212223242526
  1. targets := vmlinux.bin vmlinux.bin.gz uImage
  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. MKIMAGE := $(srctree)/scripts/mkuboot.sh
  6. OBJCOPYFLAGS= -O binary -R .note -R .note.gnu.build-id -R .comment -S
  7. LINUX_START_TEXT = $$(readelf -h vmlinux | \
  8. grep "Entry point address" | grep -o 0x.*)
  9. UIMAGE_LOADADDR = $(CONFIG_LINUX_LINK_BASE)
  10. UIMAGE_ENTRYADDR = $(LINUX_START_TEXT)
  11. UIMAGE_COMPRESSION = gzip
  12. $(obj)/vmlinux.bin: vmlinux FORCE
  13. $(call if_changed,objcopy)
  14. $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
  15. $(call if_changed,gzip)
  16. $(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
  17. $(call if_changed,uimage)
  18. PHONY += FORCE