Makefile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. KBUILD_CPPFLAGS += -mlittle-endian
  20. AS += -EL
  21. LD += -EL
  22. comma = ,
  23. CHECKFLAGS += -D__aarch64__
  24. # Default value
  25. head-y := arch/arm64/kernel/head.o
  26. # The byte offset of the kernel image in RAM from the start of RAM.
  27. TEXT_OFFSET := 0x00080000
  28. export TEXT_OFFSET GZFLAGS
  29. core-y += arch/arm64/kernel/ arch/arm64/mm/
  30. libs-y := arch/arm64/lib/ $(libs-y)
  31. libs-y += $(LIBGCC)
  32. # Default target when executing plain make
  33. KBUILD_IMAGE := Image.gz
  34. KBUILD_DTBS := dtbs
  35. all: $(KBUILD_IMAGE) $(KBUILD_DTBS)
  36. boot := arch/arm64/boot
  37. Image Image.gz: vmlinux
  38. $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
  39. zinstall install: vmlinux
  40. $(Q)$(MAKE) $(build)=$(boot) $@
  41. %.dtb: scripts
  42. $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
  43. dtbs: scripts
  44. $(Q)$(MAKE) $(build)=$(boot)/dts dtbs
  45. # We use MRPROPER_FILES and CLEAN_FILES now
  46. archclean:
  47. $(Q)$(MAKE) $(clean)=$(boot)
  48. define archhelp
  49. echo '* Image.gz - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
  50. echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
  51. echo '* dtbs - Build device tree blobs for enabled boards'
  52. echo ' install - Install uncompressed kernel'
  53. echo ' zinstall - Install compressed kernel'
  54. echo ' Install using (your) ~/bin/installkernel or'
  55. echo ' (distribution) /sbin/installkernel or'
  56. echo ' install to $$(INSTALL_PATH) and run lilo'
  57. endef