Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #
  2. # arch/arm/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. # Copyright (C) 1995-2002 Russell King
  9. #
  10. MKIMAGE := $(srctree)/scripts/mkuboot.sh
  11. ifneq ($(MACHINE),)
  12. include $(srctree)/$(MACHINE)/Makefile.boot
  13. endif
  14. # Note: the following conditions must always be true:
  15. # ZRELADDR == virt_to_phys(TEXTADDR)
  16. # PARAMS_PHYS must be within 4MB of ZRELADDR
  17. # INITRD_PHYS must be in RAM
  18. ZRELADDR := $(zreladdr-y)
  19. PARAMS_PHYS := $(params_phys-y)
  20. INITRD_PHYS := $(initrd_phys-y)
  21. export ZRELADDR INITRD_PHYS PARAMS_PHYS
  22. targets := Image zImage xipImage bootpImage uImage
  23. ifeq ($(CONFIG_XIP_KERNEL),y)
  24. $(obj)/xipImage: vmlinux FORCE
  25. $(call if_changed,objcopy)
  26. @echo ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))'
  27. $(obj)/Image $(obj)/zImage: FORCE
  28. @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)'
  29. @echo 'Only the xipImage target is available in this case'
  30. @false
  31. else
  32. $(obj)/xipImage: FORCE
  33. @echo 'Kernel not configured for XIP (CONFIG_XIP_KERNEL!=y)'
  34. @false
  35. $(obj)/Image: vmlinux FORCE
  36. $(call if_changed,objcopy)
  37. @echo ' Kernel: $@ is ready'
  38. $(obj)/compressed/vmlinux: $(obj)/Image FORCE
  39. $(Q)$(MAKE) $(build)=$(obj)/compressed $@
  40. $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
  41. $(call if_changed,objcopy)
  42. @echo ' Kernel: $@ is ready'
  43. endif
  44. quiet_cmd_uimage = UIMAGE $@
  45. cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
  46. -C none -a $(ZRELADDR) -e $(ZRELADDR) \
  47. -n 'Linux-$(KERNELRELEASE)' -d $< $@
  48. $(obj)/uImage: $(obj)/zImage FORCE
  49. $(call if_changed,uimage)
  50. @echo ' Image $@ is ready'
  51. $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
  52. $(Q)$(MAKE) $(build)=$(obj)/bootp $@
  53. @:
  54. $(obj)/bootpImage: $(obj)/bootp/bootp FORCE
  55. $(call if_changed,objcopy)
  56. @echo ' Kernel: $@ is ready'
  57. .PHONY: initrd FORCE
  58. initrd:
  59. @test "$(INITRD_PHYS)" != "" || \
  60. (echo This machine does not support INITRD; exit -1)
  61. @test "$(INITRD)" != "" || \
  62. (echo You must specify INITRD; exit -1)
  63. install: $(obj)/Image
  64. $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  65. $(obj)/Image System.map "$(INSTALL_PATH)"
  66. zinstall: $(obj)/zImage
  67. $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  68. $(obj)/zImage System.map "$(INSTALL_PATH)"
  69. subdir- := bootp compressed