Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #
  2. # This file is subject to the terms and conditions of the GNU General Public
  3. # License. See the file "COPYING" in the main directory of this archive
  4. # for more details.
  5. #
  6. # Copyright (C) 2007,2012 Imagination Technologies Ltd.
  7. #
  8. suffix-y := bin
  9. suffix-$(CONFIG_KERNEL_GZIP) := gz
  10. suffix-$(CONFIG_KERNEL_BZIP2) := bz2
  11. suffix-$(CONFIG_KERNEL_XZ) := xz
  12. suffix-$(CONFIG_KERNEL_LZO) := lzo
  13. targets += vmlinux.bin
  14. targets += uImage
  15. targets += uImage.gz
  16. targets += uImage.bz2
  17. targets += uImage.xz
  18. targets += uImage.lzo
  19. targets += uImage.bin
  20. extra-y += vmlinux.bin
  21. extra-y += vmlinux.bin.gz
  22. extra-y += vmlinux.bin.bz2
  23. extra-y += vmlinux.bin.xz
  24. extra-y += vmlinux.bin.lzo
  25. UIMAGE_LOADADDR = $(CONFIG_PAGE_OFFSET)
  26. ifeq ($(CONFIG_FUNCTION_TRACER),y)
  27. orig_cflags := $(KBUILD_CFLAGS)
  28. KBUILD_CFLAGS = $(subst -pg, , $(orig_cflags))
  29. endif
  30. $(obj)/vmlinux.bin: vmlinux FORCE
  31. $(call if_changed,objcopy)
  32. $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
  33. $(call if_changed,gzip)
  34. $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
  35. $(call if_changed,bzip2)
  36. $(obj)/vmlinux.bin.xz: $(obj)/vmlinux.bin FORCE
  37. $(call if_changed,xzkern)
  38. $(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE
  39. $(call if_changed,lzo)
  40. $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
  41. $(call if_changed,uimage,gzip)
  42. $(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2 FORCE
  43. $(call if_changed,uimage,bzip2)
  44. $(obj)/uImage.xz: $(obj)/vmlinux.bin.xz FORCE
  45. $(call if_changed,uimage,xz)
  46. $(obj)/uImage.lzo: $(obj)/vmlinux.bin.lzo FORCE
  47. $(call if_changed,uimage,lzo)
  48. $(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
  49. $(call if_changed,uimage,none)
  50. $(obj)/uImage: $(obj)/uImage.$(suffix-y)
  51. @ln -sf $(notdir $<) $@
  52. @echo ' Image $@ is ready'