Makefile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 $(ZRELADDR) -e $(ZRELADDR) \
  50. -n 'Linux-$(KERNELRELEASE)' -d $< $@
  51. $(obj)/uImage: $(obj)/zImage FORCE
  52. $(call if_changed,uimage)
  53. @echo ' Image $@ is ready'
  54. $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
  55. $(Q)$(MAKE) $(build)=$(obj)/bootp $@
  56. @:
  57. $(obj)/bootpImage: $(obj)/bootp/bootp FORCE
  58. $(call if_changed,objcopy)
  59. @echo ' Kernel: $@ is ready'
  60. PHONY += initrd FORCE
  61. initrd:
  62. @test "$(INITRD_PHYS)" != "" || \
  63. (echo This machine does not support INITRD; exit -1)
  64. @test "$(INITRD)" != "" || \
  65. (echo You must specify INITRD; exit -1)
  66. install: $(obj)/Image
  67. $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  68. $(obj)/Image System.map "$(INSTALL_PATH)"
  69. zinstall: $(obj)/zImage
  70. $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  71. $(obj)/zImage System.map "$(INSTALL_PATH)"
  72. subdir- := bootp compressed