Makefile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. #
  2. # arch/arm/boot/Makefile
  3. #
  4. # This file is included by the global makefile so that you can add your own
  5. # architecture-specific flags and dependencies.
  6. #
  7. # This file is subject to the terms and conditions of the GNU General Public
  8. # License. See the file "COPYING" in the main directory of this archive
  9. # for more details.
  10. #
  11. # Copyright (C) 1995-2002 Russell King
  12. #
  13. MKIMAGE := $(srctree)/scripts/mkuboot.sh
  14. ifneq ($(MACHINE),)
  15. include $(srctree)/$(MACHINE)/Makefile.boot
  16. endif
  17. # Note: the following conditions must always be true:
  18. # ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET)
  19. # PARAMS_PHYS must be within 4MB of ZRELADDR
  20. # INITRD_PHYS must be in RAM
  21. ZRELADDR := $(zreladdr-y)
  22. PARAMS_PHYS := $(params_phys-y)
  23. INITRD_PHYS := $(initrd_phys-y)
  24. export ZRELADDR INITRD_PHYS PARAMS_PHYS
  25. targets := Image zImage xipImage bootpImage uImage
  26. ifeq ($(CONFIG_XIP_KERNEL),y)
  27. $(obj)/xipImage: vmlinux FORCE
  28. $(call if_changed,objcopy)
  29. @echo ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))'
  30. $(obj)/Image $(obj)/zImage: FORCE
  31. @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)'
  32. @echo 'Only the xipImage target is available in this case'
  33. @false
  34. else
  35. $(obj)/xipImage: FORCE
  36. @echo 'Kernel not configured for XIP (CONFIG_XIP_KERNEL!=y)'
  37. @false
  38. $(obj)/Image: vmlinux FORCE
  39. $(call if_changed,objcopy)
  40. @echo ' Kernel: $@ is ready'
  41. $(obj)/compressed/vmlinux: $(obj)/Image FORCE
  42. $(Q)$(MAKE) $(build)=$(obj)/compressed $@
  43. $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
  44. $(call if_changed,objcopy)
  45. @echo ' Kernel: $@ is ready'
  46. endif
  47. quiet_cmd_uimage = UIMAGE $@
  48. cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
  49. -C none -a $(LOADADDR) -e $(LOADADDR) \
  50. -n 'Linux-$(KERNELRELEASE)' -d $< $@
  51. ifeq ($(CONFIG_ZBOOT_ROM),y)
  52. $(obj)/uImage: LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT)
  53. else
  54. $(obj)/uImage: LOADADDR=$(ZRELADDR)
  55. endif
  56. $(obj)/uImage: $(obj)/zImage FORCE
  57. $(call if_changed,uimage)
  58. @echo ' Image $@ is ready'
  59. $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
  60. $(Q)$(MAKE) $(build)=$(obj)/bootp $@
  61. @:
  62. $(obj)/bootpImage: $(obj)/bootp/bootp FORCE
  63. $(call if_changed,objcopy)
  64. @echo ' Kernel: $@ is ready'
  65. PHONY += initrd FORCE
  66. initrd:
  67. @test "$(INITRD_PHYS)" != "" || \
  68. (echo This machine does not support INITRD; exit -1)
  69. @test "$(INITRD)" != "" || \
  70. (echo You must specify INITRD; exit -1)
  71. install: $(obj)/Image
  72. $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  73. $(obj)/Image System.map "$(INSTALL_PATH)"
  74. zinstall: $(obj)/zImage
  75. $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  76. $(obj)/zImage System.map "$(INSTALL_PATH)"
  77. zi:
  78. $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  79. $(obj)/zImage System.map "$(INSTALL_PATH)"
  80. i:
  81. $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  82. $(obj)/Image System.map "$(INSTALL_PATH)"
  83. subdir- := bootp compressed