Makefile revision e54bcde3d69d40023ae77727213d14f920eb264a
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. 41da57a369d3bc5cd61db90f7e9555840381db9b09Mark Rutlandifeq ($(CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET), y) 424190312beb2acfb7bfb1bb971e24a759aa96b0e8Ard BiesheuvelTEXT_OFFSET := $(shell awk 'BEGIN {srand(); printf "0x%03x000\n", int(512 * rand())}') 43da57a369d3bc5cd61db90f7e9555840381db9b09Mark Rutlandelse 448c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin MarinasTEXT_OFFSET := 0x00080000 45da57a369d3bc5cd61db90f7e9555840381db9b09Mark Rutlandendif 468c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas 478c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinasexport TEXT_OFFSET GZFLAGS 488c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas 498c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinascore-y += arch/arm64/kernel/ arch/arm64/mm/ 50e54bcde3d69d40023ae77727213d14f920eb264aZi Shen Limcore-$(CONFIG_NET) += arch/arm64/net/ 516211753fdfd05af9e08f54c8d0ba3ee516034878Marc Zyngiercore-$(CONFIG_KVM) += arch/arm64/kvm/ 5263917f0b5ba2a932d4fca7f67d1a1eae9034269eCatalin Marinascore-$(CONFIG_XEN) += arch/arm64/xen/ 532c98833a42cd194ba0f537cd21917e15e5593715Ard Biesheuvelcore-$(CONFIG_CRYPTO) += arch/arm64/crypto/ 548c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinaslibs-y := arch/arm64/lib/ $(libs-y) 558c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinaslibs-y += $(LIBGCC) 56f4f75ad5741fe0331bbe1f5c42b906cda299f26bArd Biesheuvellibs-$(CONFIG_EFI_STUB) += drivers/firmware/efi/libstub/ 578c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas 588c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas# Default target when executing plain make 5970f915a299bc72424fc2d3498284f6d48b880afaRob HerringKBUILD_IMAGE := Image.gz 6070f915a299bc72424fc2d3498284f6d48b880afaRob HerringKBUILD_DTBS := dtbs 618c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas 6270f915a299bc72424fc2d3498284f6d48b880afaRob Herringall: $(KBUILD_IMAGE) $(KBUILD_DTBS) 638c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas 648c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinasboot := arch/arm64/boot 658c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas 668c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin MarinasImage Image.gz: vmlinux 6770f915a299bc72424fc2d3498284f6d48b880afaRob Herring $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ 688c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas 698c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinaszinstall install: vmlinux 7070f915a299bc72424fc2d3498284f6d48b880afaRob Herring $(Q)$(MAKE) $(build)=$(boot) $@ 718c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas 7270f915a299bc72424fc2d3498284f6d48b880afaRob Herring%.dtb: scripts 7370f915a299bc72424fc2d3498284f6d48b880afaRob Herring $(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@ 7470f915a299bc72424fc2d3498284f6d48b880afaRob Herring 7570f915a299bc72424fc2d3498284f6d48b880afaRob Herringdtbs: scripts 7658fea354d887fddddd342a8d14b02069161ca904Catalin Marinas $(Q)$(MAKE) $(build)=$(boot)/dts dtbs 778c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas 783c01742a8ac93a3abf9b099758db970410427afdKyle McMartinPHONY += vdso_install 793c01742a8ac93a3abf9b099758db970410427afdKyle McMartinvdso_install: 803c01742a8ac93a3abf9b099758db970410427afdKyle McMartin $(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso $@ 813c01742a8ac93a3abf9b099758db970410427afdKyle McMartin 828c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas# We use MRPROPER_FILES and CLEAN_FILES now 838c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinasarchclean: 848c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas $(Q)$(MAKE) $(clean)=$(boot) 858c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas 868c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinasdefine archhelp 878c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas echo '* Image.gz - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)' 888c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' 8970f915a299bc72424fc2d3498284f6d48b880afaRob Herring echo '* dtbs - Build device tree blobs for enabled boards' 908c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas echo ' install - Install uncompressed kernel' 918c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas echo ' zinstall - Install compressed kernel' 928c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas echo ' Install using (your) ~/bin/installkernel or' 938c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas echo ' (distribution) /sbin/installkernel or' 948c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinas echo ' install to $$(INSTALL_PATH) and run lilo' 958c2c3df31e3b87cb5348e48776c366ebd1dc5a7aCatalin Marinasendef 96