Makefile revision f4f75ad5741fe0331bbe1f5c42b906cda299f26b
18c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas#
28c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas# arch/arm64/Makefile
38c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas#
48c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas# This file is included by the global makefile so that you can add your own
58c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas# architecture-specific flags and dependencies.
68c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas#
78c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas# This file is subject to the terms and conditions of the GNU General Public
88c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas# License.  See the file "COPYING" in the main directory of this archive
98c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas# for more details.
108c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas#
118c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas# Copyright (C) 1995-2001 by Russell King
128c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
138c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin MarinasLDFLAGS_vmlinux	:=-p --no-undefined -X
148c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin MarinasCPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
158c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin MarinasOBJCOPYFLAGS	:=-O binary -R .note -R .note.gnu.build-id -R .comment -S
168c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin MarinasGZFLAGS		:=-9
178c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
188c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin MarinasLIBGCC 		:= $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
198c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
208c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin MarinasKBUILD_DEFCONFIG := defconfig
218c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
228c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin MarinasKBUILD_CFLAGS	+= -mgeneral-regs-only
23a0974e6e217aead196033d72f898e2acb575304dWill Deaconifeq ($(CONFIG_CPU_BIG_ENDIAN), y)
24a0974e6e217aead196033d72f898e2acb575304dWill DeaconKBUILD_CPPFLAGS	+= -mbig-endian
25a0974e6e217aead196033d72f898e2acb575304dWill DeaconAS		+= -EB
26a0974e6e217aead196033d72f898e2acb575304dWill DeaconLD		+= -EB
27a0974e6e217aead196033d72f898e2acb575304dWill Deaconelse
288c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin MarinasKBUILD_CPPFLAGS	+= -mlittle-endian
298c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin MarinasAS		+= -EL
308c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin MarinasLD		+= -EL
31a0974e6e217aead196033d72f898e2acb575304dWill Deaconendif
328c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
338c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinascomma = ,
348c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
358c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin MarinasCHECKFLAGS	+= -D__aarch64__
368c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
378c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas# Default value
388c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinashead-y		:= arch/arm64/kernel/head.o
398c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
408c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas# The byte offset of the kernel image in RAM from the start of RAM.
418c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin MarinasTEXT_OFFSET := 0x00080000
428c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
438c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinasexport	TEXT_OFFSET GZFLAGS
448c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
458c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinascore-y		+= arch/arm64/kernel/ arch/arm64/mm/
466211753fdfd05af9e08f54c8d0ba3ee516034878Marc Zyngiercore-$(CONFIG_KVM) += arch/arm64/kvm/
4763917f0b5ba2a932d4fca7f67d1a1eae9034269eCatalin Marinascore-$(CONFIG_XEN) += arch/arm64/xen/
482c98833a42cd194ba0f537cd21917e15e5593715Ard Biesheuvelcore-$(CONFIG_CRYPTO) += arch/arm64/crypto/
498c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinaslibs-y		:= arch/arm64/lib/ $(libs-y)
508c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinaslibs-y		+= $(LIBGCC)
51f4f75ad5741fe0331bbe1f5c42b906cda299f26bArd Biesheuvellibs-$(CONFIG_EFI_STUB) += drivers/firmware/efi/libstub/
528c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
538c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas# Default target when executing plain make
5470f915a299bc72424fc2d3498284f6d48b880afaRob HerringKBUILD_IMAGE	:= Image.gz
5570f915a299bc72424fc2d3498284f6d48b880afaRob HerringKBUILD_DTBS	:= dtbs
568c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
5770f915a299bc72424fc2d3498284f6d48b880afaRob Herringall:	$(KBUILD_IMAGE) $(KBUILD_DTBS)
588c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
598c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinasboot := arch/arm64/boot
608c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
618c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin MarinasImage Image.gz: vmlinux
6270f915a299bc72424fc2d3498284f6d48b880afaRob Herring	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
638c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
648c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinaszinstall install: vmlinux
6570f915a299bc72424fc2d3498284f6d48b880afaRob Herring	$(Q)$(MAKE) $(build)=$(boot) $@
668c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
6770f915a299bc72424fc2d3498284f6d48b880afaRob Herring%.dtb: scripts
6870f915a299bc72424fc2d3498284f6d48b880afaRob Herring	$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
6970f915a299bc72424fc2d3498284f6d48b880afaRob Herring
7070f915a299bc72424fc2d3498284f6d48b880afaRob Herringdtbs: scripts
7158fea354d887fddddd342a8d14b02069161ca904Catalin Marinas	$(Q)$(MAKE) $(build)=$(boot)/dts dtbs
728c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
733c01742a8ac93a3abf9b099758db970410427afdKyle McMartinPHONY += vdso_install
743c01742a8ac93a3abf9b099758db970410427afdKyle McMartinvdso_install:
753c01742a8ac93a3abf9b099758db970410427afdKyle McMartin	$(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso $@
763c01742a8ac93a3abf9b099758db970410427afdKyle McMartin
778c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas# We use MRPROPER_FILES and CLEAN_FILES now
788c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinasarchclean:
798c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas	$(Q)$(MAKE) $(clean)=$(boot)
808c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas
818c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinasdefine archhelp
828c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas  echo  '* Image.gz      - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
838c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas  echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
8470f915a299bc72424fc2d3498284f6d48b880afaRob Herring  echo  '* dtbs          - Build device tree blobs for enabled boards'
858c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas  echo  '  install       - Install uncompressed kernel'
868c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas  echo  '  zinstall      - Install compressed kernel'
878c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas  echo  '                  Install using (your) ~/bin/installkernel or'
888c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas  echo  '                  (distribution) /sbin/installkernel or'
898c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas  echo  '                  install to $$(INSTALL_PATH) and run lilo'
908c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinasendef
91