Advertisement
Guest User

GT-S7580 - arch/arm/boot/Makefile

a guest
Jan 5th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.85 KB | None | 0 0
  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.  
  14. MKIMAGE := $(srctree)/scripts/mkuboot.sh
  15. MKDTB := $(srctree)/scripts/mkdtb.sh
  16.  
  17. ifneq ($(MACHINE),)
  18. include $(srctree)/$(MACHINE)/Makefile.boot
  19. endif
  20.  
  21. # Note: the following conditions must always be true:
  22. # ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET)
  23. # PARAMS_PHYS must be within 4MB of ZRELADDR
  24. # INITRD_PHYS must be in RAM
  25. ZRELADDR := $(zreladdr-y)
  26. PARAMS_PHYS := $(params_phys-y)
  27. INITRD_PHYS := $(initrd_phys-y)
  28.  
  29. export ZRELADDR INITRD_PHYS PARAMS_PHYS
  30.  
  31. targets := Image zImage xipImage bootpImage uImage dt-blob
  32.  
  33. $(obj)/dt-blob: FORCE
  34. ifeq ($(CONFIG_KONA_ATAG_DT),y)
  35. $(CONFIG_SHELL) $(MKDTB) $(srctree)/arch/arm/boot/dts/$(CONFIG_KONA_ATAG_DT_DTS_FILE).dts \
  36. $(objtree)/arch/arm/boot/dt-blob
  37. @echo ' dt-blob is ready.'
  38. else
  39. ifneq ($(wildcard $(objtree)/arch/arm/boot/dt-blob),)
  40. rm -f $(objtree)/arch/arm/boot/dt-blob
  41. endif
  42. @echo ' dt-blob is not needed.'
  43. endif
  44.  
  45. ifeq ($(CONFIG_XIP_KERNEL),y)
  46.  
  47. $(obj)/xipImage: vmlinux FORCE
  48. $(call if_changed,objcopy)
  49. @echo ' Kernel: $@ is ready (physical address: $(CONFIG_XIP_PHYS_ADDR))'
  50.  
  51. $(obj)/Image $(obj)/zImage: FORCE
  52. @echo 'Kernel configured for XIP (CONFIG_XIP_KERNEL=y)'
  53. @echo 'Only the xipImage target is available in this case'
  54. @false
  55.  
  56. else
  57.  
  58. $(obj)/xipImage: FORCE
  59. @echo 'Kernel not configured for XIP (CONFIG_XIP_KERNEL!=y)'
  60. @false
  61.  
  62. $(obj)/Image: vmlinux FORCE
  63. $(call if_changed,objcopy)
  64. @echo ' Kernel: $@ is ready'
  65.  
  66. $(obj)/compressed/vmlinux: $(obj)/Image FORCE
  67. $(Q)$(MAKE) $(build)=$(obj)/compressed $@
  68.  
  69. $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
  70. $(call if_changed,objcopy)
  71. @echo ' Kernel: $@ is ready'
  72.  
  73. endif
  74.  
  75. targets += $(dtb-y)
  76.  
  77. # Rule to build device tree blobs
  78. $(obj)/%.dtb: $(src)/dts/%.dts FORCE
  79. $(call if_changed_dep,dtc)
  80.  
  81. $(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y))
  82.  
  83. clean-files := *.dtb
  84.  
  85. ifneq ($(LOADADDR),)
  86. UIMAGE_LOADADDR=$(LOADADDR)
  87. else
  88. ifeq ($(CONFIG_ZBOOT_ROM),y)
  89. UIMAGE_LOADADDR=$(CONFIG_ZBOOT_ROM_TEXT)
  90. else
  91. UIMAGE_LOADADDR=$(ZRELADDR)
  92. endif
  93. endif
  94.  
  95. check_for_multiple_loadaddr = \
  96. if [ $(words $(UIMAGE_LOADADDR)) -gt 1 ]; then \
  97. echo 'multiple load addresses: $(UIMAGE_LOADADDR)'; \
  98. echo 'This is incompatible with uImages'; \
  99. echo 'Specify LOADADDR on the commandline to build an uImage'; \
  100. false; \
  101. fi
  102.  
  103. $(obj)/uImage: $(obj)/zImage FORCE
  104. @$(check_for_multiple_loadaddr)
  105. $(call if_changed,uimage)
  106. @echo ' Image $@ is ready'
  107.  
  108. $(obj)/bootp/bootp: $(obj)/zImage initrd FORCE
  109. $(Q)$(MAKE) $(build)=$(obj)/bootp $@
  110. @:
  111.  
  112. $(obj)/bootpImage: $(obj)/bootp/bootp FORCE
  113. $(call if_changed,objcopy)
  114. @echo ' Kernel: $@ is ready'
  115.  
  116. PHONY += initrd FORCE
  117. initrd:
  118. @test "$(INITRD_PHYS)" != "" || \
  119. (echo This machine does not support INITRD; exit -1)
  120. @test "$(INITRD)" != "" || \
  121. (echo You must specify INITRD; exit -1)
  122.  
  123. install: $(obj)/Image
  124. $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  125. $(obj)/Image System.map "$(INSTALL_PATH)"
  126.  
  127. zinstall: $(obj)/zImage
  128. $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  129. $(obj)/zImage System.map "$(INSTALL_PATH)"
  130.  
  131. uinstall: $(obj)/uImage
  132. $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  133. $(obj)/uImage System.map "$(INSTALL_PATH)"
  134.  
  135. zi:
  136. $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  137. $(obj)/zImage System.map "$(INSTALL_PATH)"
  138.  
  139. i:
  140. $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
  141. $(obj)/Image System.map "$(INSTALL_PATH)"
  142.  
  143. subdir- := bootp compressed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement