11da177e4SLinus Torvalds# 21da177e4SLinus Torvalds# arch/arm/Makefile 31da177e4SLinus Torvalds# 44f193362SPaul Smith# This file is included by the global makefile so that you can add your own 54f193362SPaul Smith# architecture-specific flags and dependencies. 64f193362SPaul Smith# 71da177e4SLinus Torvalds# This file is subject to the terms and conditions of the GNU General Public 81da177e4SLinus Torvalds# License. See the file "COPYING" in the main directory of this archive 91da177e4SLinus Torvalds# for more details. 101da177e4SLinus Torvalds# 111da177e4SLinus Torvalds# Copyright (C) 1995-2001 by Russell King 121da177e4SLinus Torvalds 1302e541dbSArd BiesheuvelLDFLAGS_vmlinux :=-p --no-undefined -X --pic-veneer 1426584853SCatalin Marinasifeq ($(CONFIG_CPU_ENDIAN_BE8),y) 1526584853SCatalin MarinasLDFLAGS_vmlinux += --be8 16336303aeSCao jinKBUILD_LDFLAGS_MODULE += --be8 1726584853SCatalin Marinasendif 1851b563fcSSam Ravnborg 197d485f64SArd Biesheuvelifeq ($(CONFIG_ARM_MODULE_PLTS),y) 20336303aeSCao jinKBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/arm/kernel/module.lds 217d485f64SArd Biesheuvelendif 227d485f64SArd Biesheuvel 231da177e4SLinus TorvaldsGZFLAGS :=-9 24a0f97e06SSam Ravnborg#KBUILD_CFLAGS +=-pipe 251da177e4SLinus Torvalds 26bd365591SMichal Marek# Never generate .eh_frame 27bd365591SMichal MarekKBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) 28bd365591SMichal Marek 2932872c04SArnd Bergmann# This should work on most of the modern platforms 3032872c04SArnd BergmannKBUILD_DEFCONFIG := multi_v7_defconfig 311da177e4SLinus Torvalds 323dbda77eSUwe Kleine-Koenig# defines filename extension depending memory management type. 33f8c07de6SHyok S. Choiifeq ($(CONFIG_MMU),) 34f8c07de6SHyok S. ChoiMMUEXT := -nommu 35e91b36efSWill DeaconKBUILD_CFLAGS += $(call cc-option,-mno-unaligned-access) 36f8c07de6SHyok S. Choiendif 37f8c07de6SHyok S. Choi 381da177e4SLinus Torvaldsifeq ($(CONFIG_FRAME_POINTER),y) 39a0f97e06SSam RavnborgKBUILD_CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog 401da177e4SLinus Torvaldsendif 411da177e4SLinus Torvalds 421da177e4SLinus Torvaldsifeq ($(CONFIG_CPU_BIG_ENDIAN),y) 4306c5040cSSam RavnborgKBUILD_CPPFLAGS += -mbig-endian 44ff0c6eecSLuc Van OostenryckCHECKFLAGS += -D__ARMEB__ 451da177e4SLinus TorvaldsAS += -EB 46*d503ac53SMasahiro YamadaKBUILD_LDFLAGS += -EB 471da177e4SLinus Torvaldselse 4806c5040cSSam RavnborgKBUILD_CPPFLAGS += -mlittle-endian 49ff0c6eecSLuc Van OostenryckCHECKFLAGS += -D__ARMEL__ 501da177e4SLinus TorvaldsAS += -EL 51*d503ac53SMasahiro YamadaKBUILD_LDFLAGS += -EL 521da177e4SLinus Torvaldsendif 531da177e4SLinus Torvalds 54a077224fSArd Biesheuvel# 55a077224fSArd Biesheuvel# The Scalar Replacement of Aggregates (SRA) optimization pass in GCC 4.9 and 56a077224fSArd Biesheuvel# later may result in code being generated that handles signed short and signed 57a077224fSArd Biesheuvel# char struct members incorrectly. So disable it. 58a077224fSArd Biesheuvel# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932) 59a077224fSArd Biesheuvel# 60a077224fSArd BiesheuvelKBUILD_CFLAGS += $(call cc-option,-fno-ipa-sra) 61a077224fSArd Biesheuvel 621da177e4SLinus Torvalds# This selects which instruction set is used. 631da177e4SLinus Torvalds# Note that GCC does not numerically define an architecture version 641da177e4SLinus Torvalds# macro, but instead defines a whole series of macros which makes 651da177e4SLinus Torvalds# testing for a specific architecture or later rather impossible. 663c0c01abSRussell Kingarch-$(CONFIG_CPU_32v7M) =-D__LINUX_ARM_ARCH__=7 -march=armv7-m -Wa,-march=armv7-m 671b21376aSDouglas Andersonarch-$(CONFIG_CPU_32v7) =-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a) 681b21376aSDouglas Andersonarch-$(CONFIG_CPU_32v6) =-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6) 6923688e99SCatalin Marinas# Only override the compiler option if ARMv6. The ARMv6K extensions are 7023688e99SCatalin Marinas# always available in ARMv7 7123688e99SCatalin Marinasifeq ($(CONFIG_CPU_32v6),y) 721b21376aSDouglas Andersonarch-$(CONFIG_CPU_32v6K) =-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6k,-march=armv5t -Wa$(comma)-march=armv6k) 7323688e99SCatalin Marinasendif 741b21376aSDouglas Andersonarch-$(CONFIG_CPU_32v5) =-D__LINUX_ARM_ARCH__=5 $(call cc-option,-march=armv5te,-march=armv4t) 751b21376aSDouglas Andersonarch-$(CONFIG_CPU_32v4T) =-D__LINUX_ARM_ARCH__=4 -march=armv4t 761b21376aSDouglas Andersonarch-$(CONFIG_CPU_32v4) =-D__LINUX_ARM_ARCH__=4 -march=armv4 771b21376aSDouglas Andersonarch-$(CONFIG_CPU_32v3) =-D__LINUX_ARM_ARCH__=3 -march=armv3 781b21376aSDouglas Anderson 791b21376aSDouglas Anderson# Evaluate arch cc-option calls now 801b21376aSDouglas Andersonarch-y := $(arch-y) 811da177e4SLinus Torvalds 821da177e4SLinus Torvalds# This selects how we optimise for the processor. 831b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM7TDMI) =-mtune=arm7tdmi 841b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM720T) =-mtune=arm7tdmi 851b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM740T) =-mtune=arm7tdmi 861b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM9TDMI) =-mtune=arm9tdmi 871b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM940T) =-mtune=arm9tdmi 881b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM946E) =$(call cc-option,-mtune=arm9e,-mtune=arm9tdmi) 891b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM920T) =-mtune=arm9tdmi 901b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM922T) =-mtune=arm9tdmi 911b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM925T) =-mtune=arm9tdmi 921b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM926T) =-mtune=arm9tdmi 931b21376aSDouglas Andersontune-$(CONFIG_CPU_FA526) =-mtune=arm9tdmi 941b21376aSDouglas Andersontune-$(CONFIG_CPU_SA110) =-mtune=strongarm110 951b21376aSDouglas Andersontune-$(CONFIG_CPU_SA1100) =-mtune=strongarm1100 961b21376aSDouglas Andersontune-$(CONFIG_CPU_XSCALE) =$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale 971b21376aSDouglas Andersontune-$(CONFIG_CPU_XSC3) =$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale 981b21376aSDouglas Andersontune-$(CONFIG_CPU_FEROCEON) =$(call cc-option,-mtune=marvell-f,-mtune=xscale) 991b21376aSDouglas Andersontune-$(CONFIG_CPU_V6) =$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) 1001b21376aSDouglas Andersontune-$(CONFIG_CPU_V6K) =$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) 1011b21376aSDouglas Anderson 1021b21376aSDouglas Anderson# Evaluate tune cc-option calls now 1031b21376aSDouglas Andersontune-y := $(tune-y) 1041da177e4SLinus Torvalds 105704bdda0SNicolas Pitreifeq ($(CONFIG_AEABI),y) 10622905a24SStefan AgnerCFLAGS_ABI :=-mabi=aapcs-linux -mfpu=vfp 107704bdda0SNicolas Pitreelse 108c28a814fSCatalin MarinasCFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,) 109704bdda0SNicolas Pitreendif 110704bdda0SNicolas Pitre 111adf8b37bSCatalin Marinasifeq ($(CONFIG_ARM_UNWIND),y) 112adf8b37bSCatalin MarinasCFLAGS_ABI +=-funwind-tables 113adf8b37bSCatalin Marinasendif 114adf8b37bSCatalin Marinas 11575fea300SNicolas Pitre# Accept old syntax despite ".syntax unified" 11675fea300SNicolas PitreAFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) 11775fea300SNicolas Pitre 11816c79651SCatalin Marinasifeq ($(CONFIG_THUMB2_KERNEL),y) 119c540b9ffSCatalin MarinasAFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it) 12091802a8eSArnd BergmannCFLAGS_ISA :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN) 12191802a8eSArnd BergmannAFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb 1226f685c5cSDave Martin# Work around buggy relocation from gas if requested: 1236f685c5cSDave Martinifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y) 124336303aeSCao jinKBUILD_CFLAGS_MODULE +=-fno-optimize-sibling-calls 1256f685c5cSDave Martinendif 12691802a8eSArnd Bergmannelse 12775fea300SNicolas PitreCFLAGS_ISA :=$(call cc-option,-marm,) $(AFLAGS_NOWARN) 12891802a8eSArnd BergmannAFLAGS_ISA :=$(CFLAGS_ISA) 12916c79651SCatalin Marinasendif 13016c79651SCatalin Marinas 131704bdda0SNicolas Pitre# Need -Uarm for gcc < 3.x 13291802a8eSArnd BergmannKBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 13391802a8eSArnd BergmannKBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float 1341da177e4SLinus Torvalds 1351f2f01b1SLuc Van OostenryckCHECKFLAGS += -D__arm__ 1361da177e4SLinus Torvalds 1371da177e4SLinus Torvalds#Default value 1385290dc29SThomas Gleixnerhead-y := arch/arm/kernel/head$(MMUEXT).o 13910508b20SDaniel Thompson 14010508b20SDaniel Thompson# Text offset. This list is sorted numerically by address in order to 14110508b20SDaniel Thompson# provide a means to avoid/resolve conflicts in multi-arch kernels. 1429d4f13e5SRussell Kingtextofs-y := 0x00008000 143c4761b69SVasily Khoruzhick# We don't want the htc bootloader to corrupt kernel during resume 144c4761b69SVasily Khoruzhicktextofs-$(CONFIG_PM_H1940) := 0x00108000 1451da177e4SLinus Torvalds# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory 146b4175b89SRussell Kingifeq ($(CONFIG_ARCH_SA1100),y) 1479d4f13e5SRussell Kingtextofs-$(CONFIG_SA1111) := 0x00208000 1481da177e4SLinus Torvaldsendif 1499e775ad1SStephen Boydtextofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000 1509e775ad1SStephen Boydtextofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 151d850f3e5SMartin Blumenstingltextofs-$(CONFIG_ARCH_MESON) := 0x00208000 1521d22924eSAnders Bergtextofs-$(CONFIG_ARCH_AXXIA) := 0x00308000 153b4175b89SRussell King 154b4175b89SRussell King# Machine directory name. This list is sorted alphanumerically 155b4175b89SRussell King# by CONFIG_* macro name. 1566bb8536cSAndreas Färbermachine-$(CONFIG_ARCH_ACTIONS) += actions 157445d9b30STsahee Zidenbergmachine-$(CONFIG_ARCH_ALPINE) += alpine 158590b460cSLars Perssonmachine-$(CONFIG_ARCH_ARTPEC) += artpec 159387798b3SRob Herringmachine-$(CONFIG_ARCH_AT91) += at91 1601d22924eSAnders Bergmachine-$(CONFIG_ARCH_AXXIA) += axxia 1618ac49e04SChristian Daudtmachine-$(CONFIG_ARCH_BCM) += bcm 1621c37fa10SSebastian Hesselbarthmachine-$(CONFIG_ARCH_BERLIN) += berlin 163387798b3SRob Herringmachine-$(CONFIG_ARCH_CLPS711X) += clps711x 164387798b3SRob Herringmachine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx 165387798b3SRob Herringmachine-$(CONFIG_ARCH_DAVINCI) += davinci 16616083d45SBaruch Siachmachine-$(CONFIG_ARCH_DIGICOLOR) += digicolor 167387798b3SRob Herringmachine-$(CONFIG_ARCH_DOVE) += dove 168387798b3SRob Herringmachine-$(CONFIG_ARCH_EBSA110) += ebsa110 1696d85e2b0SUwe Kleine-Königmachine-$(CONFIG_ARCH_EFM32) += efm32 170387798b3SRob Herringmachine-$(CONFIG_ARCH_EP93XX) += ep93xx 1716eddacaeSRussell Kingmachine-$(CONFIG_ARCH_EXYNOS) += exynos 172c3c963e1SUwe Kleine-Königmachine-$(CONFIG_ARCH_FOOTBRIDGE) += footbridge 173387798b3SRob Herringmachine-$(CONFIG_ARCH_GEMINI) += gemini 174387798b3SRob Herringmachine-$(CONFIG_ARCH_HIGHBANK) += highbank 1757685b125SHaojian Zhuangmachine-$(CONFIG_ARCH_HISI) += hisi 176387798b3SRob Herringmachine-$(CONFIG_ARCH_INTEGRATOR) += integrator 177387798b3SRob Herringmachine-$(CONFIG_ARCH_IOP13XX) += iop13xx 178387798b3SRob Herringmachine-$(CONFIG_ARCH_IOP32X) += iop32x 179387798b3SRob Herringmachine-$(CONFIG_ARCH_IOP33X) += iop33x 180387798b3SRob Herringmachine-$(CONFIG_ARCH_IXP4XX) += ixp4xx 1816eddacaeSRussell Kingmachine-$(CONFIG_ARCH_KEYSTONE) += keystone 182387798b3SRob Herringmachine-$(CONFIG_ARCH_KS8695) += ks8695 183e8d235d4SJoachim Eastwoodmachine-$(CONFIG_ARCH_LPC18XX) += lpc18xx 184387798b3SRob Herringmachine-$(CONFIG_ARCH_LPC32XX) += lpc32xx 1853b8f5030SCarlo Caionemachine-$(CONFIG_ARCH_MESON) += meson 186387798b3SRob Herringmachine-$(CONFIG_ARCH_MMP) += mmp 1871847119dSVladimir Murzinmachine-$(CONFIG_ARCH_MPS2) += vexpress 18817723fd3SJonas Jensenmachine-$(CONFIG_ARCH_MOXART) += moxart 189387798b3SRob Herringmachine-$(CONFIG_ARCH_MV78XX0) += mv78xx0 1906eddacaeSRussell Kingmachine-$(CONFIG_ARCH_MVEBU) += mvebu 191387798b3SRob Herringmachine-$(CONFIG_ARCH_MXC) += imx 192f682a218SMatthias Bruggermachine-$(CONFIG_ARCH_MEDIATEK) += mediatek 193387798b3SRob Herringmachine-$(CONFIG_ARCH_MXS) += mxs 194387798b3SRob Herringmachine-$(CONFIG_ARCH_NETX) += netx 195387798b3SRob Herringmachine-$(CONFIG_ARCH_NOMADIK) += nomadik 1967bffa14cSBrendan Higginsmachine-$(CONFIG_ARCH_NPCM) += npcm 1979851ca57SDaniel Tangmachine-$(CONFIG_ARCH_NSPIRE) += nspire 198e330ea5eSNeil Armstrongmachine-$(CONFIG_ARCH_OXNAS) += oxnas 199387798b3SRob Herringmachine-$(CONFIG_ARCH_OMAP1) += omap1 200387798b3SRob Herringmachine-$(CONFIG_ARCH_OMAP2PLUS) += omap2 201387798b3SRob Herringmachine-$(CONFIG_ARCH_ORION5X) += orion5x 202387798b3SRob Herringmachine-$(CONFIG_ARCH_PICOXCELL) += picoxcell 203387798b3SRob Herringmachine-$(CONFIG_ARCH_PXA) += pxa 2048fc1b0f8SKumar Galamachine-$(CONFIG_ARCH_QCOM) += qcom 205387798b3SRob Herringmachine-$(CONFIG_ARCH_REALVIEW) += realview 206d63dc051SHeiko Stuebnermachine-$(CONFIG_ARCH_ROCKCHIP) += rockchip 207387798b3SRob Herringmachine-$(CONFIG_ARCH_RPC) += rpc 208acf2d41dSKukjin Kimmachine-$(CONFIG_ARCH_S3C24XX) += s3c24xx 209387798b3SRob Herringmachine-$(CONFIG_ARCH_S3C64XX) += s3c64xx 210387798b3SRob Herringmachine-$(CONFIG_ARCH_S5PV210) += s5pv210 211387798b3SRob Herringmachine-$(CONFIG_ARCH_SA1100) += sa1100 212d9be9cebSGeert Uytterhoevenmachine-$(CONFIG_ARCH_RENESAS) += shmobile 2136eddacaeSRussell Kingmachine-$(CONFIG_ARCH_SIRF) += prima2 2146eddacaeSRussell Kingmachine-$(CONFIG_ARCH_SOCFPGA) += socfpga 2156eddacaeSRussell Kingmachine-$(CONFIG_ARCH_STI) += sti 2169b799b78SMaxime Coquelinmachine-$(CONFIG_ARCH_STM32) += stm32 2176eddacaeSRussell Kingmachine-$(CONFIG_ARCH_SUNXI) += sunxi 218d6de5b02SMarc Gonzalezmachine-$(CONFIG_ARCH_TANGO) += tango 219387798b3SRob Herringmachine-$(CONFIG_ARCH_TEGRA) += tegra 220387798b3SRob Herringmachine-$(CONFIG_ARCH_U300) += u300 221387798b3SRob Herringmachine-$(CONFIG_ARCH_U8500) += ux500 222ba56a987SMasahiro Yamadamachine-$(CONFIG_ARCH_UNIPHIER) += uniphier 223387798b3SRob Herringmachine-$(CONFIG_ARCH_VERSATILE) += versatile 224387798b3SRob Herringmachine-$(CONFIG_ARCH_VEXPRESS) += vexpress 225387798b3SRob Herringmachine-$(CONFIG_ARCH_VT8500) += vt8500 226387798b3SRob Herringmachine-$(CONFIG_ARCH_W90X900) += w90x900 227acede515SJun Niemachine-$(CONFIG_ARCH_ZX) += zx 228387798b3SRob Herringmachine-$(CONFIG_ARCH_ZYNQ) += zynq 2296eddacaeSRussell Kingmachine-$(CONFIG_PLAT_SPEAR) += spear 230b4175b89SRussell King 231b4175b89SRussell King# Platform directory name. This list is sorted alphanumerically 232b4175b89SRussell King# by CONFIG_* macro name. 233e245f969STomasz Figaplat-$(CONFIG_ARCH_EXYNOS) += samsung 234387798b3SRob Herringplat-$(CONFIG_ARCH_OMAP) += omap 235387798b3SRob Herringplat-$(CONFIG_ARCH_S3C64XX) += samsung 236aa42587aSTomasz Figaplat-$(CONFIG_ARCH_S5PV210) += samsung 237387798b3SRob Herringplat-$(CONFIG_PLAT_IOP) += iop 238387798b3SRob Herringplat-$(CONFIG_PLAT_ORION) += orion 239387798b3SRob Herringplat-$(CONFIG_PLAT_PXA) += pxa 24009ec1d7eSKukjin Kimplat-$(CONFIG_PLAT_S3C24XX) += samsung 241387798b3SRob Herringplat-$(CONFIG_PLAT_VERSATILE) += versatile 2421da177e4SLinus Torvalds 2431da177e4SLinus Torvaldsifeq ($(CONFIG_ARCH_EBSA110),y) 2441da177e4SLinus Torvalds# This is what happens if you forget the IOCS16 line. 2451da177e4SLinus Torvalds# PCMCIA cards stop working. 2461da177e4SLinus TorvaldsCFLAGS_3c589_cs.o :=-DISA_SIXTEEN_BIT_PERIPHERAL 2471da177e4SLinus Torvaldsexport CFLAGS_3c589_cs.o 2481da177e4SLinus Torvaldsendif 2491da177e4SLinus Torvalds 2509d4f13e5SRussell King# The byte offset of the kernel image in RAM from the start of RAM. 2519d4f13e5SRussell KingTEXT_OFFSET := $(textofs-y) 2521da177e4SLinus Torvalds 253f44f82e8SRussell King# The first directory contains additional information for the boot setup code 2541da177e4SLinus Torvaldsifneq ($(machine-y),) 255f44f82e8SRussell KingMACHINE := arch/arm/mach-$(word 1,$(machine-y))/ 2561da177e4SLinus Torvaldselse 2571da177e4SLinus TorvaldsMACHINE := 2581da177e4SLinus Torvaldsendif 259387798b3SRob Herringifeq ($(CONFIG_ARCH_MULTIPLATFORM),y) 260387798b3SRob HerringMACHINE := 261387798b3SRob Herringendif 2621da177e4SLinus Torvalds 263f44f82e8SRussell Kingmachdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) 264aa42587aSTomasz Figaplatdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y))) 265f44f82e8SRussell King 266387798b3SRob Herringifneq ($(CONFIG_ARCH_MULTIPLATFORM),y) 267de8a06f6SArnd Bergmannifneq ($(CONFIG_ARM_SINGLE_ARMV7M),y) 268f44f82e8SRussell Kingifeq ($(KBUILD_SRC),) 269f44f82e8SRussell KingKBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs) $(platdirs)) 270f44f82e8SRussell Kingelse 271f44f82e8SRussell KingKBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs)) 272f44f82e8SRussell Kingendif 273387798b3SRob Herringendif 274de8a06f6SArnd Bergmannendif 275f44f82e8SRussell King 276f8c07de6SHyok S. Choiexport TEXT_OFFSET GZFLAGS MMUEXT 2771da177e4SLinus Torvalds 2781da177e4SLinus Torvalds# Do we have FASTFPE? 2791da177e4SLinus TorvaldsFASTFPE :=arch/arm/fastfpe 2801da177e4SLinus Torvaldsifeq ($(FASTFPE),$(wildcard $(FASTFPE))) 2811da177e4SLinus TorvaldsFASTFPE_OBJ :=$(FASTFPE)/ 2821da177e4SLinus Torvaldsendif 2831da177e4SLinus Torvalds 2841da177e4SLinus Torvaldscore-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/ 2851da177e4SLinus Torvaldscore-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ) 2861da177e4SLinus Torvaldscore-$(CONFIG_VFP) += arch/arm/vfp/ 2874c071ee5SStefano Stabellinicore-$(CONFIG_XEN) += arch/arm/xen/ 288749cf76cSChristoffer Dallcore-$(CONFIG_KVM_ARM_HOST) += arch/arm/kvm/ 289e5b61debSNathan Lynchcore-$(CONFIG_VDSO) += arch/arm/vdso/ 2901da177e4SLinus Torvalds 291c62d0f2aSNicolas Pitre# If we have a machine-specific directory, then include it in the build. 292c62d0f2aSNicolas Pitrecore-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/ 293fca08f32SWang Nancore-y += arch/arm/probes/ 294ddecdfceSMircea Gherzancore-y += arch/arm/net/ 295f0be44f4SDavid McCulloughcore-y += arch/arm/crypto/ 296d9a1beaaSAlexandre Courbotcore-y += arch/arm/firmware/ 297c62d0f2aSNicolas Pitrecore-y += $(machdirs) $(platdirs) 298c62d0f2aSNicolas Pitre 2991da177e4SLinus Torvaldsdrivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ 3001da177e4SLinus Torvalds 30130c2f90bSNicolas Pitrelibs-y := arch/arm/lib/ $(libs-y) 3021da177e4SLinus Torvalds 3031da177e4SLinus Torvalds# Default target when executing plain make 304152e6744SMichal Marekboot := arch/arm/boot 3051da177e4SLinus Torvaldsifeq ($(CONFIG_XIP_KERNEL),y) 306152e6744SMichal MarekKBUILD_IMAGE := $(boot)/xipImage 3071da177e4SLinus Torvaldselse 308152e6744SMichal MarekKBUILD_IMAGE := $(boot)/zImage 3091da177e4SLinus Torvaldsendif 3101da177e4SLinus Torvalds 311e50a622dSAndrew Lunn# Build the DT binary blobs if we have OF configured 312e50a622dSAndrew Lunnifeq ($(CONFIG_USE_OF),y) 313e50a622dSAndrew LunnKBUILD_DTBS := dtbs 314e50a622dSAndrew Lunnendif 315e50a622dSAndrew Lunn 316152e6744SMichal Marekall: $(notdir $(KBUILD_IMAGE)) $(KBUILD_DTBS) 31751342d71SRussell King 3181da177e4SLinus Torvalds 31996a8fae0SRussell Kingarchheaders: 32096a8fae0SRussell King $(Q)$(MAKE) $(build)=arch/arm/tools uapi 32196a8fae0SRussell King 32266206536SSam Ravnborgarchprepare: 3234e2648dbSRussell King $(Q)$(MAKE) $(build)=arch/arm/tools kapi 3241da177e4SLinus Torvalds 3251da177e4SLinus Torvalds# Convert bzImage to zImage 3261da177e4SLinus TorvaldsbzImage: zImage 3271da177e4SLinus Torvalds 32819514fc6SRobert RichterBOOT_TARGETS = zImage Image xipImage bootpImage uImage 32919514fc6SRobert RichterINSTALL_TARGETS = zinstall uinstall install 33019514fc6SRobert Richter 33119514fc6SRobert RichterPHONY += bzImage $(BOOT_TARGETS) $(INSTALL_TARGETS) 33219514fc6SRobert Richter 3333939f334SMasahiro YamadabootpImage uImage: zImage 3343939f334SMasahiro YamadazImage: Image 3353939f334SMasahiro Yamada 33619514fc6SRobert Richter$(BOOT_TARGETS): vmlinux 3371da177e4SLinus Torvalds $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ 338c6bbfbb7SMasahiro Yamada @$(kecho) ' Kernel: $(boot)/$@ is ready' 3391da177e4SLinus Torvalds 34019514fc6SRobert Richter$(INSTALL_TARGETS): 3411da177e4SLinus Torvalds $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ 3421da177e4SLinus Torvalds 34381793babSDouglas Anderson%.dtb: | scripts 344499cd829SGrant Likely $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@ 3455fd1a2edSRob Herring 346f4d4ffc0SJason CooperPHONY += dtbs dtbs_install 3479fb5e537SRobert Richter 3489fb5e537SRobert Richterdtbs: prepare scripts 3496f889d8bSRobert Richter $(Q)$(MAKE) $(build)=$(boot)/dts 3505fd1a2edSRob Herring 3519fb5e537SRobert Richterdtbs_install: 3526f889d8bSRobert Richter $(Q)$(MAKE) $(dtbinst)=$(boot)/dts 3539fb5e537SRobert Richter 354e5b61debSNathan LynchPHONY += vdso_install 355e5b61debSNathan Lynchvdso_install: 356e5b61debSNathan Lynchifeq ($(CONFIG_VDSO),y) 357e5b61debSNathan Lynch $(Q)$(MAKE) $(build)=arch/arm/vdso $@ 358e5b61debSNathan Lynchendif 359e5b61debSNathan Lynch 3601da177e4SLinus Torvalds# We use MRPROPER_FILES and CLEAN_FILES now 3611da177e4SLinus Torvaldsarchclean: 3621da177e4SLinus Torvalds $(Q)$(MAKE) $(clean)=$(boot) 3631da177e4SLinus Torvalds 3641da177e4SLinus Torvalds# My testing targets (bypasses dependencies) 3651da177e4SLinus Torvaldsbp:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/bootpImage 3661da177e4SLinus Torvalds 3671da177e4SLinus Torvalds 3681da177e4SLinus Torvaldsdefine archhelp 3691da177e4SLinus Torvalds echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' 3701da177e4SLinus Torvalds echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' 3711da177e4SLinus Torvalds echo '* xipImage - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)' 372a4f14bacSUwe Kleine-König echo ' uImage - U-Boot wrapped zImage' 3731da177e4SLinus Torvalds echo ' bootpImage - Combined zImage and initial RAM disk' 3741da177e4SLinus Torvalds echo ' (supply initrd image via make variable INITRD=<path>)' 375e50a622dSAndrew Lunn echo '* dtbs - Build device tree blobs for enabled boards' 376f4d4ffc0SJason Cooper echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)' 3771da177e4SLinus Torvalds echo ' install - Install uncompressed kernel' 3781da177e4SLinus Torvalds echo ' zinstall - Install compressed kernel' 379a65d2922SRussell King echo ' uinstall - Install U-Boot wrapped compressed kernel' 380caa27b66SSam Ravnborg echo ' Install using (your) ~/bin/$(INSTALLKERNEL) or' 381caa27b66SSam Ravnborg echo ' (distribution) /sbin/$(INSTALLKERNEL) or' 3821da177e4SLinus Torvalds echo ' install to $$(INSTALL_PATH) and run lilo' 383e5b61debSNathan Lynch echo ' vdso_install - Install unstripped vdso.so to $$(INSTALL_MOD_PATH)/vdso' 3841da177e4SLinus Torvaldsendef 385