162306a36Sopenharmony_ci# 262306a36Sopenharmony_ci# This file is subject to the terms and conditions of the GNU General Public 362306a36Sopenharmony_ci# License. See the file "COPYING" in the main directory of this archive 462306a36Sopenharmony_ci# for more details. 562306a36Sopenharmony_ci# 662306a36Sopenharmony_ci# Copyright (C) 2001 - 2005 Tensilica Inc. 762306a36Sopenharmony_ci# Copyright (C) 2014 Cadence Design Systems Inc. 862306a36Sopenharmony_ci# 962306a36Sopenharmony_ci# This file is included by the global makefile so that you can add your own 1062306a36Sopenharmony_ci# architecture-specific flags and dependencies. 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci# Core configuration. 1362306a36Sopenharmony_ci# (Use VAR=<xtensa_config> to use another default compiler.) 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_civariant-y := $(CONFIG_XTENSA_VARIANT_NAME) 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ciVARIANT = $(variant-y) 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ciifneq ($(VARIANT),) 2062306a36Sopenharmony_ci ifdef cross_compiling 2162306a36Sopenharmony_ci ifndef CROSS_COMPILE 2262306a36Sopenharmony_ci CROSS_COMPILE = xtensa_$(VARIANT)- 2362306a36Sopenharmony_ci endif 2462306a36Sopenharmony_ci endif 2562306a36Sopenharmony_ciendif 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci# Platform configuration 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ciplatform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000 3062306a36Sopenharmony_ciplatform-$(CONFIG_XTENSA_PLATFORM_ISS) := iss 3162306a36Sopenharmony_ciplatform-$(CONFIG_XTENSA_PLATFORM_XTFPGA) := xtfpga 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci# temporarily until string.h is fixed 3462306a36Sopenharmony_ciKBUILD_CFLAGS += -ffreestanding -D__linux__ 3562306a36Sopenharmony_ciKBUILD_CFLAGS += -pipe -mlongcalls -mtext-section-literals 3662306a36Sopenharmony_ciKBUILD_CFLAGS += $(call cc-option,-mforce-no-pic,) 3762306a36Sopenharmony_ciKBUILD_CFLAGS += $(call cc-option,-mno-serialize-volatile,) 3862306a36Sopenharmony_ciifneq ($(CONFIG_KERNEL_ABI_CALL0),) 3962306a36Sopenharmony_ciKBUILD_CFLAGS += -mabi=call0 4062306a36Sopenharmony_ciKBUILD_AFLAGS += -mabi=call0 4162306a36Sopenharmony_ciendif 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ciKBUILD_AFLAGS += -mlongcalls -mtext-section-literals 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ciifneq ($(CONFIG_LD_NO_RELAX),) 4662306a36Sopenharmony_ciKBUILD_LDFLAGS := --no-relax 4762306a36Sopenharmony_ciendif 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_ciCHECKFLAGS += -D$(if $(CONFIG_CPU_BIG_ENDIAN),__XTENSA_EB__,__XTENSA_EL__) 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_civardirs := $(patsubst %,arch/xtensa/variants/%/,$(variant-y)) 5262306a36Sopenharmony_ciplfdirs := $(patsubst %,arch/xtensa/platforms/%/,$(platform-y)) 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ciKBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(vardirs) $(plfdirs)) 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_ciKBUILD_DEFCONFIG := iss_defconfig 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_cilibs-y += arch/xtensa/lib/ 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ciboot := arch/xtensa/boot 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ciall Image zImage uImage xipImage: vmlinux 6362306a36Sopenharmony_ci $(Q)$(MAKE) $(build)=$(boot) $@ 6462306a36Sopenharmony_ci 6562306a36Sopenharmony_ciarchheaders: 6662306a36Sopenharmony_ci $(Q)$(MAKE) $(build)=arch/xtensa/kernel/syscalls all 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_cidefine archhelp 6962306a36Sopenharmony_ci @echo '* Image - Kernel ELF image with reset vector' 7062306a36Sopenharmony_ci @echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)' 7162306a36Sopenharmony_ci @echo '* uImage - U-Boot wrapped image' 7262306a36Sopenharmony_ci @echo ' xipImage - XIP image' 7362306a36Sopenharmony_ciendef 74