2002-09-09 04:49:36 +09:00
|
|
|
#
|
2006-09-02 02:49:50 +09:00
|
|
|
# (C) Copyright 2002-2006
|
2002-09-09 04:49:36 +09:00
|
|
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
#
|
2013-07-08 16:37:19 +09:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2002-09-09 04:49:36 +09:00
|
|
|
#
|
|
|
|
|
2016-05-27 01:01:40 +09:00
|
|
|
lib-$(CONFIG_USE_PRIVATE_LIBGCC) += ashldi3.o ashrdi3.o lshrdi3.o \
|
2016-05-27 01:01:44 +09:00
|
|
|
lib1funcs.o uldivmod.o div0.o \
|
|
|
|
div64.o muldi3.o
|
2008-02-27 19:00:47 +09:00
|
|
|
|
2015-03-01 20:44:39 +09:00
|
|
|
ifdef CONFIG_CPU_V7M
|
|
|
|
obj-y += vectors_m.o crt0.o
|
|
|
|
else ifdef CONFIG_ARM64
|
2013-12-14 12:47:35 +09:00
|
|
|
obj-y += crt0_64.o
|
|
|
|
else
|
2014-04-15 23:13:51 +09:00
|
|
|
obj-y += vectors.o crt0.o
|
2013-12-14 12:47:35 +09:00
|
|
|
endif
|
2013-01-08 19:18:02 +09:00
|
|
|
|
2012-08-31 17:30:13 +09:00
|
|
|
ifndef CONFIG_SPL_BUILD
|
2013-12-14 12:47:35 +09:00
|
|
|
ifdef CONFIG_ARM64
|
|
|
|
obj-y += relocate_64.o
|
|
|
|
else
|
|
|
|
obj-y += relocate.o
|
|
|
|
endif
|
2013-03-11 15:49:57 +09:00
|
|
|
|
2015-05-06 04:00:23 +09:00
|
|
|
obj-$(CONFIG_CPU_V7M) += cmd_boot.o
|
2013-10-17 17:34:52 +09:00
|
|
|
obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
|
2016-08-12 21:31:15 +09:00
|
|
|
obj-$(CONFIG_CMD_BOOTI) += bootm.o
|
2013-10-17 17:34:52 +09:00
|
|
|
obj-$(CONFIG_CMD_BOOTM) += bootm.o
|
2016-08-12 21:31:15 +09:00
|
|
|
obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o
|
2013-10-17 17:34:52 +09:00
|
|
|
obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
|
|
|
|
obj-$(CONFIG_USE_ARCH_MEMSET) += memset.o
|
|
|
|
obj-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o
|
2012-08-23 07:31:05 +09:00
|
|
|
else
|
2013-10-17 17:34:52 +09:00
|
|
|
obj-$(CONFIG_SPL_FRAMEWORK) += spl.o
|
2016-07-13 03:28:14 +09:00
|
|
|
obj-$(CONFIG_SPL_FRAMEWORK) += zimage.o
|
2011-07-13 14:11:06 +09:00
|
|
|
endif
|
2014-06-10 03:12:59 +09:00
|
|
|
obj-$(CONFIG_SEMIHOSTING) += semihosting.o
|
2008-02-27 19:00:47 +09:00
|
|
|
|
2014-02-23 01:53:42 +09:00
|
|
|
obj-y += sections.o
|
2015-02-07 07:06:45 +09:00
|
|
|
obj-y += stack.o
|
2015-03-01 20:44:39 +09:00
|
|
|
ifdef CONFIG_CPU_V7M
|
|
|
|
obj-y += interrupts_m.o
|
|
|
|
else ifdef CONFIG_ARM64
|
2015-07-01 13:28:03 +09:00
|
|
|
obj-y += ccn504.o
|
2014-03-14 15:26:27 +09:00
|
|
|
obj-y += gic_64.o
|
2013-12-14 12:47:35 +09:00
|
|
|
obj-y += interrupts_64.o
|
|
|
|
else
|
2013-10-17 17:34:52 +09:00
|
|
|
obj-y += interrupts.o
|
2013-12-14 12:47:35 +09:00
|
|
|
endif
|
2016-05-13 03:03:35 +09:00
|
|
|
ifndef CONFIG_SYSRESET
|
2013-10-17 17:34:52 +09:00
|
|
|
obj-y += reset.o
|
2015-08-31 07:55:18 +09:00
|
|
|
endif
|
2009-07-23 20:15:59 +09:00
|
|
|
|
2013-10-17 17:34:52 +09:00
|
|
|
obj-y += cache.o
|
2013-12-14 12:47:35 +09:00
|
|
|
ifndef CONFIG_ARM64
|
2013-10-17 17:34:52 +09:00
|
|
|
obj-y += cache-cp15.o
|
2013-12-14 12:47:35 +09:00
|
|
|
endif
|
ARM: compiler options cleanup - improve tool chain support
For some time there have been repeated reports about build problems
with some ARM (cross) tool chains. Especially issues about
(in)compatibility with the tool chain provided runtime support
library libgcc.a caused to add and support a private implementation
of such runtime support code in U-Boot. A closer look at the code
indicated that some of these issues are actually home-made. This
patch attempts to clean up some of the most obvious problems and make
building of U-Boot with different tool chains easier:
- Even though all ARM systems basicy used the same compiler options
to select a specific ABI from the tool chain, the code for this was
distributed over all cpu/*/config.mk files. We move this one level
up into lib_arm/config.mk instead.
- So far, we only checked if "-mapcs-32" was supported by the tool
chain; if yes, this was used, if not, "-mabi=apcs-gnu" was
selected, no matter if the tool chain actually understood this
option. There was no support for EABI conformant tool chains.
This patch implements the following logic:
1) If the tool chain supports
"-mabi=aapcs-linux -mno-thumb-interwork"
we use these options (EABI conformant tool chain).
2) Otherwise, we check first if
"-mapcs-32"
is supported, and then check for
"-mabi=apcs-gnu"
If one test succeeds, we use the first found option.
3) In case 2), we also test if "-mno-thumb-interwork", and use
this if the test succeeds. [For "-mabi=aapcs-linux" we set
"-mno-thumb-interwork" mandatorily.]
This way we use a similar logic for the compile options as the
Linux kernel does.
- Some EABI conformant tool chains cause external references to
utility functions like raise(); such functions are provided in the
new file lib_arm/eabi_compat.c
Note that lib_arm/config.mk gets parsed several times, so we must
make sure to add eabi_compat.o only once to the linker list.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Dirk Behme <dirk.behme@googlemail.com>
Cc: Magnus Lilja <lilja.magnus@gmail.com>
Cc: Tom Rix <Tom.Rix@windriver.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Sergey Kubushyn <ksi@koi8.net>
Tested-by: Magnus Lilja <lilja.magnus@gmail.com>
Tested-by: Andrzej Wolski <awolski@poczta.fm>
Tested-by: Gaye Abdoulaye Walsimou <walsimou@walsimou.com>
Tested-by: Tom Rix <Tom.Rix@windriver.com>
Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-08-17 20:17:29 +09:00
|
|
|
|
2016-06-28 21:18:16 +09:00
|
|
|
obj-y += psci-dt.o
|
|
|
|
|
2014-09-01 11:06:34 +09:00
|
|
|
obj-$(CONFIG_DEBUG_LL) += debug.o
|
|
|
|
|
ARM: compiler options cleanup - improve tool chain support
For some time there have been repeated reports about build problems
with some ARM (cross) tool chains. Especially issues about
(in)compatibility with the tool chain provided runtime support
library libgcc.a caused to add and support a private implementation
of such runtime support code in U-Boot. A closer look at the code
indicated that some of these issues are actually home-made. This
patch attempts to clean up some of the most obvious problems and make
building of U-Boot with different tool chains easier:
- Even though all ARM systems basicy used the same compiler options
to select a specific ABI from the tool chain, the code for this was
distributed over all cpu/*/config.mk files. We move this one level
up into lib_arm/config.mk instead.
- So far, we only checked if "-mapcs-32" was supported by the tool
chain; if yes, this was used, if not, "-mabi=apcs-gnu" was
selected, no matter if the tool chain actually understood this
option. There was no support for EABI conformant tool chains.
This patch implements the following logic:
1) If the tool chain supports
"-mabi=aapcs-linux -mno-thumb-interwork"
we use these options (EABI conformant tool chain).
2) Otherwise, we check first if
"-mapcs-32"
is supported, and then check for
"-mabi=apcs-gnu"
If one test succeeds, we use the first found option.
3) In case 2), we also test if "-mno-thumb-interwork", and use
this if the test succeeds. [For "-mabi=aapcs-linux" we set
"-mno-thumb-interwork" mandatorily.]
This way we use a similar logic for the compile options as the
Linux kernel does.
- Some EABI conformant tool chains cause external references to
utility functions like raise(); such functions are provided in the
new file lib_arm/eabi_compat.c
Note that lib_arm/config.mk gets parsed several times, so we must
make sure to add eabi_compat.o only once to the linker list.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Dirk Behme <dirk.behme@googlemail.com>
Cc: Magnus Lilja <lilja.magnus@gmail.com>
Cc: Tom Rix <Tom.Rix@windriver.com>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Sergey Kubushyn <ksi@koi8.net>
Tested-by: Magnus Lilja <lilja.magnus@gmail.com>
Tested-by: Andrzej Wolski <awolski@poczta.fm>
Tested-by: Gaye Abdoulaye Walsimou <walsimou@walsimou.com>
Tested-by: Tom Rix <Tom.Rix@windriver.com>
Tested-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-08-17 20:17:29 +09:00
|
|
|
# For EABI conformant tool chains, provide eabi_compat()
|
|
|
|
ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS)))
|
2013-10-17 17:34:52 +09:00
|
|
|
extra-y += eabi_compat.o
|
2009-07-23 20:15:59 +09:00
|
|
|
endif
|
2015-10-24 01:06:40 +09:00
|
|
|
|
2016-05-27 01:01:37 +09:00
|
|
|
asflags-y += -DCONFIG_ARM_ASM_UNIFIED
|
|
|
|
|
2015-10-24 01:06:40 +09:00
|
|
|
# some files can only build in ARM or THUMB2, not THUMB1
|
|
|
|
|
|
|
|
ifdef CONFIG_SYS_THUMB_BUILD
|
2016-05-27 01:01:37 +09:00
|
|
|
asflags-$(CONFIG_HAS_THUMB2) += -DCONFIG_THUMB2_KERNEL
|
2015-10-24 01:06:40 +09:00
|
|
|
ifndef CONFIG_HAS_THUMB2
|
|
|
|
|
|
|
|
# for C files, just apend -marm, which will override previous -mthumb*
|
|
|
|
|
|
|
|
CFLAGS_cache.o := -marm
|
|
|
|
CFLAGS_cache-cp15.o := -marm
|
|
|
|
|
|
|
|
# For .S, drop -mthumb* and other thumb-related options.
|
|
|
|
# CFLAGS_REMOVE_* would not have an effet, so AFLAGS_REMOVE_*
|
|
|
|
# was implemented and is used here.
|
|
|
|
# Also, define ${target}_NO_THUMB_BUILD for these two targets
|
|
|
|
# so that the code knows it should not use Thumb.
|
|
|
|
|
|
|
|
AFLAGS_REMOVE_memset.o := -mthumb -mthumb-interwork
|
|
|
|
AFLAGS_REMOVE_memcpy.o := -mthumb -mthumb-interwork
|
|
|
|
AFLAGS_memset.o := -DMEMSET_NO_THUMB_BUILD
|
|
|
|
AFLAGS_memcpy.o := -DMEMCPY_NO_THUMB_BUILD
|
|
|
|
endif
|
|
|
|
endif
|
2016-11-08 00:47:10 +09:00
|
|
|
|
|
|
|
# For building EFI apps
|
|
|
|
CFLAGS_$(EFI_CRT0) := $(CFLAGS_EFI)
|
|
|
|
CFLAGS_REMOVE_$(EFI_CRT0) := $(CFLAGS_NON_EFI)
|
|
|
|
|
|
|
|
CFLAGS_$(EFI_RELOC) := $(CFLAGS_EFI)
|
|
|
|
CFLAGS_REMOVE_$(EFI_RELOC) := $(CFLAGS_NON_EFI)
|
|
|
|
|
|
|
|
extra-$(CONFIG_CMD_BOOTEFI_HELLO) += $(EFI_CRT0) $(EFI_RELOC)
|
|
|
|
extra-$(CONFIG_EFI) += $(EFI_CRT0) $(EFI_RELOC)
|