Makefile 1015 B

1234567891011121314151617181920212223242526272829303132333435
  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. 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. suffix-y := bin
  11. suffix-$(CONFIG_KERNEL_GZIP) := gz
  12. targets += uImage uImage.bin uImage.gz
  13. extra-y += vmlinux.bin vmlinux.bin.gz
  14. $(obj)/vmlinux.bin: vmlinux FORCE
  15. $(call if_changed,objcopy)
  16. $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
  17. $(call if_changed,gzip)
  18. $(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
  19. $(call if_changed,uimage,none)
  20. $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
  21. $(call if_changed,uimage,gzip)
  22. $(obj)/uImage: $(obj)/uImage.$(suffix-y)
  23. @ln -sf $(notdir $<) $@
  24. @echo ' Image $@ is ready'