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 13bcccc50cSVincent Sanders# Ensure linker flags are correct 14bcccc50cSVincent SandersLDFLAGS := 15bcccc50cSVincent Sanders 1602e541dbSArd BiesheuvelLDFLAGS_vmlinux :=-p --no-undefined -X --pic-veneer 1726584853SCatalin Marinasifeq ($(CONFIG_CPU_ENDIAN_BE8),y) 1826584853SCatalin MarinasLDFLAGS_vmlinux += --be8 190ab89d0bSBen DooksLDFLAGS_MODULE += --be8 2026584853SCatalin Marinasendif 2151b563fcSSam Ravnborg 22dc810efbSPawel MollOBJCOPYFLAGS :=-O binary -R .comment -S 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 291da177e4SLinus Torvalds# Do not use arch/arm/defconfig - it's always outdated. 301da177e4SLinus Torvalds# Select a platform tht is kept up-to-date 311da177e4SLinus TorvaldsKBUILD_DEFCONFIG := versatile_defconfig 321da177e4SLinus Torvalds 333dbda77eSUwe Kleine-Koenig# defines filename extension depending memory management type. 34f8c07de6SHyok S. Choiifeq ($(CONFIG_MMU),) 35f8c07de6SHyok S. ChoiMMUEXT := -nommu 36e91b36efSWill DeaconKBUILD_CFLAGS += $(call cc-option,-mno-unaligned-access) 37f8c07de6SHyok S. Choiendif 38f8c07de6SHyok S. Choi 391da177e4SLinus Torvaldsifeq ($(CONFIG_FRAME_POINTER),y) 40a0f97e06SSam RavnborgKBUILD_CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog 411da177e4SLinus Torvaldsendif 421da177e4SLinus Torvalds 431da177e4SLinus Torvaldsifeq ($(CONFIG_CPU_BIG_ENDIAN),y) 4406c5040cSSam RavnborgKBUILD_CPPFLAGS += -mbig-endian 451da177e4SLinus TorvaldsAS += -EB 461da177e4SLinus TorvaldsLD += -EB 471da177e4SLinus Torvaldselse 4806c5040cSSam RavnborgKBUILD_CPPFLAGS += -mlittle-endian 491da177e4SLinus TorvaldsAS += -EL 501da177e4SLinus TorvaldsLD += -EL 511da177e4SLinus Torvaldsendif 521da177e4SLinus Torvalds 531da177e4SLinus Torvalds# This selects which instruction set is used. 541da177e4SLinus Torvalds# Note that GCC does not numerically define an architecture version 551da177e4SLinus Torvalds# macro, but instead defines a whole series of macros which makes 561da177e4SLinus Torvalds# testing for a specific architecture or later rather impossible. 573c0c01abSRussell Kingarch-$(CONFIG_CPU_32v7M) =-D__LINUX_ARM_ARCH__=7 -march=armv7-m -Wa,-march=armv7-m 581b21376aSDouglas Andersonarch-$(CONFIG_CPU_32v7) =-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a) 591b21376aSDouglas Andersonarch-$(CONFIG_CPU_32v6) =-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6) 6023688e99SCatalin Marinas# Only override the compiler option if ARMv6. The ARMv6K extensions are 6123688e99SCatalin Marinas# always available in ARMv7 6223688e99SCatalin Marinasifeq ($(CONFIG_CPU_32v6),y) 631b21376aSDouglas Andersonarch-$(CONFIG_CPU_32v6K) =-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6k,-march=armv5t -Wa$(comma)-march=armv6k) 6423688e99SCatalin Marinasendif 651b21376aSDouglas Andersonarch-$(CONFIG_CPU_32v5) =-D__LINUX_ARM_ARCH__=5 $(call cc-option,-march=armv5te,-march=armv4t) 661b21376aSDouglas Andersonarch-$(CONFIG_CPU_32v4T) =-D__LINUX_ARM_ARCH__=4 -march=armv4t 671b21376aSDouglas Andersonarch-$(CONFIG_CPU_32v4) =-D__LINUX_ARM_ARCH__=4 -march=armv4 681b21376aSDouglas Andersonarch-$(CONFIG_CPU_32v3) =-D__LINUX_ARM_ARCH__=3 -march=armv3 691b21376aSDouglas Anderson 701b21376aSDouglas Anderson# Evaluate arch cc-option calls now 711b21376aSDouglas Andersonarch-y := $(arch-y) 721da177e4SLinus Torvalds 731da177e4SLinus Torvalds# This selects how we optimise for the processor. 741b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM7TDMI) =-mtune=arm7tdmi 751b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM720T) =-mtune=arm7tdmi 761b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM740T) =-mtune=arm7tdmi 771b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM9TDMI) =-mtune=arm9tdmi 781b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM940T) =-mtune=arm9tdmi 791b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM946E) =$(call cc-option,-mtune=arm9e,-mtune=arm9tdmi) 801b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM920T) =-mtune=arm9tdmi 811b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM922T) =-mtune=arm9tdmi 821b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM925T) =-mtune=arm9tdmi 831b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM926T) =-mtune=arm9tdmi 841b21376aSDouglas Andersontune-$(CONFIG_CPU_FA526) =-mtune=arm9tdmi 851b21376aSDouglas Andersontune-$(CONFIG_CPU_SA110) =-mtune=strongarm110 861b21376aSDouglas Andersontune-$(CONFIG_CPU_SA1100) =-mtune=strongarm1100 871b21376aSDouglas Andersontune-$(CONFIG_CPU_XSCALE) =$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale 881b21376aSDouglas Andersontune-$(CONFIG_CPU_XSC3) =$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale 891b21376aSDouglas Andersontune-$(CONFIG_CPU_FEROCEON) =$(call cc-option,-mtune=marvell-f,-mtune=xscale) 901b21376aSDouglas Andersontune-$(CONFIG_CPU_V6) =$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) 911b21376aSDouglas Andersontune-$(CONFIG_CPU_V6K) =$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) 921b21376aSDouglas Anderson 931b21376aSDouglas Anderson# Evaluate tune cc-option calls now 941b21376aSDouglas Andersontune-y := $(tune-y) 951da177e4SLinus Torvalds 96704bdda0SNicolas Pitreifeq ($(CONFIG_AEABI),y) 97d326b65cSRussell KingCFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp 98704bdda0SNicolas Pitreelse 99c28a814fSCatalin MarinasCFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,) 100704bdda0SNicolas Pitreendif 101704bdda0SNicolas Pitre 102adf8b37bSCatalin Marinasifeq ($(CONFIG_ARM_UNWIND),y) 103adf8b37bSCatalin MarinasCFLAGS_ABI +=-funwind-tables 104adf8b37bSCatalin Marinasendif 105adf8b37bSCatalin Marinas 10616c79651SCatalin Marinasifeq ($(CONFIG_THUMB2_KERNEL),y) 107c540b9ffSCatalin MarinasAFLAGS_AUTOIT :=$(call as-option,-Wa$(comma)-mimplicit-it=always,-Wa$(comma)-mauto-it) 10816c79651SCatalin MarinasAFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) 10991802a8eSArnd BergmannCFLAGS_ISA :=-mthumb $(AFLAGS_AUTOIT) $(AFLAGS_NOWARN) 11091802a8eSArnd BergmannAFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb 1116f685c5cSDave Martin# Work around buggy relocation from gas if requested: 1126f685c5cSDave Martinifeq ($(CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11),y) 1136f685c5cSDave MartinCFLAGS_MODULE +=-fno-optimize-sibling-calls 1146f685c5cSDave Martinendif 11591802a8eSArnd Bergmannelse 11691802a8eSArnd BergmannCFLAGS_ISA :=$(call cc-option,-marm,) 11791802a8eSArnd BergmannAFLAGS_ISA :=$(CFLAGS_ISA) 11816c79651SCatalin Marinasendif 11916c79651SCatalin Marinas 120704bdda0SNicolas Pitre# Need -Uarm for gcc < 3.x 12191802a8eSArnd BergmannKBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 12291802a8eSArnd BergmannKBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float 1231da177e4SLinus Torvalds 1241da177e4SLinus TorvaldsCHECKFLAGS += -D__arm__ 1251da177e4SLinus Torvalds 1261da177e4SLinus Torvalds#Default value 1275290dc29SThomas Gleixnerhead-y := arch/arm/kernel/head$(MMUEXT).o 12810508b20SDaniel Thompson 12910508b20SDaniel Thompson# Text offset. This list is sorted numerically by address in order to 13010508b20SDaniel Thompson# provide a means to avoid/resolve conflicts in multi-arch kernels. 1319d4f13e5SRussell Kingtextofs-y := 0x00008000 132b4175b89SRussell Kingtextofs-$(CONFIG_ARCH_CLPS711X) := 0x00028000 133c4761b69SVasily Khoruzhick# We don't want the htc bootloader to corrupt kernel during resume 134c4761b69SVasily Khoruzhicktextofs-$(CONFIG_PM_H1940) := 0x00108000 1351da177e4SLinus Torvalds# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory 136b4175b89SRussell Kingifeq ($(CONFIG_ARCH_SA1100),y) 1379d4f13e5SRussell Kingtextofs-$(CONFIG_SA1111) := 0x00208000 1381da177e4SLinus Torvaldsendif 1399e775ad1SStephen Boydtextofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000 1409e775ad1SStephen Boydtextofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 1411d22924eSAnders Bergtextofs-$(CONFIG_ARCH_AXXIA) := 0x00308000 142b4175b89SRussell King 143b4175b89SRussell King# Machine directory name. This list is sorted alphanumerically 144b4175b89SRussell King# by CONFIG_* macro name. 145445d9b30STsahee Zidenbergmachine-$(CONFIG_ARCH_ALPINE) += alpine 146387798b3SRob Herringmachine-$(CONFIG_ARCH_AT91) += at91 1471d22924eSAnders Bergmachine-$(CONFIG_ARCH_AXXIA) += axxia 1488ac49e04SChristian Daudtmachine-$(CONFIG_ARCH_BCM) += bcm 1491c37fa10SSebastian Hesselbarthmachine-$(CONFIG_ARCH_BERLIN) += berlin 150387798b3SRob Herringmachine-$(CONFIG_ARCH_CLPS711X) += clps711x 151387798b3SRob Herringmachine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx 152387798b3SRob Herringmachine-$(CONFIG_ARCH_DAVINCI) += davinci 15316083d45SBaruch Siachmachine-$(CONFIG_ARCH_DIGICOLOR) += digicolor 154387798b3SRob Herringmachine-$(CONFIG_ARCH_DOVE) += dove 155387798b3SRob Herringmachine-$(CONFIG_ARCH_EBSA110) += ebsa110 1566d85e2b0SUwe Kleine-Königmachine-$(CONFIG_ARCH_EFM32) += efm32 157387798b3SRob Herringmachine-$(CONFIG_ARCH_EP93XX) += ep93xx 1586eddacaeSRussell Kingmachine-$(CONFIG_ARCH_EXYNOS) += exynos 159c3c963e1SUwe Kleine-Königmachine-$(CONFIG_ARCH_FOOTBRIDGE) += footbridge 160387798b3SRob Herringmachine-$(CONFIG_ARCH_GEMINI) += gemini 161387798b3SRob Herringmachine-$(CONFIG_ARCH_HIGHBANK) += highbank 1627685b125SHaojian Zhuangmachine-$(CONFIG_ARCH_HISI) += hisi 163387798b3SRob Herringmachine-$(CONFIG_ARCH_INTEGRATOR) += integrator 164387798b3SRob Herringmachine-$(CONFIG_ARCH_IOP13XX) += iop13xx 165387798b3SRob Herringmachine-$(CONFIG_ARCH_IOP32X) += iop32x 166387798b3SRob Herringmachine-$(CONFIG_ARCH_IOP33X) += iop33x 167387798b3SRob Herringmachine-$(CONFIG_ARCH_IXP4XX) += ixp4xx 1686eddacaeSRussell Kingmachine-$(CONFIG_ARCH_KEYSTONE) += keystone 169387798b3SRob Herringmachine-$(CONFIG_ARCH_KS8695) += ks8695 170*e8d235d4SJoachim Eastwoodmachine-$(CONFIG_ARCH_LPC18XX) += lpc18xx 171387798b3SRob Herringmachine-$(CONFIG_ARCH_LPC32XX) += lpc32xx 1723b8f5030SCarlo Caionemachine-$(CONFIG_ARCH_MESON) += meson 173387798b3SRob Herringmachine-$(CONFIG_ARCH_MMP) += mmp 17417723fd3SJonas Jensenmachine-$(CONFIG_ARCH_MOXART) += moxart 175387798b3SRob Herringmachine-$(CONFIG_ARCH_MV78XX0) += mv78xx0 1766eddacaeSRussell Kingmachine-$(CONFIG_ARCH_MVEBU) += mvebu 177387798b3SRob Herringmachine-$(CONFIG_ARCH_MXC) += imx 178f682a218SMatthias Bruggermachine-$(CONFIG_ARCH_MEDIATEK) += mediatek 179387798b3SRob Herringmachine-$(CONFIG_ARCH_MXS) += mxs 180387798b3SRob Herringmachine-$(CONFIG_ARCH_NETX) += netx 181387798b3SRob Herringmachine-$(CONFIG_ARCH_NOMADIK) += nomadik 1829851ca57SDaniel Tangmachine-$(CONFIG_ARCH_NSPIRE) += nspire 183387798b3SRob Herringmachine-$(CONFIG_ARCH_OMAP1) += omap1 184387798b3SRob Herringmachine-$(CONFIG_ARCH_OMAP2PLUS) += omap2 185387798b3SRob Herringmachine-$(CONFIG_ARCH_ORION5X) += orion5x 186387798b3SRob Herringmachine-$(CONFIG_ARCH_PICOXCELL) += picoxcell 187387798b3SRob Herringmachine-$(CONFIG_ARCH_PXA) += pxa 1888fc1b0f8SKumar Galamachine-$(CONFIG_ARCH_QCOM) += qcom 189387798b3SRob Herringmachine-$(CONFIG_ARCH_REALVIEW) += realview 190d63dc051SHeiko Stuebnermachine-$(CONFIG_ARCH_ROCKCHIP) += rockchip 191387798b3SRob Herringmachine-$(CONFIG_ARCH_RPC) += rpc 192acf2d41dSKukjin Kimmachine-$(CONFIG_ARCH_S3C24XX) += s3c24xx 193387798b3SRob Herringmachine-$(CONFIG_ARCH_S3C64XX) += s3c64xx 194387798b3SRob Herringmachine-$(CONFIG_ARCH_S5PV210) += s5pv210 195387798b3SRob Herringmachine-$(CONFIG_ARCH_SA1100) += sa1100 196387798b3SRob Herringmachine-$(CONFIG_ARCH_SHMOBILE) += shmobile 1976eddacaeSRussell Kingmachine-$(CONFIG_ARCH_SIRF) += prima2 1986eddacaeSRussell Kingmachine-$(CONFIG_ARCH_SOCFPGA) += socfpga 1996eddacaeSRussell Kingmachine-$(CONFIG_ARCH_STI) += sti 2009b799b78SMaxime Coquelinmachine-$(CONFIG_ARCH_STM32) += stm32 2016eddacaeSRussell Kingmachine-$(CONFIG_ARCH_SUNXI) += sunxi 202387798b3SRob Herringmachine-$(CONFIG_ARCH_TEGRA) += tegra 203387798b3SRob Herringmachine-$(CONFIG_ARCH_U300) += u300 204387798b3SRob Herringmachine-$(CONFIG_ARCH_U8500) += ux500 205ba56a987SMasahiro Yamadamachine-$(CONFIG_ARCH_UNIPHIER) += uniphier 206387798b3SRob Herringmachine-$(CONFIG_ARCH_VERSATILE) += versatile 207387798b3SRob Herringmachine-$(CONFIG_ARCH_VEXPRESS) += vexpress 208387798b3SRob Herringmachine-$(CONFIG_ARCH_VT8500) += vt8500 209387798b3SRob Herringmachine-$(CONFIG_ARCH_W90X900) += w90x900 210387798b3SRob Herringmachine-$(CONFIG_ARCH_ZYNQ) += zynq 2116eddacaeSRussell Kingmachine-$(CONFIG_PLAT_SPEAR) += spear 212b4175b89SRussell King 213b4175b89SRussell King# Platform directory name. This list is sorted alphanumerically 214b4175b89SRussell King# by CONFIG_* macro name. 215e245f969STomasz Figaplat-$(CONFIG_ARCH_EXYNOS) += samsung 216387798b3SRob Herringplat-$(CONFIG_ARCH_OMAP) += omap 217387798b3SRob Herringplat-$(CONFIG_ARCH_S3C64XX) += samsung 218aa42587aSTomasz Figaplat-$(CONFIG_ARCH_S5PV210) += samsung 219387798b3SRob Herringplat-$(CONFIG_PLAT_IOP) += iop 220387798b3SRob Herringplat-$(CONFIG_PLAT_ORION) += orion 221387798b3SRob Herringplat-$(CONFIG_PLAT_PXA) += pxa 22209ec1d7eSKukjin Kimplat-$(CONFIG_PLAT_S3C24XX) += samsung 223387798b3SRob Herringplat-$(CONFIG_PLAT_VERSATILE) += versatile 2241da177e4SLinus Torvalds 2251da177e4SLinus Torvaldsifeq ($(CONFIG_ARCH_EBSA110),y) 2261da177e4SLinus Torvalds# This is what happens if you forget the IOCS16 line. 2271da177e4SLinus Torvalds# PCMCIA cards stop working. 2281da177e4SLinus TorvaldsCFLAGS_3c589_cs.o :=-DISA_SIXTEEN_BIT_PERIPHERAL 2291da177e4SLinus Torvaldsexport CFLAGS_3c589_cs.o 2301da177e4SLinus Torvaldsendif 2311da177e4SLinus Torvalds 2329d4f13e5SRussell King# The byte offset of the kernel image in RAM from the start of RAM. 2339d4f13e5SRussell KingTEXT_OFFSET := $(textofs-y) 2341da177e4SLinus Torvalds 235f44f82e8SRussell King# The first directory contains additional information for the boot setup code 2361da177e4SLinus Torvaldsifneq ($(machine-y),) 237f44f82e8SRussell KingMACHINE := arch/arm/mach-$(word 1,$(machine-y))/ 2381da177e4SLinus Torvaldselse 2391da177e4SLinus TorvaldsMACHINE := 2401da177e4SLinus Torvaldsendif 241387798b3SRob Herringifeq ($(CONFIG_ARCH_MULTIPLATFORM),y) 242387798b3SRob HerringMACHINE := 243387798b3SRob Herringendif 2441da177e4SLinus Torvalds 245f44f82e8SRussell Kingmachdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) 246aa42587aSTomasz Figaplatdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y))) 247f44f82e8SRussell King 248387798b3SRob Herringifneq ($(CONFIG_ARCH_MULTIPLATFORM),y) 249f44f82e8SRussell Kingifeq ($(KBUILD_SRC),) 250f44f82e8SRussell KingKBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs) $(platdirs)) 251f44f82e8SRussell Kingelse 252f44f82e8SRussell KingKBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs)) 253f44f82e8SRussell Kingendif 254387798b3SRob Herringendif 255f44f82e8SRussell King 256f8c07de6SHyok S. Choiexport TEXT_OFFSET GZFLAGS MMUEXT 2571da177e4SLinus Torvalds 2581da177e4SLinus Torvalds# Do we have FASTFPE? 2591da177e4SLinus TorvaldsFASTFPE :=arch/arm/fastfpe 2601da177e4SLinus Torvaldsifeq ($(FASTFPE),$(wildcard $(FASTFPE))) 2611da177e4SLinus TorvaldsFASTFPE_OBJ :=$(FASTFPE)/ 2621da177e4SLinus Torvaldsendif 2631da177e4SLinus Torvalds 2641da177e4SLinus Torvaldscore-$(CONFIG_FPE_NWFPE) += arch/arm/nwfpe/ 2651da177e4SLinus Torvaldscore-$(CONFIG_FPE_FASTFPE) += $(FASTFPE_OBJ) 2661da177e4SLinus Torvaldscore-$(CONFIG_VFP) += arch/arm/vfp/ 2674c071ee5SStefano Stabellinicore-$(CONFIG_XEN) += arch/arm/xen/ 268749cf76cSChristoffer Dallcore-$(CONFIG_KVM_ARM_HOST) += arch/arm/kvm/ 269e5b61debSNathan Lynchcore-$(CONFIG_VDSO) += arch/arm/vdso/ 2701da177e4SLinus Torvalds 271c62d0f2aSNicolas Pitre# If we have a machine-specific directory, then include it in the build. 272c62d0f2aSNicolas Pitrecore-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/ 273fca08f32SWang Nancore-y += arch/arm/probes/ 274ddecdfceSMircea Gherzancore-y += arch/arm/net/ 275f0be44f4SDavid McCulloughcore-y += arch/arm/crypto/ 276d9a1beaaSAlexandre Courbotcore-y += arch/arm/firmware/ 277c62d0f2aSNicolas Pitrecore-y += $(machdirs) $(platdirs) 278c62d0f2aSNicolas Pitre 2791da177e4SLinus Torvaldsdrivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ 2801da177e4SLinus Torvalds 28130c2f90bSNicolas Pitrelibs-y := arch/arm/lib/ $(libs-y) 2821da177e4SLinus Torvalds 2831da177e4SLinus Torvalds# Default target when executing plain make 2841da177e4SLinus Torvaldsifeq ($(CONFIG_XIP_KERNEL),y) 28551342d71SRussell KingKBUILD_IMAGE := xipImage 2861da177e4SLinus Torvaldselse 28751342d71SRussell KingKBUILD_IMAGE := zImage 2881da177e4SLinus Torvaldsendif 2891da177e4SLinus Torvalds 290e50a622dSAndrew Lunn# Build the DT binary blobs if we have OF configured 291e50a622dSAndrew Lunnifeq ($(CONFIG_USE_OF),y) 292e50a622dSAndrew LunnKBUILD_DTBS := dtbs 293e50a622dSAndrew Lunnendif 294e50a622dSAndrew Lunn 295e50a622dSAndrew Lunnall: $(KBUILD_IMAGE) $(KBUILD_DTBS) 29651342d71SRussell King 2971da177e4SLinus Torvaldsboot := arch/arm/boot 2981da177e4SLinus Torvalds 29966206536SSam Ravnborgarchprepare: 30066206536SSam Ravnborg $(Q)$(MAKE) $(build)=arch/arm/tools include/generated/mach-types.h 3011da177e4SLinus Torvalds 3021da177e4SLinus Torvalds# Convert bzImage to zImage 3031da177e4SLinus TorvaldsbzImage: zImage 3041da177e4SLinus Torvalds 30519514fc6SRobert RichterBOOT_TARGETS = zImage Image xipImage bootpImage uImage 30619514fc6SRobert RichterINSTALL_TARGETS = zinstall uinstall install 30719514fc6SRobert Richter 30819514fc6SRobert RichterPHONY += bzImage $(BOOT_TARGETS) $(INSTALL_TARGETS) 30919514fc6SRobert Richter 31019514fc6SRobert Richter$(BOOT_TARGETS): vmlinux 3111da177e4SLinus Torvalds $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ 3121da177e4SLinus Torvalds 31319514fc6SRobert Richter$(INSTALL_TARGETS): 3141da177e4SLinus Torvalds $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ 3151da177e4SLinus Torvalds 31681793babSDouglas Anderson%.dtb: | scripts 317499cd829SGrant Likely $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@ 3185fd1a2edSRob Herring 319f4d4ffc0SJason CooperPHONY += dtbs dtbs_install 3209fb5e537SRobert Richter 3219fb5e537SRobert Richterdtbs: prepare scripts 3226f889d8bSRobert Richter $(Q)$(MAKE) $(build)=$(boot)/dts 3235fd1a2edSRob Herring 3249fb5e537SRobert Richterdtbs_install: 3256f889d8bSRobert Richter $(Q)$(MAKE) $(dtbinst)=$(boot)/dts 3269fb5e537SRobert Richter 327e5b61debSNathan LynchPHONY += vdso_install 328e5b61debSNathan Lynchvdso_install: 329e5b61debSNathan Lynchifeq ($(CONFIG_VDSO),y) 330e5b61debSNathan Lynch $(Q)$(MAKE) $(build)=arch/arm/vdso $@ 331e5b61debSNathan Lynchendif 332e5b61debSNathan Lynch 3331da177e4SLinus Torvalds# We use MRPROPER_FILES and CLEAN_FILES now 3341da177e4SLinus Torvaldsarchclean: 3351da177e4SLinus Torvalds $(Q)$(MAKE) $(clean)=$(boot) 3361da177e4SLinus Torvalds 3371da177e4SLinus Torvalds# My testing targets (bypasses dependencies) 3381da177e4SLinus Torvaldsbp:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/bootpImage 3391da177e4SLinus Torvaldsi zi:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ 3401da177e4SLinus Torvalds 3411da177e4SLinus Torvalds 3421da177e4SLinus Torvaldsdefine archhelp 3431da177e4SLinus Torvalds echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' 3441da177e4SLinus Torvalds echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' 3451da177e4SLinus Torvalds echo '* xipImage - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)' 346a4f14bacSUwe Kleine-König echo ' uImage - U-Boot wrapped zImage' 3471da177e4SLinus Torvalds echo ' bootpImage - Combined zImage and initial RAM disk' 3481da177e4SLinus Torvalds echo ' (supply initrd image via make variable INITRD=<path>)' 349e50a622dSAndrew Lunn echo '* dtbs - Build device tree blobs for enabled boards' 350f4d4ffc0SJason Cooper echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)' 3511da177e4SLinus Torvalds echo ' install - Install uncompressed kernel' 3521da177e4SLinus Torvalds echo ' zinstall - Install compressed kernel' 353a65d2922SRussell King echo ' uinstall - Install U-Boot wrapped compressed kernel' 354caa27b66SSam Ravnborg echo ' Install using (your) ~/bin/$(INSTALLKERNEL) or' 355caa27b66SSam Ravnborg echo ' (distribution) /sbin/$(INSTALLKERNEL) or' 3561da177e4SLinus Torvalds echo ' install to $$(INSTALL_PATH) and run lilo' 357e5b61debSNathan Lynch echo ' vdso_install - Install unstripped vdso.so to $$(INSTALL_MOD_PATH)/vdso' 3581da177e4SLinus Torvaldsendef 359