2002-09-08 19:49:36 +00:00
|
|
|
#
|
2006-09-01 17:49:50 +00:00
|
|
|
# (C) Copyright 2002-2006
|
2002-09-08 19:49:36 +00:00
|
|
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
#
|
2013-07-08 07:37:19 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2002-09-08 19:49:36 +00:00
|
|
|
#
|
|
|
|
|
2016-05-26 16:01:40 +00:00
|
|
|
lib-$(CONFIG_USE_PRIVATE_LIBGCC) += ashldi3.o ashrdi3.o lshrdi3.o \
|
2016-05-26 16:01:44 +00:00
|
|
|
lib1funcs.o uldivmod.o div0.o \
|
|
|
|
div64.o muldi3.o
|
2008-02-27 10:00:47 +00:00
|
|
|
|
2015-03-01 11:44:39 +00:00
|
|
|
ifdef CONFIG_CPU_V7M
|
|
|
|
obj-y += vectors_m.o crt0.o
|
|
|
|
else ifdef CONFIG_ARM64
|
2013-12-14 03:47:35 +00:00
|
|
|
obj-y += crt0_64.o
|
|
|
|
else
|
2014-04-15 14:13:51 +00:00
|
|
|
obj-y += vectors.o crt0.o
|
2013-12-14 03:47:35 +00:00
|
|
|
endif
|
2013-01-08 10:18:02 +00:00
|
|
|
|
2017-10-10 14:21:13 +00:00
|
|
|
ifdef CONFIG_ARM64
|
|
|
|
obj-y += setjmp_aarch64.o
|
|
|
|
else
|
|
|
|
obj-y += setjmp.o
|
|
|
|
endif
|
|
|
|
|
2012-08-31 08:30:13 +00:00
|
|
|
ifndef CONFIG_SPL_BUILD
|
2013-12-14 03:47:35 +00:00
|
|
|
ifdef CONFIG_ARM64
|
|
|
|
obj-y += relocate_64.o
|
|
|
|
else
|
|
|
|
obj-y += relocate.o
|
|
|
|
endif
|
2013-03-11 06:49:57 +00:00
|
|
|
|
2015-05-05 19:00:23 +00:00
|
|
|
obj-$(CONFIG_CPU_V7M) += cmd_boot.o
|
2013-10-17 08:34:52 +00:00
|
|
|
obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
|
2018-01-27 05:59:09 +00:00
|
|
|
obj-$(CONFIG_CMD_BOOTI) += bootm.o image.o
|
2013-10-17 08:34:52 +00:00
|
|
|
obj-$(CONFIG_CMD_BOOTM) += bootm.o
|
2016-08-12 12:31:15 +00:00
|
|
|
obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o
|
2013-10-17 08:34:52 +00:00
|
|
|
obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
|
2012-08-22 22:31:05 +00:00
|
|
|
else
|
2013-10-17 08:34:52 +00:00
|
|
|
obj-$(CONFIG_SPL_FRAMEWORK) += spl.o
|
2016-07-12 18:28:14 +00:00
|
|
|
obj-$(CONFIG_SPL_FRAMEWORK) += zimage.o
|
2017-04-18 11:57:26 +00:00
|
|
|
obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
|
2011-07-13 05:11:06 +00:00
|
|
|
endif
|
2017-01-12 18:16:02 +00:00
|
|
|
obj-$(CONFIG_$(SPL_)USE_ARCH_MEMSET) += memset.o
|
|
|
|
obj-$(CONFIG_$(SPL_)USE_ARCH_MEMCPY) += memcpy.o
|
2014-06-09 18:12:59 +00:00
|
|
|
obj-$(CONFIG_SEMIHOSTING) += semihosting.o
|
2008-02-27 10:00:47 +00:00
|
|
|
|
2014-02-22 16:53:42 +00:00
|
|
|
obj-y += sections.o
|
2015-02-06 22:06:45 +00:00
|
|
|
obj-y += stack.o
|
2015-03-01 11:44:39 +00:00
|
|
|
ifdef CONFIG_CPU_V7M
|
|
|
|
obj-y += interrupts_m.o
|
|
|
|
else ifdef CONFIG_ARM64
|
2017-04-26 00:32:41 +00:00
|
|
|
obj-$(CONFIG_FSL_LAYERSCAPE) += ccn504.o
|
2017-04-26 00:32:40 +00:00
|
|
|
ifneq ($(CONFIG_GICV2)$(CONFIG_GICV3),)
|
2014-03-14 06:26:27 +00:00
|
|
|
obj-y += gic_64.o
|
2017-04-26 00:32:40 +00:00
|
|
|
endif
|
2013-12-14 03:47:35 +00:00
|
|
|
obj-y += interrupts_64.o
|
|
|
|
else
|
2013-10-17 08:34:52 +00:00
|
|
|
obj-y += interrupts.o
|
2013-12-14 03:47:35 +00:00
|
|
|
endif
|
2016-05-12 18:03:35 +00:00
|
|
|
ifndef CONFIG_SYSRESET
|
2013-10-17 08:34:52 +00:00
|
|
|
obj-y += reset.o
|
2015-08-30 22:55:18 +00:00
|
|
|
endif
|
2009-07-23 11:15:59 +00:00
|
|
|
|
2013-10-17 08:34:52 +00:00
|
|
|
obj-y += cache.o
|
2013-12-14 03:47:35 +00:00
|
|
|
ifndef CONFIG_ARM64
|
2017-03-27 20:02:44 +00:00
|
|
|
ifndef CONFIG_CPU_V7M
|
2013-10-17 08:34:52 +00:00
|
|
|
obj-y += cache-cp15.o
|
2013-12-14 03:47:35 +00:00
|
|
|
endif
|
2017-03-27 20:02:44 +00: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 11:17:29 +00:00
|
|
|
|
2016-06-28 12:18:16 +00:00
|
|
|
obj-y += psci-dt.o
|
|
|
|
|
2014-09-01 02:06:34 +00: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 11:17:29 +00:00
|
|
|
# For EABI conformant tool chains, provide eabi_compat()
|
|
|
|
ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS)))
|
2013-10-17 08:34:52 +00:00
|
|
|
extra-y += eabi_compat.o
|
2009-07-23 11:15:59 +00:00
|
|
|
endif
|
2015-10-23 16:06:40 +00:00
|
|
|
|
|
|
|
# some files can only build in ARM or THUMB2, not THUMB1
|
|
|
|
|
2017-03-18 13:01:44 +00:00
|
|
|
ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD
|
2016-05-26 16:01:37 +00:00
|
|
|
asflags-$(CONFIG_HAS_THUMB2) += -DCONFIG_THUMB2_KERNEL
|
2015-10-23 16:06:40 +00:00
|
|
|
ifndef CONFIG_HAS_THUMB2
|
|
|
|
|
|
|
|
# for C files, just apend -marm, which will override previous -mthumb*
|
|
|
|
|
2017-01-02 11:48:26 +00:00
|
|
|
ifndef CONFIG_ARM64
|
2015-10-23 16:06:40 +00:00
|
|
|
CFLAGS_cache.o := -marm
|
|
|
|
CFLAGS_cache-cp15.o := -marm
|
2017-01-02 11:48:26 +00:00
|
|
|
endif
|
2015-10-23 16:06:40 +00:00
|
|
|
|
|
|
|
# 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-07 15:47:10 +00: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)
|
|
|
|
|
2016-11-17 21:40:10 +00:00
|
|
|
extra-$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE) += $(EFI_CRT0) $(EFI_RELOC)
|
2018-01-19 18:01:05 +00:00
|
|
|
extra-$(CONFIG_CMD_BOOTEFI_SELFTEST) += $(EFI_CRT0) $(EFI_RELOC)
|
2016-11-07 15:47:10 +00:00
|
|
|
extra-$(CONFIG_EFI) += $(EFI_CRT0) $(EFI_RELOC)
|