xref: /rk3399_rockchip-uboot/arch/arm/config.mk (revision cca4e4aec1fe52e5ecd15e3cebdbb36e2f254220)
1ea0364f1SPeter Tyser#
2ea0364f1SPeter Tyser# (C) Copyright 2000-2002
3ea0364f1SPeter Tyser# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
4ea0364f1SPeter Tyser#
5ea0364f1SPeter Tyser# See file CREDITS for list of people who contributed to this
6ea0364f1SPeter Tyser# project.
7ea0364f1SPeter Tyser#
8ea0364f1SPeter Tyser# This program is free software; you can redistribute it and/or
9ea0364f1SPeter Tyser# modify it under the terms of the GNU General Public License as
10ea0364f1SPeter Tyser# published by the Free Software Foundation; either version 2 of
11ea0364f1SPeter Tyser# the License, or (at your option) any later version.
12ea0364f1SPeter Tyser#
13ea0364f1SPeter Tyser# This program is distributed in the hope that it will be useful,
14ea0364f1SPeter Tyser# but WITHOUT ANY WARRANTY; without even the implied warranty of
15ea0364f1SPeter Tyser# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16ea0364f1SPeter Tyser# GNU General Public License for more details.
17ea0364f1SPeter Tyser#
18ea0364f1SPeter Tyser# You should have received a copy of the GNU General Public License
19ea0364f1SPeter Tyser# along with this program; if not, write to the Free Software
20ea0364f1SPeter Tyser# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21ea0364f1SPeter Tyser# MA 02111-1307 USA
22ea0364f1SPeter Tyser#
23ea0364f1SPeter Tyser
24ea0364f1SPeter TyserCROSS_COMPILE ?= arm-linux-
25ea0364f1SPeter Tyser
268ae86b76SWolfgang Denkifndef CONFIG_STANDALONE_LOAD_ADDR
27ea0364f1SPeter Tyserifeq ($(SOC),omap3)
288ae86b76SWolfgang DenkCONFIG_STANDALONE_LOAD_ADDR = 0x80300000
29ea0364f1SPeter Tyserelse
308ae86b76SWolfgang DenkCONFIG_STANDALONE_LOAD_ADDR = 0xc100000
31ea0364f1SPeter Tyserendif
32ea0364f1SPeter Tyserendif
33ea0364f1SPeter Tyser
34ea0364f1SPeter TyserPLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__
35ea0364f1SPeter Tyser
36ea0364f1SPeter Tyser# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
37*cca4e4aeSWolfgang DenkPF_CPPFLAGS_ARM := $(call cc-option,-marm,)
38ea0364f1SPeter Tyser
39ea0364f1SPeter Tyser# Try if EABI is supported, else fall back to old API,
40ea0364f1SPeter Tyser# i. e. for example:
41ea0364f1SPeter Tyser# - with ELDK 4.2 (EABI supported), use:
42ea0364f1SPeter Tyser#	-mabi=aapcs-linux -mno-thumb-interwork
43ea0364f1SPeter Tyser# - with ELDK 4.1 (gcc 4.x, no EABI), use:
44ea0364f1SPeter Tyser#	-mabi=apcs-gnu -mno-thumb-interwork
45ea0364f1SPeter Tyser# - with ELDK 3.1 (gcc 3.x), use:
46ea0364f1SPeter Tyser#	-mapcs-32 -mno-thumb-interwork
47*cca4e4aeSWolfgang DenkPF_CPPFLAGS_ABI := $(call cc-option,\
48ea0364f1SPeter Tyser			-mabi=aapcs-linux -mno-thumb-interwork,\
49ea0364f1SPeter Tyser			$(call cc-option,\
50ea0364f1SPeter Tyser				-mapcs-32,\
51ea0364f1SPeter Tyser				$(call cc-option,\
52ea0364f1SPeter Tyser					-mabi=apcs-gnu,\
53ea0364f1SPeter Tyser				)\
54ea0364f1SPeter Tyser			) $(call cc-option,-mno-thumb-interwork,)\
55ea0364f1SPeter Tyser		)
56*cca4e4aeSWolfgang DenkPLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARM) $(PF_CPPFLAGS_ABI)
57ea0364f1SPeter Tyser
58ea0364f1SPeter Tyser# For EABI, make sure to provide raise()
59ea0364f1SPeter Tyserifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS)))
605253418aSAneesh V# This file is parsed many times, so the string may get added multiple
615253418aSAneesh V# times. Also, the prefix needs to be different based on whether
625253418aSAneesh V# CONFIG_SPL_BUILD is defined or not. 'filter-out' the existing entry
635253418aSAneesh V# before adding the correct one.
645253418aSAneesh Vifdef CONFIG_SPL_BUILD
655253418aSAneesh VPLATFORM_LIBS := $(SPLTREE)/arch/arm/lib/eabi_compat.o \
665253418aSAneesh V	$(filter-out %/arch/arm/lib/eabi_compat.o, $(PLATFORM_LIBS))
675253418aSAneesh Velse
685253418aSAneesh VPLATFORM_LIBS := $(OBJTREE)/arch/arm/lib/eabi_compat.o \
695253418aSAneesh V	$(filter-out %/arch/arm/lib/eabi_compat.o, $(PLATFORM_LIBS))
70ea0364f1SPeter Tyserendif
71ea0364f1SPeter Tyserendif
7292d5ecbaSAlbert Aribaud
73363613a0SMichael Schwingenifdef CONFIG_SYS_LDSCRIPT
74363613a0SMichael Schwingen# need to strip off double quotes
75363613a0SMichael SchwingenLDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT))
76363613a0SMichael Schwingenelse
77363613a0SMichael SchwingenLDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
78363613a0SMichael Schwingenendif
79363613a0SMichael Schwingen
8092d5ecbaSAlbert Aribaud# needed for relocation
819710504dSHeiko Schocherifndef CONFIG_NAND_SPL
82a4594e41SStefano BabicLDFLAGS_u-boot += -pie
8392d5ecbaSAlbert Aribaudendif
84