Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #
  2. # arch/arm64/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-2001 by Russell King
  12. LDFLAGS_vmlinux :=-p --no-undefined -X
  13. CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
  14. OBJCOPYFLAGS :=-O binary -R .note -R .note.gnu.build-id -R .comment -S
  15. GZFLAGS :=-9
  16. LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
  17. KBUILD_DEFCONFIG := defconfig
  18. KBUILD_CFLAGS += -mgeneral-regs-only
  19. ifeq ($(CONFIG_CPU_BIG_ENDIAN), y)
  20. KBUILD_CPPFLAGS += -mbig-endian
  21. AS += -EB
  22. LD += -EB
  23. else
  24. KBUILD_CPPFLAGS += -mlittle-endian
  25. AS += -EL
  26. LD += -EL
  27. endif
  28. comma = ,
  29. CHECKFLAGS += -D__aarch64__
  30. # Default value
  31. head-y := arch/arm64/kernel/head.o
  32. # The byte offset of the kernel image in RAM from the start of RAM.
  33. TEXT_OFFSET := 0x00080000
  34. export TEXT_OFFSET GZFLAGS
  35. core-y += arch/arm64/kernel/ arch/arm64/mm/
  36. core-$(CONFIG_KVM) += arch/arm64/kvm/
  37. core-$(CONFIG_XEN) += arch/arm64/xen/
  38. libs-y := arch/arm64/lib/ $(libs-y)
  39. libs-y += $(LIBGCC)
  40. # Default target when executing plain make
  41. KBUILD_IMAGE := Image.gz
  42. KBUILD_DTBS := dtbs
  43. all: $(KBUILD_IMAGE) $(KBUILD_DTBS)
  44. boot := arch/arm64/boot
  45. Image Image.gz: vmlinux
  46. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  47. zinstall install: vmlinux
  48. $(Q)$(MAKE) $(build)=$(boot) $@
  49. %.dtb: scripts
  50. $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
  51. dtbs: scripts
  52. $(Q)$(MAKE) $(build)=$(boot)/dts dtbs
  53. PHONY += vdso_install
  54. vdso_install:
  55. $(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso $@
  56. # We use MRPROPER_FILES and CLEAN_FILES now
  57. archclean:
  58. $(Q)$(MAKE) $(clean)=$(boot)
  59. define archhelp
  60. echo '* Image.gz - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
  61. echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
  62. echo '* dtbs - Build device tree blobs for enabled boards'
  63. echo ' install - Install uncompressed kernel'
  64. echo ' zinstall - Install compressed kernel'
  65. echo ' Install using (your) ~/bin/installkernel or'
  66. echo ' (distribution) /sbin/installkernel or'
  67. echo ' install to $$(INSTALL_PATH) and run lilo'
  68. endef