Makefile 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. MKIMAGE := $(srctree)/scripts/mkuboot.sh
  9. targets := vmImage vmImage.bin vmImage.bz2 vmImage.gz vmImage.lzma vmImage.lzo vmImage.xip
  10. extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.xip
  11. UIMAGE_OPTS-y :=
  12. UIMAGE_OPTS-$(CONFIG_RAMKERNEL) += -a $(CONFIG_BOOT_LOAD)
  13. UIMAGE_OPTS-$(CONFIG_ROMKERNEL) += -a $(CONFIG_ROM_BASE) -x
  14. quiet_cmd_uimage = UIMAGE $@
  15. cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(ARCH) -O linux -T kernel \
  16. -C $(2) -n '$(CPU_REV)-$(KERNELRELEASE)' \
  17. -e $(shell $(NM) vmlinux | awk '$$NF == "__start" {print $$1}') \
  18. $(UIMAGE_OPTS-y) -d $< $@
  19. $(obj)/vmlinux.bin: vmlinux FORCE
  20. $(call if_changed,objcopy)
  21. $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
  22. $(call if_changed,gzip)
  23. $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
  24. $(call if_changed,bzip2)
  25. $(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
  26. $(call if_changed,lzma)
  27. $(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE
  28. $(call if_changed,lzo)
  29. # The mkimage tool wants 64bytes prepended to the image
  30. quiet_cmd_mk_bin_xip = BIN $@
  31. cmd_mk_bin_xip = ( printf '%64s' | tr ' ' '\377' ; cat $< ) > $@
  32. $(obj)/vmlinux.bin.xip: $(obj)/vmlinux.bin FORCE
  33. $(call if_changed,mk_bin_xip)
  34. $(obj)/vmImage.bin: $(obj)/vmlinux.bin
  35. $(call if_changed,uimage,none)
  36. $(obj)/vmImage.bz2: $(obj)/vmlinux.bin.bz2
  37. $(call if_changed,uimage,bzip2)
  38. $(obj)/vmImage.gz: $(obj)/vmlinux.bin.gz
  39. $(call if_changed,uimage,gzip)
  40. $(obj)/vmImage.lzma: $(obj)/vmlinux.bin.lzma
  41. $(call if_changed,uimage,lzma)
  42. $(obj)/vmImage.lzo: $(obj)/vmlinux.bin.lzo
  43. $(call if_changed,uimage,lzo)
  44. $(obj)/vmImage.xip: $(obj)/vmlinux.bin.xip
  45. $(call if_changed,uimage,none)
  46. suffix-y := bin
  47. suffix-$(CONFIG_KERNEL_GZIP) := gz
  48. suffix-$(CONFIG_KERNEL_BZIP2) := bz2
  49. suffix-$(CONFIG_KERNEL_LZMA) := lzma
  50. suffix-$(CONFIG_KERNEL_LZO) := lzo
  51. suffix-$(CONFIG_ROMKERNEL) := xip
  52. $(obj)/vmImage: $(obj)/vmImage.$(suffix-y)
  53. @ln -sf $(notdir $<) $@
  54. install:
  55. sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"