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 253d47ff25SBen Wolsieffer# Disable FDPIC ABI 263d47ff25SBen WolsiefferKBUILD_CFLAGS += $(call cc-option,-mno-fdpic) 273d47ff25SBen Wolsieffer 2832872c04SArnd Bergmann# This should work on most of the modern platforms 2932872c04SArnd BergmannKBUILD_DEFCONFIG := multi_v7_defconfig 301da177e4SLinus Torvalds 313dbda77eSUwe Kleine-Koenig# defines filename extension depending memory management type. 32f8c07de6SHyok S. Choiifeq ($(CONFIG_MMU),) 33f8c07de6SHyok S. ChoiMMUEXT := -nommu 34e91b36efSWill DeaconKBUILD_CFLAGS += $(call cc-option,-mno-unaligned-access) 35f8c07de6SHyok S. Choiendif 36f8c07de6SHyok S. Choi 371da177e4SLinus Torvaldsifeq ($(CONFIG_FRAME_POINTER),y) 386dc5fd93SNathan HuckleberryKBUILD_CFLAGS +=-fno-omit-frame-pointer 396dc5fd93SNathan Huckleberryifeq ($(CONFIG_CC_IS_GCC),y) 406dc5fd93SNathan HuckleberryKBUILD_CFLAGS += -mapcs -mno-sched-prolog 416dc5fd93SNathan Huckleberryendif 421da177e4SLinus Torvaldsendif 431da177e4SLinus Torvalds 441da177e4SLinus Torvaldsifeq ($(CONFIG_CPU_BIG_ENDIAN),y) 4506c5040cSSam RavnborgKBUILD_CPPFLAGS += -mbig-endian 46ff0c6eecSLuc Van OostenryckCHECKFLAGS += -D__ARMEB__ 47d503ac53SMasahiro YamadaKBUILD_LDFLAGS += -EB 481da177e4SLinus Torvaldselse 4906c5040cSSam RavnborgKBUILD_CPPFLAGS += -mlittle-endian 50ff0c6eecSLuc Van OostenryckCHECKFLAGS += -D__ARMEL__ 51d503ac53SMasahiro 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. 66*5aa4860eSNick Desaulniersarch-$(CONFIG_CPU_32v7M) :=-D__LINUX_ARM_ARCH__=7 -march=armv7-m 67*5aa4860eSNick Desaulniersarch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 -march=armv7-a 68*5aa4860eSNick Desaulniersarch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 -march=armv6 69*5aa4860eSNick Desaulniers# Only override the compiler opt:ion if ARMv6. The ARMv6K extensions are 7023688e99SCatalin Marinas# always available in ARMv7 7123688e99SCatalin Marinasifeq ($(CONFIG_CPU_32v6),y) 72*5aa4860eSNick Desaulniersarch-$(CONFIG_CPU_32v6K) :=-D__LINUX_ARM_ARCH__=6 -march=armv6k 7323688e99SCatalin Marinasendif 74*5aa4860eSNick Desaulniersarch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 -march=armv5te 75*5aa4860eSNick Desaulniersarch-$(CONFIG_CPU_32v4T) :=-D__LINUX_ARM_ARCH__=4 -march=armv4t 76*5aa4860eSNick Desaulniersarch-$(CONFIG_CPU_32v4) :=-D__LINUX_ARM_ARCH__=4 -march=armv4 77*5aa4860eSNick Desaulniersarch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3m 781da177e4SLinus Torvalds 791da177e4SLinus Torvalds# This selects how we optimise for the processor. 80*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_ARM7TDMI) :=-mtune=arm7tdmi 81*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmi 82*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_ARM740T) :=-mtune=arm7tdmi 83*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_ARM9TDMI) :=-mtune=arm9tdmi 84*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_ARM940T) :=-mtune=arm9tdmi 85*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_ARM946E) :=-mtune=arm9e 86*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_ARM920T) :=-mtune=arm9tdmi 87*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_ARM922T) :=-mtune=arm9tdmi 88*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_ARM925T) :=-mtune=arm9tdmi 89*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_ARM926T) :=-mtune=arm9tdmi 90*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_FA526) :=-mtune=arm9tdmi 91*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110 92*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100 93*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_XSCALE) :=-mtune=xscale 94*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_XSC3) :=-mtune=xscale 95*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_FEROCEON) :=-mtune=xscale 96*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_V6) :=-mtune=arm1136j-s 97*5aa4860eSNick Desaulnierstune-$(CONFIG_CPU_V6K) :=-mtune=arm1136j-s 981da177e4SLinus Torvalds 99704bdda0SNicolas Pitreifeq ($(CONFIG_AEABI),y) 10022905a24SStefan AgnerCFLAGS_ABI :=-mabi=aapcs-linux -mfpu=vfp 101704bdda0SNicolas Pitreelse 102c28a814fSCatalin MarinasCFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,) 103704bdda0SNicolas Pitreendif 104704bdda0SNicolas Pitre 105adf8b37bSCatalin Marinasifeq ($(CONFIG_ARM_UNWIND),y) 106adf8b37bSCatalin MarinasCFLAGS_ABI +=-funwind-tables 107adf8b37bSCatalin Marinasendif 108adf8b37bSCatalin Marinas 109b0fe66cfSNathan Chancellorifeq ($(CONFIG_CC_IS_CLANG),y) 110b0fe66cfSNathan ChancellorCFLAGS_ABI += -meabi gnu 111b0fe66cfSNathan Chancellorendif 112b0fe66cfSNathan Chancellor 11350596b75SArd Biesheuvelifeq ($(CONFIG_CURRENT_POINTER_IN_TPIDRURO),y) 11450596b75SArd BiesheuvelCFLAGS_ABI += -mtp=cp15 11550596b75SArd Biesheuvelendif 11650596b75SArd Biesheuvel 11775fea300SNicolas Pitre# Accept old syntax despite ".syntax unified" 11875fea300SNicolas PitreAFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) 11975fea300SNicolas Pitre 12016c79651SCatalin Marinasifeq ($(CONFIG_THUMB2_KERNEL),y) 121b752bb40SRussell KingCFLAGS_ISA :=-mthumb -Wa,-mimplicit-it=always $(AFLAGS_NOWARN) 12291802a8eSArnd BergmannAFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb 12391802a8eSArnd Bergmannelse 12475fea300SNicolas PitreCFLAGS_ISA :=$(call cc-option,-marm,) $(AFLAGS_NOWARN) 12591802a8eSArnd BergmannAFLAGS_ISA :=$(CFLAGS_ISA) 12616c79651SCatalin Marinasendif 12716c79651SCatalin Marinas 128704bdda0SNicolas Pitre# Need -Uarm for gcc < 3.x 12991802a8eSArnd BergmannKBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 13091802a8eSArnd BergmannKBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float 1311da177e4SLinus Torvalds 1321f2f01b1SLuc Van OostenryckCHECKFLAGS += -D__arm__ 1331da177e4SLinus Torvalds 1341da177e4SLinus Torvalds#Default value 1355290dc29SThomas Gleixnerhead-y := arch/arm/kernel/head$(MMUEXT).o 13610508b20SDaniel Thompson 13710508b20SDaniel Thompson# Text offset. This list is sorted numerically by address in order to 13810508b20SDaniel Thompson# provide a means to avoid/resolve conflicts in multi-arch kernels. 13983dfeedbSRussell King# Note: the 32kB below this value is reserved for use by the kernel 14083dfeedbSRussell King# during boot, and this offset is critical to the functioning of 14183dfeedbSRussell King# kexec-tools. 1429d4f13e5SRussell Kingtextofs-y := 0x00008000 143c4761b69SVasily Khoruzhick# We don't want the htc bootloader to corrupt kernel during resume 144c4761b69SVasily Khoruzhicktextofs-$(CONFIG_PM_H1940) := 0x00108000 14586aeee4dSAndreas Färber# RTD1195 has Boot ROM at start of address space 14686aeee4dSAndreas Färbertextofs-$(CONFIG_ARCH_REALTEK) := 0x00108000 1471da177e4SLinus Torvalds# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory 148b4175b89SRussell Kingifeq ($(CONFIG_ARCH_SA1100),y) 1499d4f13e5SRussell Kingtextofs-$(CONFIG_SA1111) := 0x00208000 1501da177e4SLinus Torvaldsendif 151f125e2d4SChristian Lampartertextofs-$(CONFIG_ARCH_IPQ40XX) := 0x00208000 1529e775ad1SStephen Boydtextofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000 1539e775ad1SStephen Boydtextofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 154d850f3e5SMartin Blumenstingltextofs-$(CONFIG_ARCH_MESON) := 0x00208000 1551d22924eSAnders Bergtextofs-$(CONFIG_ARCH_AXXIA) := 0x00308000 156b4175b89SRussell King 157b4175b89SRussell King# Machine directory name. This list is sorted alphanumerically 158b4175b89SRussell King# by CONFIG_* macro name. 1596bb8536cSAndreas Färbermachine-$(CONFIG_ARCH_ACTIONS) += actions 1602cf1c348SJohn Crispinmachine-$(CONFIG_ARCH_AIROHA) += airoha 161445d9b30STsahee Zidenbergmachine-$(CONFIG_ARCH_ALPINE) += alpine 162590b460cSLars Perssonmachine-$(CONFIG_ARCH_ARTPEC) += artpec 16387dfe496SJoel Stanleymachine-$(CONFIG_ARCH_ASPEED) += aspeed 164387798b3SRob Herringmachine-$(CONFIG_ARCH_AT91) += at91 1651d22924eSAnders Bergmachine-$(CONFIG_ARCH_AXXIA) += axxia 1668ac49e04SChristian Daudtmachine-$(CONFIG_ARCH_BCM) += bcm 1671c37fa10SSebastian Hesselbarthmachine-$(CONFIG_ARCH_BERLIN) += berlin 168387798b3SRob Herringmachine-$(CONFIG_ARCH_CLPS711X) += clps711x 169387798b3SRob Herringmachine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx 170387798b3SRob Herringmachine-$(CONFIG_ARCH_DAVINCI) += davinci 17116083d45SBaruch Siachmachine-$(CONFIG_ARCH_DIGICOLOR) += digicolor 172387798b3SRob Herringmachine-$(CONFIG_ARCH_DOVE) += dove 173387798b3SRob Herringmachine-$(CONFIG_ARCH_EP93XX) += ep93xx 1746eddacaeSRussell Kingmachine-$(CONFIG_ARCH_EXYNOS) += exynos 175c3c963e1SUwe Kleine-Königmachine-$(CONFIG_ARCH_FOOTBRIDGE) += footbridge 176387798b3SRob Herringmachine-$(CONFIG_ARCH_GEMINI) += gemini 177387798b3SRob Herringmachine-$(CONFIG_ARCH_HIGHBANK) += highbank 1787685b125SHaojian Zhuangmachine-$(CONFIG_ARCH_HISI) += hisi 17911d89440SNick Hawkinsmachine-$(CONFIG_ARCH_HPE) += hpe 180387798b3SRob Herringmachine-$(CONFIG_ARCH_IOP32X) += iop32x 181387798b3SRob Herringmachine-$(CONFIG_ARCH_IXP4XX) += ixp4xx 1826eddacaeSRussell Kingmachine-$(CONFIG_ARCH_KEYSTONE) += keystone 183e8d235d4SJoachim Eastwoodmachine-$(CONFIG_ARCH_LPC18XX) += lpc18xx 184387798b3SRob Herringmachine-$(CONFIG_ARCH_LPC32XX) += lpc32xx 1853b8f5030SCarlo Caionemachine-$(CONFIG_ARCH_MESON) += meson 186387798b3SRob Herringmachine-$(CONFIG_ARCH_MMP) += mmp 18717723fd3SJonas Jensenmachine-$(CONFIG_ARCH_MOXART) += moxart 188387798b3SRob Herringmachine-$(CONFIG_ARCH_MV78XX0) += mv78xx0 1896eddacaeSRussell Kingmachine-$(CONFIG_ARCH_MVEBU) += mvebu 190387798b3SRob Herringmachine-$(CONFIG_ARCH_MXC) += imx 191f682a218SMatthias Bruggermachine-$(CONFIG_ARCH_MEDIATEK) += mediatek 1929fb29c73SSugaya Taichimachine-$(CONFIG_ARCH_MILBEAUT) += milbeaut 193387798b3SRob Herringmachine-$(CONFIG_ARCH_MXS) += mxs 194312b62b6SDaniel Palmermachine-$(CONFIG_ARCH_MSTARV7) += mstar 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_PXA) += pxa 2038fc1b0f8SKumar Galamachine-$(CONFIG_ARCH_QCOM) += qcom 20478e3dbc1SAndreas Färbermachine-$(CONFIG_ARCH_RDA) += rda 20586aeee4dSAndreas Färbermachine-$(CONFIG_ARCH_REALTEK) += realtek 206d63dc051SHeiko Stuebnermachine-$(CONFIG_ARCH_ROCKCHIP) += rockchip 207387798b3SRob Herringmachine-$(CONFIG_ARCH_RPC) += rpc 20871b9114dSArnd Bergmannmachine-$(CONFIG_PLAT_SAMSUNG) += s3c 209387798b3SRob Herringmachine-$(CONFIG_ARCH_S5PV210) += s5pv210 210387798b3SRob Herringmachine-$(CONFIG_ARCH_SA1100) += sa1100 211d9be9cebSGeert Uytterhoevenmachine-$(CONFIG_ARCH_RENESAS) += shmobile 212910499e1SKrzysztof Kozlowskimachine-$(CONFIG_ARCH_INTEL_SOCFPGA) += socfpga 2136eddacaeSRussell Kingmachine-$(CONFIG_ARCH_STI) += sti 2149b799b78SMaxime Coquelinmachine-$(CONFIG_ARCH_STM32) += stm32 2150aa94eeaSQin Jianmachine-$(CONFIG_ARCH_SUNPLUS) += sunplus 2166eddacaeSRussell Kingmachine-$(CONFIG_ARCH_SUNXI) += sunxi 217387798b3SRob Herringmachine-$(CONFIG_ARCH_TEGRA) += tegra 218387798b3SRob Herringmachine-$(CONFIG_ARCH_U8500) += ux500 219387798b3SRob Herringmachine-$(CONFIG_ARCH_VT8500) += vt8500 220387798b3SRob Herringmachine-$(CONFIG_ARCH_ZYNQ) += zynq 221d7445676SArnd Bergmannmachine-$(CONFIG_PLAT_VERSATILE) += versatile 2226eddacaeSRussell Kingmachine-$(CONFIG_PLAT_SPEAR) += spear 223b4175b89SRussell King 224b4175b89SRussell King# Platform directory name. This list is sorted alphanumerically 225b4175b89SRussell King# by CONFIG_* macro name. 226387798b3SRob Herringplat-$(CONFIG_PLAT_ORION) += orion 2271da177e4SLinus Torvalds 2289d4f13e5SRussell King# The byte offset of the kernel image in RAM from the start of RAM. 2299d4f13e5SRussell KingTEXT_OFFSET := $(textofs-y) 2301da177e4SLinus Torvalds 231f44f82e8SRussell King# The first directory contains additional information for the boot setup code 2321da177e4SLinus Torvaldsifneq ($(machine-y),) 233f44f82e8SRussell KingMACHINE := arch/arm/mach-$(word 1,$(machine-y))/ 2341da177e4SLinus Torvaldselse 2351da177e4SLinus TorvaldsMACHINE := 2361da177e4SLinus Torvaldsendif 237387798b3SRob Herringifeq ($(CONFIG_ARCH_MULTIPLATFORM),y) 238387798b3SRob HerringMACHINE := 239387798b3SRob Herringendif 2401da177e4SLinus Torvalds 241f44f82e8SRussell Kingmachdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) 242aa42587aSTomasz Figaplatdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y))) 243f44f82e8SRussell King 244387798b3SRob Herringifneq ($(CONFIG_ARCH_MULTIPLATFORM),y) 245de8a06f6SArnd Bergmannifneq ($(CONFIG_ARM_SINGLE_ARMV7M),y) 246f44f82e8SRussell KingKBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs)) 247f44f82e8SRussell Kingendif 248387798b3SRob Herringendif 249f44f82e8SRussell King 250f8c07de6SHyok S. Choiexport TEXT_OFFSET GZFLAGS MMUEXT 2511da177e4SLinus Torvalds 252c62d0f2aSNicolas Pitre# If we have a machine-specific directory, then include it in the build. 253c62d0f2aSNicolas Pitrecore-y += $(machdirs) $(platdirs) 254c62d0f2aSNicolas Pitre 2552a58e142SMasahiro Yamada# For cleaning 2562a58e142SMasahiro Yamadacore- += $(patsubst %,arch/arm/mach-%/, $(machine-)) 2572a58e142SMasahiro Yamadacore- += $(patsubst %,arch/arm/plat-%/, $(plat-)) 2582a58e142SMasahiro Yamada 25930c2f90bSNicolas Pitrelibs-y := arch/arm/lib/ $(libs-y) 2601da177e4SLinus Torvalds 2611da177e4SLinus Torvalds# Default target when executing plain make 262152e6744SMichal Marekboot := arch/arm/boot 2631da177e4SLinus Torvaldsifeq ($(CONFIG_XIP_KERNEL),y) 264152e6744SMichal MarekKBUILD_IMAGE := $(boot)/xipImage 2651da177e4SLinus Torvaldselse 266152e6744SMichal MarekKBUILD_IMAGE := $(boot)/zImage 2671da177e4SLinus Torvaldsendif 2681da177e4SLinus Torvalds 269189af465SArd Biesheuvelifeq ($(CONFIG_STACKPROTECTOR_PER_TASK),y) 270189af465SArd Biesheuvelprepare: stack_protector_prepare 271f05eb1d2SArd Biesheuvelifeq ($(CONFIG_CC_HAVE_STACKPROTECTOR_TLS),y) 272f05eb1d2SArd Biesheuvelstack_protector_prepare: prepare0 273f05eb1d2SArd Biesheuvel $(eval KBUILD_CFLAGS += \ 274f05eb1d2SArd Biesheuvel -mstack-protector-guard=tls \ 275f05eb1d2SArd Biesheuvel -mstack-protector-guard-offset=$(shell \ 276f05eb1d2SArd Biesheuvel awk '{if ($$2 == "TSK_STACK_CANARY") print $$3;}'\ 277f05eb1d2SArd Biesheuvel include/generated/asm-offsets.h)) 278f05eb1d2SArd Biesheuvelelse 279189af465SArd Biesheuvelstack_protector_prepare: prepare0 28089604523SArd Biesheuvel $(eval SSP_PLUGIN_CFLAGS := \ 281189af465SArd Biesheuvel -fplugin-arg-arm_ssp_per_task_plugin-offset=$(shell \ 282dfbdcda2SArd Biesheuvel awk '{if ($$2 == "TSK_STACK_CANARY") print $$3;}'\ 283189af465SArd Biesheuvel include/generated/asm-offsets.h)) 28489604523SArd Biesheuvel $(eval KBUILD_CFLAGS += $(SSP_PLUGIN_CFLAGS)) 28589604523SArd Biesheuvel $(eval GCC_PLUGINS_CFLAGS += $(SSP_PLUGIN_CFLAGS)) 286189af465SArd Biesheuvelendif 287f05eb1d2SArd Biesheuvelendif 288189af465SArd Biesheuvel 28937c8a5faSRob Herringall: $(notdir $(KBUILD_IMAGE)) 29051342d71SRussell King 2911da177e4SLinus Torvalds 29296a8fae0SRussell Kingarchheaders: 29396a8fae0SRussell King $(Q)$(MAKE) $(build)=arch/arm/tools uapi 29496a8fae0SRussell King 29566206536SSam Ravnborgarchprepare: 2964e2648dbSRussell King $(Q)$(MAKE) $(build)=arch/arm/tools kapi 2971da177e4SLinus Torvalds 2981da177e4SLinus Torvalds# Convert bzImage to zImage 2991da177e4SLinus TorvaldsbzImage: zImage 3001da177e4SLinus Torvalds 30119514fc6SRobert RichterBOOT_TARGETS = zImage Image xipImage bootpImage uImage 30219514fc6SRobert RichterINSTALL_TARGETS = zinstall uinstall install 30319514fc6SRobert Richter 30419514fc6SRobert RichterPHONY += bzImage $(BOOT_TARGETS) $(INSTALL_TARGETS) 30519514fc6SRobert Richter 3063939f334SMasahiro YamadabootpImage uImage: zImage 3073939f334SMasahiro YamadazImage: Image 3083939f334SMasahiro Yamada 30919514fc6SRobert Richter$(BOOT_TARGETS): vmlinux 3101da177e4SLinus Torvalds $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ 311c6bbfbb7SMasahiro Yamada @$(kecho) ' Kernel: $(boot)/$@ is ready' 3121da177e4SLinus Torvalds 313f774f5bbSMasahiro Yamada$(INSTALL_TARGETS): KBUILD_IMAGE = $(boot)/$(patsubst %install,%Image,$@) 31419514fc6SRobert Richter$(INSTALL_TARGETS): 315f774f5bbSMasahiro Yamada $(call cmd,install) 3161da177e4SLinus Torvalds 317e5b61debSNathan LynchPHONY += vdso_install 318e5b61debSNathan Lynchvdso_install: 319e5b61debSNathan Lynchifeq ($(CONFIG_VDSO),y) 320e5b61debSNathan Lynch $(Q)$(MAKE) $(build)=arch/arm/vdso $@ 321e5b61debSNathan Lynchendif 322e5b61debSNathan Lynch 3231da177e4SLinus Torvalds# My testing targets (bypasses dependencies) 3241da177e4SLinus Torvaldsbp:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/bootpImage 3251da177e4SLinus Torvalds 3261da177e4SLinus Torvalds 3271da177e4SLinus Torvaldsdefine archhelp 3281da177e4SLinus Torvalds echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' 3291da177e4SLinus Torvalds echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' 3301da177e4SLinus Torvalds echo '* xipImage - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)' 331a4f14bacSUwe Kleine-König echo ' uImage - U-Boot wrapped zImage' 3321da177e4SLinus Torvalds echo ' bootpImage - Combined zImage and initial RAM disk' 3331da177e4SLinus Torvalds echo ' (supply initrd image via make variable INITRD=<path>)' 3341da177e4SLinus Torvalds echo ' install - Install uncompressed kernel' 3351da177e4SLinus Torvalds echo ' zinstall - Install compressed kernel' 336a65d2922SRussell King echo ' uinstall - Install U-Boot wrapped compressed kernel' 337caa27b66SSam Ravnborg echo ' Install using (your) ~/bin/$(INSTALLKERNEL) or' 338caa27b66SSam Ravnborg echo ' (distribution) /sbin/$(INSTALLKERNEL) or' 3391da177e4SLinus Torvalds echo ' install to $$(INSTALL_PATH) and run lilo' 340e5b61debSNathan Lynch echo ' vdso_install - Install unstripped vdso.so to $$(INSTALL_MOD_PATH)/vdso' 3411da177e4SLinus Torvaldsendef 342