Makefile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #
  2. # arch/blackfin/boot/Makefile
  3. #
  4. # This file is subject to the terms and conditions of the GNU General Public
  5. # License. See the file "COPYING" in the main directory of this archive
  6. # for more details.
  7. #
  8. targets := uImage uImage.bin uImage.bz2 uImage.gz uImage.lzma uImage.lzo uImage.xip
  9. extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.xip
  10. ifeq ($(CONFIG_RAMKERNEL),y)
  11. UIMAGE_LOADADDR = $(CONFIG_BOOT_LOAD)
  12. else # CONFIG_ROMKERNEL must be set
  13. UIMAGE_LOADADDR = $(CONFIG_ROM_BASE)
  14. endif
  15. UIMAGE_ENTRYADDR = $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}')
  16. UIMAGE_NAME = '$(CPU_REV)-$(KERNELRELEASE)'
  17. UIMAGE_OPTS-$(CONFIG_ROMKERNEL) += -x
  18. $(obj)/vmlinux.bin: vmlinux FORCE
  19. $(call if_changed,objcopy)
  20. $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
  21. $(call if_changed,gzip)
  22. $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
  23. $(call if_changed,bzip2)
  24. $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
  25. $(call if_changed,lzma)
  26. $(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE
  27. $(call if_changed,lzo)
  28. # The mkimage tool wants 64bytes prepended to the image
  29. quiet_cmd_mk_bin_xip = BIN $@
  30. cmd_mk_bin_xip = ( printf '%64s' | tr ' ' '\377' ; cat $< ) > $@
  31. $(obj)/vmlinux.bin.xip: $(obj)/vmlinux.bin FORCE
  32. $(call if_changed,mk_bin_xip)
  33. $(obj)/uImage.bin: $(obj)/vmlinux.bin
  34. $(call if_changed,uimage,none)
  35. $(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2
  36. $(call if_changed,uimage,bzip2)
  37. $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz
  38. $(call if_changed,uimage,gzip)
  39. $(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma
  40. $(call if_changed,uimage,lzma)
  41. $(obj)/uImage.lzo: $(obj)/vmlinux.bin.lzo
  42. $(call if_changed,uimage,lzo)
  43. $(obj)/uImage.xip: $(obj)/vmlinux.bin.xip
  44. $(call if_changed,uimage,none)
  45. suffix-y := bin
  46. suffix-$(CONFIG_KERNEL_GZIP) := gz
  47. suffix-$(CONFIG_KERNEL_BZIP2) := bz2
  48. suffix-$(CONFIG_KERNEL_LZMA) := lzma
  49. suffix-$(CONFIG_KERNEL_LZO) := lzo
  50. suffix-$(CONFIG_ROMKERNEL) := xip
  51. $(obj)/uImage: $(obj)/uImage.$(suffix-y)
  52. @ln -sf $(notdir $<) $@
  53. install:
  54. sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"