18c2ecf20Sopenharmony_ci# 28c2ecf20Sopenharmony_ci# arch/arm/Makefile 38c2ecf20Sopenharmony_ci# 48c2ecf20Sopenharmony_ci# This file is included by the global makefile so that you can add your own 58c2ecf20Sopenharmony_ci# architecture-specific flags and dependencies. 68c2ecf20Sopenharmony_ci# 78c2ecf20Sopenharmony_ci# This file is subject to the terms and conditions of the GNU General Public 88c2ecf20Sopenharmony_ci# License. See the file "COPYING" in the main directory of this archive 98c2ecf20Sopenharmony_ci# for more details. 108c2ecf20Sopenharmony_ci# 118c2ecf20Sopenharmony_ci# Copyright (C) 1995-2001 by Russell King 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ciLDFLAGS_vmlinux := --no-undefined -X --pic-veneer 148c2ecf20Sopenharmony_ciifeq ($(CONFIG_CPU_ENDIAN_BE8),y) 158c2ecf20Sopenharmony_ciLDFLAGS_vmlinux += --be8 168c2ecf20Sopenharmony_ciKBUILD_LDFLAGS_MODULE += --be8 178c2ecf20Sopenharmony_ciendif 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ciGZFLAGS :=-9 208c2ecf20Sopenharmony_ci#KBUILD_CFLAGS +=-pipe 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci# Never generate .eh_frame 238c2ecf20Sopenharmony_ciKBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci# This should work on most of the modern platforms 268c2ecf20Sopenharmony_ciKBUILD_DEFCONFIG := multi_v7_defconfig 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci# defines filename extension depending memory management type. 298c2ecf20Sopenharmony_ciifeq ($(CONFIG_MMU),) 308c2ecf20Sopenharmony_ciMMUEXT := -nommu 318c2ecf20Sopenharmony_ciKBUILD_CFLAGS += $(call cc-option,-mno-unaligned-access) 328c2ecf20Sopenharmony_ciendif 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ciifeq ($(CONFIG_FRAME_POINTER),y) 358c2ecf20Sopenharmony_ciKBUILD_CFLAGS +=-fno-omit-frame-pointer 368c2ecf20Sopenharmony_ciifeq ($(CONFIG_CC_IS_GCC),y) 378c2ecf20Sopenharmony_ciKBUILD_CFLAGS += -mapcs -mno-sched-prolog 388c2ecf20Sopenharmony_ciendif 398c2ecf20Sopenharmony_ciendif 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ciifeq ($(CONFIG_CPU_BIG_ENDIAN),y) 428c2ecf20Sopenharmony_ciKBUILD_CPPFLAGS += -mbig-endian 438c2ecf20Sopenharmony_ciCHECKFLAGS += -D__ARMEB__ 448c2ecf20Sopenharmony_ciKBUILD_LDFLAGS += -EB 458c2ecf20Sopenharmony_cielse 468c2ecf20Sopenharmony_ciKBUILD_CPPFLAGS += -mlittle-endian 478c2ecf20Sopenharmony_ciCHECKFLAGS += -D__ARMEL__ 488c2ecf20Sopenharmony_ciKBUILD_LDFLAGS += -EL 498c2ecf20Sopenharmony_ciendif 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ciifeq ($(CONFIG_RELOCATABLE),y) 528c2ecf20Sopenharmony_ciKBUILD_CFLAGS += -fpic -include $(srctree)/include/linux/hidden.h 538c2ecf20Sopenharmony_ciCFLAGS_MODULE += -fno-pic 548c2ecf20Sopenharmony_ciLDFLAGS_vmlinux += -pie -shared -Bsymbolic 558c2ecf20Sopenharmony_ciendif 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci# 588c2ecf20Sopenharmony_ci# The Scalar Replacement of Aggregates (SRA) optimization pass in GCC 4.9 and 598c2ecf20Sopenharmony_ci# later may result in code being generated that handles signed short and signed 608c2ecf20Sopenharmony_ci# char struct members incorrectly. So disable it. 618c2ecf20Sopenharmony_ci# (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932) 628c2ecf20Sopenharmony_ci# 638c2ecf20Sopenharmony_ciKBUILD_CFLAGS += $(call cc-option,-fno-ipa-sra) 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci# This selects which instruction set is used. 668c2ecf20Sopenharmony_ci# Note that GCC does not numerically define an architecture version 678c2ecf20Sopenharmony_ci# macro, but instead defines a whole series of macros which makes 688c2ecf20Sopenharmony_ci# testing for a specific architecture or later rather impossible. 698c2ecf20Sopenharmony_ciarch-$(CONFIG_CPU_32v7M) =-D__LINUX_ARM_ARCH__=7 -march=armv7-m 708c2ecf20Sopenharmony_ciarch-$(CONFIG_CPU_32v7) =-D__LINUX_ARM_ARCH__=7 -march=armv7-a 718c2ecf20Sopenharmony_ciarch-$(CONFIG_CPU_32v6) =-D__LINUX_ARM_ARCH__=6 -march=armv6 728c2ecf20Sopenharmony_ci# Only override the compiler option if ARMv6. The ARMv6K extensions are 738c2ecf20Sopenharmony_ci# always available in ARMv7 748c2ecf20Sopenharmony_ciifeq ($(CONFIG_CPU_32v6),y) 758c2ecf20Sopenharmony_ciarch-$(CONFIG_CPU_32v6K) =-D__LINUX_ARM_ARCH__=6 -march=armv6k 768c2ecf20Sopenharmony_ciendif 778c2ecf20Sopenharmony_ciarch-$(CONFIG_CPU_32v5) =-D__LINUX_ARM_ARCH__=5 -march=armv5te 788c2ecf20Sopenharmony_ciarch-$(CONFIG_CPU_32v4T) =-D__LINUX_ARM_ARCH__=4 -march=armv4t 798c2ecf20Sopenharmony_ciarch-$(CONFIG_CPU_32v4) =-D__LINUX_ARM_ARCH__=4 -march=armv4 808c2ecf20Sopenharmony_ciarch-$(CONFIG_CPU_32v3) =-D__LINUX_ARM_ARCH__=3 -march=armv3m 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci# Evaluate arch cc-option calls now 838c2ecf20Sopenharmony_ciarch-y := $(arch-y) 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci# This selects how we optimise for the processor. 868c2ecf20Sopenharmony_citune-$(CONFIG_CPU_ARM7TDMI) =-mtune=arm7tdmi 878c2ecf20Sopenharmony_citune-$(CONFIG_CPU_ARM720T) =-mtune=arm7tdmi 888c2ecf20Sopenharmony_citune-$(CONFIG_CPU_ARM740T) =-mtune=arm7tdmi 898c2ecf20Sopenharmony_citune-$(CONFIG_CPU_ARM9TDMI) =-mtune=arm9tdmi 908c2ecf20Sopenharmony_citune-$(CONFIG_CPU_ARM940T) =-mtune=arm9tdmi 918c2ecf20Sopenharmony_citune-$(CONFIG_CPU_ARM946E) =-mtune=arm9e 928c2ecf20Sopenharmony_citune-$(CONFIG_CPU_ARM920T) =-mtune=arm9tdmi 938c2ecf20Sopenharmony_citune-$(CONFIG_CPU_ARM922T) =-mtune=arm9tdmi 948c2ecf20Sopenharmony_citune-$(CONFIG_CPU_ARM925T) =-mtune=arm9tdmi 958c2ecf20Sopenharmony_citune-$(CONFIG_CPU_ARM926T) =-mtune=arm9tdmi 968c2ecf20Sopenharmony_citune-$(CONFIG_CPU_FA526) =-mtune=arm9tdmi 978c2ecf20Sopenharmony_citune-$(CONFIG_CPU_SA110) =-mtune=strongarm110 988c2ecf20Sopenharmony_citune-$(CONFIG_CPU_SA1100) =-mtune=strongarm1100 998c2ecf20Sopenharmony_citune-$(CONFIG_CPU_XSCALE) =-mtune=xscale 1008c2ecf20Sopenharmony_citune-$(CONFIG_CPU_XSC3) =-mtune=xscale 1018c2ecf20Sopenharmony_citune-$(CONFIG_CPU_FEROCEON) =-mtune=xscale 1028c2ecf20Sopenharmony_citune-$(CONFIG_CPU_V6) =-mtune=arm1136j-s 1038c2ecf20Sopenharmony_citune-$(CONFIG_CPU_V6K) =-mtune=arm1136j-s 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci# Evaluate tune cc-option calls now 1068c2ecf20Sopenharmony_citune-y := $(tune-y) 1078c2ecf20Sopenharmony_ci 1088c2ecf20Sopenharmony_ciifeq ($(CONFIG_AEABI),y) 1098c2ecf20Sopenharmony_ciCFLAGS_ABI :=-mabi=aapcs-linux -mfpu=vfp 1108c2ecf20Sopenharmony_cielse 1118c2ecf20Sopenharmony_ciCFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,) 1128c2ecf20Sopenharmony_ciendif 1138c2ecf20Sopenharmony_ci 1148c2ecf20Sopenharmony_ciifeq ($(CONFIG_ARM_UNWIND),y) 1158c2ecf20Sopenharmony_ciCFLAGS_ABI +=-funwind-tables 1168c2ecf20Sopenharmony_ciendif 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ciifeq ($(CONFIG_CC_IS_CLANG),y) 1198c2ecf20Sopenharmony_ciCFLAGS_ABI += -meabi gnu 1208c2ecf20Sopenharmony_ciendif 1218c2ecf20Sopenharmony_ci 1228c2ecf20Sopenharmony_ci# Accept old syntax despite ".syntax unified" 1238c2ecf20Sopenharmony_ciAFLAGS_NOWARN :=$(call as-option,-Wa$(comma)-mno-warn-deprecated,-Wa$(comma)-W) 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_ciifeq ($(CONFIG_THUMB2_KERNEL),y) 1268c2ecf20Sopenharmony_ciCFLAGS_ISA :=-mthumb -Wa,-mimplicit-it=always $(AFLAGS_NOWARN) 1278c2ecf20Sopenharmony_ciAFLAGS_ISA :=$(CFLAGS_ISA) -Wa$(comma)-mthumb 1288c2ecf20Sopenharmony_cielse 1298c2ecf20Sopenharmony_ciCFLAGS_ISA :=$(call cc-option,-marm,) $(AFLAGS_NOWARN) 1308c2ecf20Sopenharmony_ciAFLAGS_ISA :=$(CFLAGS_ISA) 1318c2ecf20Sopenharmony_ciendif 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ci# Need -Uarm for gcc < 3.x 1348c2ecf20Sopenharmony_ciKBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm 1358c2ecf20Sopenharmony_ciKBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ciCHECKFLAGS += -D__arm__ 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ci#Default value 1408c2ecf20Sopenharmony_cihead-y := arch/arm/kernel/head$(MMUEXT).o 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ci# Text offset. This list is sorted numerically by address in order to 1438c2ecf20Sopenharmony_ci# provide a means to avoid/resolve conflicts in multi-arch kernels. 1448c2ecf20Sopenharmony_ci# Note: the 32kB below this value is reserved for use by the kernel 1458c2ecf20Sopenharmony_ci# during boot, and this offset is critical to the functioning of 1468c2ecf20Sopenharmony_ci# kexec-tools. 1478c2ecf20Sopenharmony_citextofs-y := 0x00008000 1488c2ecf20Sopenharmony_ci# We don't want the htc bootloader to corrupt kernel during resume 1498c2ecf20Sopenharmony_citextofs-$(CONFIG_PM_H1940) := 0x00108000 1508c2ecf20Sopenharmony_ci# RTD1195 has Boot ROM at start of address space 1518c2ecf20Sopenharmony_citextofs-$(CONFIG_ARCH_REALTEK) := 0x00108000 1528c2ecf20Sopenharmony_ci# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memory 1538c2ecf20Sopenharmony_ciifeq ($(CONFIG_ARCH_SA1100),y) 1548c2ecf20Sopenharmony_citextofs-$(CONFIG_SA1111) := 0x00208000 1558c2ecf20Sopenharmony_ciendif 1568c2ecf20Sopenharmony_citextofs-$(CONFIG_ARCH_IPQ40XX) := 0x00208000 1578c2ecf20Sopenharmony_citextofs-$(CONFIG_ARCH_MSM8X60) := 0x00208000 1588c2ecf20Sopenharmony_citextofs-$(CONFIG_ARCH_MSM8960) := 0x00208000 1598c2ecf20Sopenharmony_citextofs-$(CONFIG_ARCH_MESON) := 0x00208000 1608c2ecf20Sopenharmony_citextofs-$(CONFIG_ARCH_AXXIA) := 0x00308000 1618c2ecf20Sopenharmony_ci 1628c2ecf20Sopenharmony_ci# Machine directory name. This list is sorted alphanumerically 1638c2ecf20Sopenharmony_ci# by CONFIG_* macro name. 1648c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_ACTIONS) += actions 1658c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_ALPINE) += alpine 1668c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_ARTPEC) += artpec 1678c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_ASPEED) += aspeed 1688c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_AT91) += at91 1698c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_AXXIA) += axxia 1708c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_BCM) += bcm 1718c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_BERLIN) += berlin 1728c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_CLPS711X) += clps711x 1738c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx 1748c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_DAVINCI) += davinci 1758c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_DIGICOLOR) += digicolor 1768c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_DOVE) += dove 1778c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_EBSA110) += ebsa110 1788c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_EFM32) += efm32 1798c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_EP93XX) += ep93xx 1808c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_EXYNOS) += exynos 1818c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_FOOTBRIDGE) += footbridge 1828c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_GEMINI) += gemini 1838c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_HIGHBANK) += highbank 1848c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_HISI) += hisi 1858c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_INTEGRATOR) += integrator 1868c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_IOP32X) += iop32x 1878c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_IXP4XX) += ixp4xx 1888c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_KEYSTONE) += keystone 1898c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_LPC18XX) += lpc18xx 1908c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_LPC32XX) += lpc32xx 1918c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_MESON) += meson 1928c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_MMP) += mmp 1938c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_MPS2) += vexpress 1948c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_MOXART) += moxart 1958c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_MV78XX0) += mv78xx0 1968c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_MVEBU) += mvebu 1978c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_MXC) += imx 1988c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_MEDIATEK) += mediatek 1998c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_MILBEAUT) += milbeaut 2008c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_MXS) += mxs 2018c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_MSTARV7) += mstar 2028c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_NOMADIK) += nomadik 2038c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_NPCM) += npcm 2048c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_NSPIRE) += nspire 2058c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_OXNAS) += oxnas 2068c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_OMAP1) += omap1 2078c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_OMAP2PLUS) += omap2 2088c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_ORION5X) += orion5x 2098c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_PICOXCELL) += picoxcell 2108c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_PXA) += pxa 2118c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_QCOM) += qcom 2128c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_RDA) += rda 2138c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_REALTEK) += realtek 2148c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_REALVIEW) += realview 2158c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_ROCKCHIP) += rockchip 2168c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_RPC) += rpc 2178c2ecf20Sopenharmony_cimachine-$(CONFIG_PLAT_SAMSUNG) += s3c 2188c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_S5PV210) += s5pv210 2198c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_SA1100) += sa1100 2208c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_RENESAS) += shmobile 2218c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_SIRF) += prima2 2228c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_SOCFPGA) += socfpga 2238c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_STI) += sti 2248c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_STM32) += stm32 2258c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_SUNXI) += sunxi 2268c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_TANGO) += tango 2278c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_TEGRA) += tegra 2288c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_U300) += u300 2298c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_U8500) += ux500 2308c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_VERSATILE) += versatile 2318c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_VEXPRESS) += vexpress 2328c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_VT8500) += vt8500 2338c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_ZX) += zx 2348c2ecf20Sopenharmony_cimachine-$(CONFIG_ARCH_ZYNQ) += zynq 2358c2ecf20Sopenharmony_cimachine-$(CONFIG_PLAT_SPEAR) += spear 2368c2ecf20Sopenharmony_ci 2378c2ecf20Sopenharmony_ci# Platform directory name. This list is sorted alphanumerically 2388c2ecf20Sopenharmony_ci# by CONFIG_* macro name. 2398c2ecf20Sopenharmony_ciplat-$(CONFIG_ARCH_OMAP) += omap 2408c2ecf20Sopenharmony_ciplat-$(CONFIG_PLAT_ORION) += orion 2418c2ecf20Sopenharmony_ciplat-$(CONFIG_PLAT_PXA) += pxa 2428c2ecf20Sopenharmony_ciplat-$(CONFIG_PLAT_VERSATILE) += versatile 2438c2ecf20Sopenharmony_ci 2448c2ecf20Sopenharmony_ciifeq ($(CONFIG_ARCH_EBSA110),y) 2458c2ecf20Sopenharmony_ci# This is what happens if you forget the IOCS16 line. 2468c2ecf20Sopenharmony_ci# PCMCIA cards stop working. 2478c2ecf20Sopenharmony_ciCFLAGS_3c589_cs.o :=-DISA_SIXTEEN_BIT_PERIPHERAL 2488c2ecf20Sopenharmony_ciexport CFLAGS_3c589_cs.o 2498c2ecf20Sopenharmony_ciendif 2508c2ecf20Sopenharmony_ci 2518c2ecf20Sopenharmony_ci# The byte offset of the kernel image in RAM from the start of RAM. 2528c2ecf20Sopenharmony_ciTEXT_OFFSET := $(textofs-y) 2538c2ecf20Sopenharmony_ci 2548c2ecf20Sopenharmony_ci# The first directory contains additional information for the boot setup code 2558c2ecf20Sopenharmony_ciifneq ($(machine-y),) 2568c2ecf20Sopenharmony_ciMACHINE := arch/arm/mach-$(word 1,$(machine-y))/ 2578c2ecf20Sopenharmony_cielse 2588c2ecf20Sopenharmony_ciMACHINE := 2598c2ecf20Sopenharmony_ciendif 2608c2ecf20Sopenharmony_ciifeq ($(CONFIG_ARCH_MULTIPLATFORM),y) 2618c2ecf20Sopenharmony_ciMACHINE := 2628c2ecf20Sopenharmony_ciendif 2638c2ecf20Sopenharmony_ci 2648c2ecf20Sopenharmony_cimachdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y)) 2658c2ecf20Sopenharmony_ciplatdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y))) 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_ciifneq ($(CONFIG_ARCH_MULTIPLATFORM),y) 2688c2ecf20Sopenharmony_ciifneq ($(CONFIG_ARM_SINGLE_ARMV7M),y) 2698c2ecf20Sopenharmony_ciKBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs)) 2708c2ecf20Sopenharmony_ciendif 2718c2ecf20Sopenharmony_ciendif 2728c2ecf20Sopenharmony_ci 2738c2ecf20Sopenharmony_ciexport TEXT_OFFSET GZFLAGS MMUEXT 2748c2ecf20Sopenharmony_ci 2758c2ecf20Sopenharmony_cicore-y += arch/arm/ 2768c2ecf20Sopenharmony_ci# If we have a machine-specific directory, then include it in the build. 2778c2ecf20Sopenharmony_cicore-y += $(machdirs) $(platdirs) 2788c2ecf20Sopenharmony_ci 2798c2ecf20Sopenharmony_ci# For cleaning 2808c2ecf20Sopenharmony_cicore- += $(patsubst %,arch/arm/mach-%/, $(machine-)) 2818c2ecf20Sopenharmony_cicore- += $(patsubst %,arch/arm/plat-%/, $(plat-)) 2828c2ecf20Sopenharmony_ci 2838c2ecf20Sopenharmony_cidrivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ 2848c2ecf20Sopenharmony_ci 2858c2ecf20Sopenharmony_cilibs-y := arch/arm/lib/ $(libs-y) 2868c2ecf20Sopenharmony_ci 2878c2ecf20Sopenharmony_ci# Default target when executing plain make 2888c2ecf20Sopenharmony_ciboot := arch/arm/boot 2898c2ecf20Sopenharmony_ciifeq ($(CONFIG_XIP_KERNEL),y) 2908c2ecf20Sopenharmony_ciKBUILD_IMAGE := $(boot)/xipImage 2918c2ecf20Sopenharmony_cielse 2928c2ecf20Sopenharmony_ciKBUILD_IMAGE := $(boot)/zImage 2938c2ecf20Sopenharmony_ciendif 2948c2ecf20Sopenharmony_ci 2958c2ecf20Sopenharmony_ciifeq ($(CONFIG_STACKPROTECTOR_PER_TASK),y) 2968c2ecf20Sopenharmony_ciprepare: stack_protector_prepare 2978c2ecf20Sopenharmony_cistack_protector_prepare: prepare0 2988c2ecf20Sopenharmony_ci $(eval SSP_PLUGIN_CFLAGS := \ 2998c2ecf20Sopenharmony_ci -fplugin-arg-arm_ssp_per_task_plugin-tso=$(shell \ 3008c2ecf20Sopenharmony_ci awk '{if ($$2 == "THREAD_SZ_ORDER") print $$3;}'\ 3018c2ecf20Sopenharmony_ci include/generated/asm-offsets.h) \ 3028c2ecf20Sopenharmony_ci -fplugin-arg-arm_ssp_per_task_plugin-offset=$(shell \ 3038c2ecf20Sopenharmony_ci awk '{if ($$2 == "TI_STACK_CANARY") print $$3;}'\ 3048c2ecf20Sopenharmony_ci include/generated/asm-offsets.h)) 3058c2ecf20Sopenharmony_ci $(eval KBUILD_CFLAGS += $(SSP_PLUGIN_CFLAGS)) 3068c2ecf20Sopenharmony_ci $(eval GCC_PLUGINS_CFLAGS += $(SSP_PLUGIN_CFLAGS)) 3078c2ecf20Sopenharmony_ciendif 3088c2ecf20Sopenharmony_ci 3098c2ecf20Sopenharmony_ciall: $(notdir $(KBUILD_IMAGE)) 3108c2ecf20Sopenharmony_ci 3118c2ecf20Sopenharmony_ci 3128c2ecf20Sopenharmony_ciarchheaders: 3138c2ecf20Sopenharmony_ci $(Q)$(MAKE) $(build)=arch/arm/tools uapi 3148c2ecf20Sopenharmony_ci 3158c2ecf20Sopenharmony_ciarchprepare: 3168c2ecf20Sopenharmony_ci $(Q)$(MAKE) $(build)=arch/arm/tools kapi 3178c2ecf20Sopenharmony_ci 3188c2ecf20Sopenharmony_ci# Convert bzImage to zImage 3198c2ecf20Sopenharmony_cibzImage: zImage 3208c2ecf20Sopenharmony_ci 3218c2ecf20Sopenharmony_ciBOOT_TARGETS = zImage Image xipImage bootpImage uImage 3228c2ecf20Sopenharmony_ciINSTALL_TARGETS = zinstall uinstall install 3238c2ecf20Sopenharmony_ci 3248c2ecf20Sopenharmony_ciPHONY += bzImage $(BOOT_TARGETS) $(INSTALL_TARGETS) 3258c2ecf20Sopenharmony_ci 3268c2ecf20Sopenharmony_cibootpImage uImage: zImage 3278c2ecf20Sopenharmony_cizImage: Image 3288c2ecf20Sopenharmony_ci 3298c2ecf20Sopenharmony_ci$(BOOT_TARGETS): vmlinux 3308c2ecf20Sopenharmony_ci $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ 3318c2ecf20Sopenharmony_ci @$(kecho) ' Kernel: $(boot)/$@ is ready' 3328c2ecf20Sopenharmony_ci 3338c2ecf20Sopenharmony_ci$(INSTALL_TARGETS): 3348c2ecf20Sopenharmony_ci $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ 3358c2ecf20Sopenharmony_ci 3368c2ecf20Sopenharmony_ciPHONY += vdso_install 3378c2ecf20Sopenharmony_civdso_install: 3388c2ecf20Sopenharmony_ciifeq ($(CONFIG_VDSO),y) 3398c2ecf20Sopenharmony_ci $(Q)$(MAKE) $(build)=arch/arm/vdso $@ 3408c2ecf20Sopenharmony_ciendif 3418c2ecf20Sopenharmony_ci 3428c2ecf20Sopenharmony_ci# We use MRPROPER_FILES and CLEAN_FILES now 3438c2ecf20Sopenharmony_ciarchclean: 3448c2ecf20Sopenharmony_ci $(Q)$(MAKE) $(clean)=$(boot) 3458c2ecf20Sopenharmony_ci 3468c2ecf20Sopenharmony_ci# My testing targets (bypasses dependencies) 3478c2ecf20Sopenharmony_cibp:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/bootpImage 3488c2ecf20Sopenharmony_ci 3498c2ecf20Sopenharmony_ci 3508c2ecf20Sopenharmony_cidefine archhelp 3518c2ecf20Sopenharmony_ci echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' 3528c2ecf20Sopenharmony_ci echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' 3538c2ecf20Sopenharmony_ci echo '* xipImage - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)' 3548c2ecf20Sopenharmony_ci echo ' uImage - U-Boot wrapped zImage' 3558c2ecf20Sopenharmony_ci echo ' bootpImage - Combined zImage and initial RAM disk' 3568c2ecf20Sopenharmony_ci echo ' (supply initrd image via make variable INITRD=<path>)' 3578c2ecf20Sopenharmony_ci echo ' install - Install uncompressed kernel' 3588c2ecf20Sopenharmony_ci echo ' zinstall - Install compressed kernel' 3598c2ecf20Sopenharmony_ci echo ' uinstall - Install U-Boot wrapped compressed kernel' 3608c2ecf20Sopenharmony_ci echo ' Install using (your) ~/bin/$(INSTALLKERNEL) or' 3618c2ecf20Sopenharmony_ci echo ' (distribution) /sbin/$(INSTALLKERNEL) or' 3628c2ecf20Sopenharmony_ci echo ' install to $$(INSTALL_PATH) and run lilo' 3638c2ecf20Sopenharmony_ci echo ' vdso_install - Install unstripped vdso.so to $$(INSTALL_MOD_PATH)/vdso' 3648c2ecf20Sopenharmony_ciendef 365