xref: /linux/arch/arm/Makefile (revision 8c7d29a75397198154f66541c2af18a8feccac42)
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
130cda9bc1SNathan ChancellorLDFLAGS_vmlinux	:= --no-undefined -X --pic-veneer -z norelro
1426584853SCatalin Marinasifeq ($(CONFIG_CPU_ENDIAN_BE8),y)
1526584853SCatalin MarinasLDFLAGS_vmlinux	+= --be8
16336303aeSCao jinKBUILD_LDFLAGS_MODULE	+= --be8
1726584853SCatalin Marinasendif
1851b563fcSSam Ravnborg
191da177e4SLinus TorvaldsGZFLAGS		:=-9
20a0f97e06SSam Ravnborg#KBUILD_CFLAGS	+=-pipe
211da177e4SLinus Torvalds
22bd365591SMichal Marek# Never generate .eh_frame
23bd365591SMichal MarekKBUILD_CFLAGS	+= $(call cc-option,-fno-dwarf2-cfi-asm)
24bd365591SMichal Marek
2532872c04SArnd Bergmann# This should work on most of the modern platforms
2632872c04SArnd BergmannKBUILD_DEFCONFIG := multi_v7_defconfig
271da177e4SLinus Torvalds
283dbda77eSUwe Kleine-Koenig# defines filename extension depending memory management type.
29f8c07de6SHyok S. Choiifeq ($(CONFIG_MMU),)
30f8c07de6SHyok S. ChoiMMUEXT		:= -nommu
31e91b36efSWill DeaconKBUILD_CFLAGS	+= $(call cc-option,-mno-unaligned-access)
32f8c07de6SHyok S. Choiendif
33f8c07de6SHyok S. Choi
341da177e4SLinus Torvaldsifeq ($(CONFIG_FRAME_POINTER),y)
356dc5fd93SNathan HuckleberryKBUILD_CFLAGS	+=-fno-omit-frame-pointer
366dc5fd93SNathan Huckleberryifeq ($(CONFIG_CC_IS_GCC),y)
376dc5fd93SNathan HuckleberryKBUILD_CFLAGS += -mapcs -mno-sched-prolog
386dc5fd93SNathan Huckleberryendif
391da177e4SLinus Torvaldsendif
401da177e4SLinus Torvalds
411da177e4SLinus Torvaldsifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
4206c5040cSSam RavnborgKBUILD_CPPFLAGS	+= -mbig-endian
43ff0c6eecSLuc Van OostenryckCHECKFLAGS	+= -D__ARMEB__
44d503ac53SMasahiro YamadaKBUILD_LDFLAGS	+= -EB
451da177e4SLinus Torvaldselse
4606c5040cSSam RavnborgKBUILD_CPPFLAGS	+= -mlittle-endian
47ff0c6eecSLuc Van OostenryckCHECKFLAGS	+= -D__ARMEL__
48d503ac53SMasahiro YamadaKBUILD_LDFLAGS	+= -EL
491da177e4SLinus Torvaldsendif
501da177e4SLinus Torvalds
51a077224fSArd Biesheuvel#
52a077224fSArd Biesheuvel# The Scalar Replacement of Aggregates (SRA) optimization pass in GCC 4.9 and
53a077224fSArd Biesheuvel# later may result in code being generated that handles signed short and signed
54a077224fSArd Biesheuvel# char struct members incorrectly. So disable it.
55a077224fSArd Biesheuvel# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932)
56a077224fSArd Biesheuvel#
57a077224fSArd BiesheuvelKBUILD_CFLAGS	+= $(call cc-option,-fno-ipa-sra)
58a077224fSArd Biesheuvel
591da177e4SLinus Torvalds# This selects which instruction set is used.
601da177e4SLinus Torvalds# Note that GCC does not numerically define an architecture version
611da177e4SLinus Torvalds# macro, but instead defines a whole series of macros which makes
621da177e4SLinus Torvalds# testing for a specific architecture or later rather impossible.
63418ace99SArnd Bergmannarch-$(CONFIG_CPU_32v7M)	=-D__LINUX_ARM_ARCH__=7 -march=armv7-m
64418ace99SArnd Bergmannarch-$(CONFIG_CPU_32v7)		=-D__LINUX_ARM_ARCH__=7 -march=armv7-a
65418ace99SArnd Bergmannarch-$(CONFIG_CPU_32v6)		=-D__LINUX_ARM_ARCH__=6 -march=armv6
6623688e99SCatalin Marinas# Only override the compiler option if ARMv6. The ARMv6K extensions are
6723688e99SCatalin Marinas# always available in ARMv7
6823688e99SCatalin Marinasifeq ($(CONFIG_CPU_32v6),y)
69418ace99SArnd Bergmannarch-$(CONFIG_CPU_32v6K)	=-D__LINUX_ARM_ARCH__=6 -march=armv6k
7023688e99SCatalin Marinasendif
71418ace99SArnd Bergmannarch-$(CONFIG_CPU_32v5)		=-D__LINUX_ARM_ARCH__=5 -march=armv5te
721b21376aSDouglas Andersonarch-$(CONFIG_CPU_32v4T)	=-D__LINUX_ARM_ARCH__=4 -march=armv4t
731b21376aSDouglas Andersonarch-$(CONFIG_CPU_32v4)		=-D__LINUX_ARM_ARCH__=4 -march=armv4
748403bcb7SJason A. Donenfeldarch-$(CONFIG_CPU_32v3)		=-D__LINUX_ARM_ARCH__=3 -march=armv3m
751b21376aSDouglas Anderson
761b21376aSDouglas Anderson# Evaluate arch cc-option calls now
771b21376aSDouglas Andersonarch-y := $(arch-y)
781da177e4SLinus Torvalds
791da177e4SLinus Torvalds# This selects how we optimise for the processor.
801b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM7TDMI)	=-mtune=arm7tdmi
811b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM720T)	=-mtune=arm7tdmi
821b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM740T)	=-mtune=arm7tdmi
831b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM9TDMI)	=-mtune=arm9tdmi
841b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM940T)	=-mtune=arm9tdmi
85418ace99SArnd Bergmanntune-$(CONFIG_CPU_ARM946E)	=-mtune=arm9e
861b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM920T)	=-mtune=arm9tdmi
871b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM922T)	=-mtune=arm9tdmi
881b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM925T)	=-mtune=arm9tdmi
891b21376aSDouglas Andersontune-$(CONFIG_CPU_ARM926T)	=-mtune=arm9tdmi
901b21376aSDouglas Andersontune-$(CONFIG_CPU_FA526)	=-mtune=arm9tdmi
911b21376aSDouglas Andersontune-$(CONFIG_CPU_SA110)	=-mtune=strongarm110
921b21376aSDouglas Andersontune-$(CONFIG_CPU_SA1100)	=-mtune=strongarm1100
93418ace99SArnd Bergmanntune-$(CONFIG_CPU_XSCALE)	=-mtune=xscale
94418ace99SArnd Bergmanntune-$(CONFIG_CPU_XSC3)		=-mtune=xscale
95418ace99SArnd Bergmanntune-$(CONFIG_CPU_FEROCEON)	=-mtune=xscale
96418ace99SArnd Bergmanntune-$(CONFIG_CPU_V6)		=-mtune=arm1136j-s
97418ace99SArnd Bergmanntune-$(CONFIG_CPU_V6K)		=-mtune=arm1136j-s
981b21376aSDouglas Anderson
991b21376aSDouglas Anderson# Evaluate tune cc-option calls now
1001b21376aSDouglas Andersontune-y := $(tune-y)
1011da177e4SLinus Torvalds
102704bdda0SNicolas Pitreifeq ($(CONFIG_AEABI),y)
10322905a24SStefan AgnerCFLAGS_ABI	:=-mabi=aapcs-linux -mfpu=vfp
104704bdda0SNicolas Pitreelse
105c28a814fSCatalin MarinasCFLAGS_ABI	:=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,)
106704bdda0SNicolas Pitreendif
107704bdda0SNicolas Pitre
108adf8b37bSCatalin Marinasifeq ($(CONFIG_ARM_UNWIND),y)
109adf8b37bSCatalin MarinasCFLAGS_ABI	+=-funwind-tables
110adf8b37bSCatalin Marinasendif
111adf8b37bSCatalin Marinas
112b0fe66cfSNathan Chancellorifeq ($(CONFIG_CC_IS_CLANG),y)
113b0fe66cfSNathan ChancellorCFLAGS_ABI	+= -meabi gnu
114b0fe66cfSNathan Chancellorendif
115b0fe66cfSNathan Chancellor
11650596b75SArd Biesheuvelifeq ($(CONFIG_CURRENT_POINTER_IN_TPIDRURO),y)
11750596b75SArd BiesheuvelCFLAGS_ABI	+= -mtp=cp15
11850596b75SArd Biesheuvelendif
11950596b75SArd Biesheuvel
12075fea300SNicolas Pitre# Accept old syntax despite ".syntax unified"
12175fea300SNicolas PitreAFLAGS_NOWARN	:=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W)
12275fea300SNicolas Pitre
12316c79651SCatalin Marinasifeq ($(CONFIG_THUMB2_KERNEL),y)
124b752bb40SRussell KingCFLAGS_ISA	:=-mthumb -Wa,-mimplicit-it=always $(AFLAGS_NOWARN)
12591802a8eSArnd BergmannAFLAGS_ISA	:=$(CFLAGS_ISA) -Wa$(comma)-mthumb
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.
14283dfeedbSRussell King# Note: the 32kB below this value is reserved for use by the kernel
14383dfeedbSRussell King# during boot, and this offset is critical to the functioning of
14483dfeedbSRussell King# kexec-tools.
1459d4f13e5SRussell Kingtextofs-y	:= 0x00008000
146c4761b69SVasily Khoruzhick# We don't want the htc bootloader to corrupt kernel during resume
147c4761b69SVasily Khoruzhicktextofs-$(CONFIG_PM_H1940)      := 0x00108000
14886aeee4dSAndreas Färber# RTD1195 has Boot ROM at start of address space
14986aeee4dSAndreas Färbertextofs-$(CONFIG_ARCH_REALTEK)  := 0x00108000
1501da177e4SLinus Torvalds# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory
151b4175b89SRussell Kingifeq ($(CONFIG_ARCH_SA1100),y)
1529d4f13e5SRussell Kingtextofs-$(CONFIG_SA1111) := 0x00208000
1531da177e4SLinus Torvaldsendif
154f125e2d4SChristian Lampartertextofs-$(CONFIG_ARCH_IPQ40XX) := 0x00208000
1559e775ad1SStephen Boydtextofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000
1569e775ad1SStephen Boydtextofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
157d850f3e5SMartin Blumenstingltextofs-$(CONFIG_ARCH_MESON) := 0x00208000
1581d22924eSAnders Bergtextofs-$(CONFIG_ARCH_AXXIA) := 0x00308000
159b4175b89SRussell King
160b4175b89SRussell King# Machine directory name.  This list is sorted alphanumerically
161b4175b89SRussell King# by CONFIG_* macro name.
1626bb8536cSAndreas Färbermachine-$(CONFIG_ARCH_ACTIONS)		+= actions
1632cf1c348SJohn Crispinmachine-$(CONFIG_ARCH_AIROHA)		+= airoha
164445d9b30STsahee Zidenbergmachine-$(CONFIG_ARCH_ALPINE)		+= alpine
165590b460cSLars Perssonmachine-$(CONFIG_ARCH_ARTPEC)		+= artpec
16687dfe496SJoel Stanleymachine-$(CONFIG_ARCH_ASPEED)           += aspeed
167387798b3SRob Herringmachine-$(CONFIG_ARCH_AT91)		+= at91
1681d22924eSAnders Bergmachine-$(CONFIG_ARCH_AXXIA)		+= axxia
1698ac49e04SChristian Daudtmachine-$(CONFIG_ARCH_BCM)		+= bcm
1701c37fa10SSebastian Hesselbarthmachine-$(CONFIG_ARCH_BERLIN)		+= berlin
171387798b3SRob Herringmachine-$(CONFIG_ARCH_CLPS711X)		+= clps711x
172387798b3SRob Herringmachine-$(CONFIG_ARCH_CNS3XXX)		+= cns3xxx
173387798b3SRob Herringmachine-$(CONFIG_ARCH_DAVINCI)		+= davinci
17416083d45SBaruch Siachmachine-$(CONFIG_ARCH_DIGICOLOR)	+= digicolor
175387798b3SRob Herringmachine-$(CONFIG_ARCH_DOVE)		+= dove
176387798b3SRob Herringmachine-$(CONFIG_ARCH_EP93XX)		+= ep93xx
1776eddacaeSRussell Kingmachine-$(CONFIG_ARCH_EXYNOS)		+= exynos
178c3c963e1SUwe Kleine-Königmachine-$(CONFIG_ARCH_FOOTBRIDGE)	+= footbridge
179387798b3SRob Herringmachine-$(CONFIG_ARCH_GEMINI)		+= gemini
180387798b3SRob Herringmachine-$(CONFIG_ARCH_HIGHBANK)		+= highbank
1817685b125SHaojian Zhuangmachine-$(CONFIG_ARCH_HISI)		+= hisi
18211d89440SNick Hawkinsmachine-$(CONFIG_ARCH_HPE)		+= hpe
183387798b3SRob Herringmachine-$(CONFIG_ARCH_IOP32X)		+= iop32x
184387798b3SRob Herringmachine-$(CONFIG_ARCH_IXP4XX)		+= ixp4xx
1856eddacaeSRussell Kingmachine-$(CONFIG_ARCH_KEYSTONE)		+= keystone
186e8d235d4SJoachim Eastwoodmachine-$(CONFIG_ARCH_LPC18XX)		+= lpc18xx
187387798b3SRob Herringmachine-$(CONFIG_ARCH_LPC32XX)		+= lpc32xx
1883b8f5030SCarlo Caionemachine-$(CONFIG_ARCH_MESON)		+= meson
189387798b3SRob Herringmachine-$(CONFIG_ARCH_MMP)		+= mmp
19017723fd3SJonas Jensenmachine-$(CONFIG_ARCH_MOXART)		+= moxart
191387798b3SRob Herringmachine-$(CONFIG_ARCH_MV78XX0)		+= mv78xx0
1926eddacaeSRussell Kingmachine-$(CONFIG_ARCH_MVEBU)		+= mvebu
193387798b3SRob Herringmachine-$(CONFIG_ARCH_MXC)		+= imx
194f682a218SMatthias Bruggermachine-$(CONFIG_ARCH_MEDIATEK)		+= mediatek
1959fb29c73SSugaya Taichimachine-$(CONFIG_ARCH_MILBEAUT)		+= milbeaut
196387798b3SRob Herringmachine-$(CONFIG_ARCH_MXS)		+= mxs
197312b62b6SDaniel Palmermachine-$(CONFIG_ARCH_MSTARV7)		+= mstar
198387798b3SRob Herringmachine-$(CONFIG_ARCH_NOMADIK)		+= nomadik
1997bffa14cSBrendan Higginsmachine-$(CONFIG_ARCH_NPCM)		+= npcm
2009851ca57SDaniel Tangmachine-$(CONFIG_ARCH_NSPIRE)		+= nspire
201e330ea5eSNeil Armstrongmachine-$(CONFIG_ARCH_OXNAS)		+= oxnas
202387798b3SRob Herringmachine-$(CONFIG_ARCH_OMAP1)		+= omap1
203387798b3SRob Herringmachine-$(CONFIG_ARCH_OMAP2PLUS)	+= omap2
204387798b3SRob Herringmachine-$(CONFIG_ARCH_ORION5X)		+= orion5x
205387798b3SRob Herringmachine-$(CONFIG_ARCH_PXA)		+= pxa
2068fc1b0f8SKumar Galamachine-$(CONFIG_ARCH_QCOM)		+= qcom
20778e3dbc1SAndreas Färbermachine-$(CONFIG_ARCH_RDA)		+= rda
20886aeee4dSAndreas Färbermachine-$(CONFIG_ARCH_REALTEK)		+= realtek
209d63dc051SHeiko Stuebnermachine-$(CONFIG_ARCH_ROCKCHIP)		+= rockchip
210387798b3SRob Herringmachine-$(CONFIG_ARCH_RPC)		+= rpc
21171b9114dSArnd Bergmannmachine-$(CONFIG_PLAT_SAMSUNG)		+= s3c
212387798b3SRob Herringmachine-$(CONFIG_ARCH_S5PV210)		+= s5pv210
213387798b3SRob Herringmachine-$(CONFIG_ARCH_SA1100)		+= sa1100
214d9be9cebSGeert Uytterhoevenmachine-$(CONFIG_ARCH_RENESAS)	 	+= shmobile
215910499e1SKrzysztof Kozlowskimachine-$(CONFIG_ARCH_INTEL_SOCFPGA)	+= socfpga
2166eddacaeSRussell Kingmachine-$(CONFIG_ARCH_STI)		+= sti
2179b799b78SMaxime Coquelinmachine-$(CONFIG_ARCH_STM32)		+= stm32
2180aa94eeaSQin Jianmachine-$(CONFIG_ARCH_SUNPLUS)		+= sunplus
2196eddacaeSRussell Kingmachine-$(CONFIG_ARCH_SUNXI)		+= sunxi
220387798b3SRob Herringmachine-$(CONFIG_ARCH_TEGRA)		+= tegra
221387798b3SRob Herringmachine-$(CONFIG_ARCH_U8500)		+= ux500
222387798b3SRob Herringmachine-$(CONFIG_ARCH_VT8500)		+= vt8500
223387798b3SRob Herringmachine-$(CONFIG_ARCH_ZYNQ)		+= zynq
224d7445676SArnd Bergmannmachine-$(CONFIG_PLAT_VERSATILE)	+= versatile
2256eddacaeSRussell Kingmachine-$(CONFIG_PLAT_SPEAR)		+= spear
226b4175b89SRussell King
227*8c7d29a7SArnd Bergmann# legacy platforms provide their own mach/*.h headers globally,
228*8c7d29a7SArnd Bergmann# these three are mutually exclusive
229*8c7d29a7SArnd Bergmannmachdirs-$(CONFIG_ARCH_FOOTBRIDGE)	+= arch/arm/mach-footbridge
230*8c7d29a7SArnd Bergmannmachdirs-$(CONFIG_ARCH_RPC)		+= arch/arm/mach-rpc
231*8c7d29a7SArnd Bergmannmachdirs-$(CONFIG_ARCH_SA1100)		+= arch/arm/mach-sa1100
232*8c7d29a7SArnd BergmannKBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%/include,$(machdirs-y))
2331da177e4SLinus Torvalds
2349d4f13e5SRussell King# The byte offset of the kernel image in RAM from the start of RAM.
2359d4f13e5SRussell KingTEXT_OFFSET := $(textofs-y)
2361da177e4SLinus Torvalds
237f8c07de6SHyok S. Choiexport	TEXT_OFFSET GZFLAGS MMUEXT
2381da177e4SLinus Torvalds
239c62d0f2aSNicolas Pitre# If we have a machine-specific directory, then include it in the build.
240*8c7d29a7SArnd Bergmanncore-y				+= $(patsubst %,arch/arm/mach-%/,$(machine-y))
2412a58e142SMasahiro Yamada# For cleaning
2422a58e142SMasahiro Yamadacore-				+= $(patsubst %,arch/arm/mach-%/,$(machine-))
243*8c7d29a7SArnd Bergmann
244*8c7d29a7SArnd Bergmanncore-$(CONFIG_PLAT_ORION)	+= arch/arm/plat-orion/
2452a58e142SMasahiro Yamada
24630c2f90bSNicolas Pitrelibs-y				:= arch/arm/lib/ $(libs-y)
2471da177e4SLinus Torvalds
2481da177e4SLinus Torvalds# Default target when executing plain make
249152e6744SMichal Marekboot := arch/arm/boot
2501da177e4SLinus Torvaldsifeq ($(CONFIG_XIP_KERNEL),y)
251152e6744SMichal MarekKBUILD_IMAGE := $(boot)/xipImage
2521da177e4SLinus Torvaldselse
253152e6744SMichal MarekKBUILD_IMAGE := $(boot)/zImage
2541da177e4SLinus Torvaldsendif
2551da177e4SLinus Torvalds
256189af465SArd Biesheuvelifeq ($(CONFIG_STACKPROTECTOR_PER_TASK),y)
257189af465SArd Biesheuvelprepare: stack_protector_prepare
258f05eb1d2SArd Biesheuvelifeq ($(CONFIG_CC_HAVE_STACKPROTECTOR_TLS),y)
259f05eb1d2SArd Biesheuvelstack_protector_prepare: prepare0
260f05eb1d2SArd Biesheuvel	$(eval KBUILD_CFLAGS += \
261f05eb1d2SArd Biesheuvel		-mstack-protector-guard=tls \
262f05eb1d2SArd Biesheuvel		-mstack-protector-guard-offset=$(shell	\
263f05eb1d2SArd Biesheuvel			awk '{if ($$2 == "TSK_STACK_CANARY") print $$3;}'\
264f05eb1d2SArd Biesheuvel				include/generated/asm-offsets.h))
265f05eb1d2SArd Biesheuvelelse
266189af465SArd Biesheuvelstack_protector_prepare: prepare0
26789604523SArd Biesheuvel	$(eval SSP_PLUGIN_CFLAGS := \
268189af465SArd Biesheuvel		-fplugin-arg-arm_ssp_per_task_plugin-offset=$(shell	\
269dfbdcda2SArd Biesheuvel			awk '{if ($$2 == "TSK_STACK_CANARY") print $$3;}'\
270189af465SArd Biesheuvel				include/generated/asm-offsets.h))
27189604523SArd Biesheuvel	$(eval KBUILD_CFLAGS += $(SSP_PLUGIN_CFLAGS))
27289604523SArd Biesheuvel	$(eval GCC_PLUGINS_CFLAGS += $(SSP_PLUGIN_CFLAGS))
273189af465SArd Biesheuvelendif
274f05eb1d2SArd Biesheuvelendif
275189af465SArd Biesheuvel
27637c8a5faSRob Herringall:	$(notdir $(KBUILD_IMAGE))
27751342d71SRussell King
2781da177e4SLinus Torvalds
27996a8fae0SRussell Kingarchheaders:
28096a8fae0SRussell King	$(Q)$(MAKE) $(build)=arch/arm/tools uapi
28196a8fae0SRussell King
28266206536SSam Ravnborgarchprepare:
2834e2648dbSRussell King	$(Q)$(MAKE) $(build)=arch/arm/tools kapi
2841da177e4SLinus Torvalds
2851da177e4SLinus Torvalds# Convert bzImage to zImage
2861da177e4SLinus TorvaldsbzImage: zImage
2871da177e4SLinus Torvalds
28819514fc6SRobert RichterBOOT_TARGETS	= zImage Image xipImage bootpImage uImage
28919514fc6SRobert RichterINSTALL_TARGETS	= zinstall uinstall install
29019514fc6SRobert Richter
29119514fc6SRobert RichterPHONY += bzImage $(BOOT_TARGETS) $(INSTALL_TARGETS)
29219514fc6SRobert Richter
2933939f334SMasahiro YamadabootpImage uImage: zImage
2943939f334SMasahiro YamadazImage: Image
2953939f334SMasahiro Yamada
29619514fc6SRobert Richter$(BOOT_TARGETS): vmlinux
29792481c7dSArnd Bergmann	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
298c6bbfbb7SMasahiro Yamada	@$(kecho) '  Kernel: $(boot)/$@ is ready'
2991da177e4SLinus Torvalds
300f774f5bbSMasahiro Yamada$(INSTALL_TARGETS): KBUILD_IMAGE = $(boot)/$(patsubst %install,%Image,$@)
30119514fc6SRobert Richter$(INSTALL_TARGETS):
302f774f5bbSMasahiro Yamada	$(call cmd,install)
3031da177e4SLinus Torvalds
304e5b61debSNathan LynchPHONY += vdso_install
305e5b61debSNathan Lynchvdso_install:
306e5b61debSNathan Lynchifeq ($(CONFIG_VDSO),y)
307e5b61debSNathan Lynch	$(Q)$(MAKE) $(build)=arch/arm/vdso $@
308e5b61debSNathan Lynchendif
309e5b61debSNathan Lynch
3101da177e4SLinus Torvalds# My testing targets (bypasses dependencies)
31192481c7dSArnd Bergmannbp:;	$(Q)$(MAKE) $(build)=$(boot) $(boot)/bootpImage
3121da177e4SLinus Torvalds
3131da177e4SLinus Torvalds
3141da177e4SLinus Torvaldsdefine archhelp
3151da177e4SLinus Torvalds  echo  '* zImage        - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
3161da177e4SLinus Torvalds  echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
3171da177e4SLinus Torvalds  echo  '* xipImage      - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)'
318a4f14bacSUwe Kleine-König  echo  '  uImage        - U-Boot wrapped zImage'
3191da177e4SLinus Torvalds  echo  '  bootpImage    - Combined zImage and initial RAM disk'
3201da177e4SLinus Torvalds  echo  '                  (supply initrd image via make variable INITRD=<path>)'
3211da177e4SLinus Torvalds  echo  '  install       - Install uncompressed kernel'
3221da177e4SLinus Torvalds  echo  '  zinstall      - Install compressed kernel'
323a65d2922SRussell King  echo  '  uinstall      - Install U-Boot wrapped compressed kernel'
324caa27b66SSam Ravnborg  echo  '                  Install using (your) ~/bin/$(INSTALLKERNEL) or'
325caa27b66SSam Ravnborg  echo  '                  (distribution) /sbin/$(INSTALLKERNEL) or'
3261da177e4SLinus Torvalds  echo  '                  install to $$(INSTALL_PATH) and run lilo'
327e5b61debSNathan Lynch  echo  '  vdso_install  - Install unstripped vdso.so to $$(INSTALL_MOD_PATH)/vdso'
3281da177e4SLinus Torvaldsendef
329