]> Git Repo - J-u-boot.git/blob - arch/arm/lib/Makefile
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
[J-u-boot.git] / arch / arm / lib / Makefile
1 # SPDX-License-Identifier: GPL-2.0+
2 #
3 # (C) Copyright 2002-2006
4 # Wolfgang Denk, DENX Software Engineering, [email protected].
5
6 lib-$(CONFIG_USE_PRIVATE_LIBGCC) += ashldi3.o ashrdi3.o lshrdi3.o \
7                                     lib1funcs.o uldivmod.o div0.o \
8                                     div64.o muldi3.o
9
10 ifdef CONFIG_CPU_V7M
11 obj-y   += vectors_m.o crt0.o
12 else ifdef CONFIG_ARM64
13 obj-y   += crt0_64.o
14 else
15 obj-y   += vectors.o crt0.o
16 endif
17
18 ifdef CONFIG_ARM64
19 obj-y   += setjmp_aarch64.o
20 else
21 obj-y   += setjmp.o
22 endif
23
24 ifndef CONFIG_SPL_BUILD
25 ifdef CONFIG_ARM64
26 obj-y   += relocate_64.o
27 else
28 obj-y   += relocate.o
29 endif
30
31 obj-$(CONFIG_CPU_V7M) += cmd_boot.o
32 obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
33 obj-$(CONFIG_CMD_BOOTI) += bootm.o image.o
34 obj-$(CONFIG_CMD_BOOTM) += bootm.o
35 obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o
36 obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
37 else
38 obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) += spl.o
39 obj-$(CONFIG_SPL_FRAMEWORK) += zimage.o
40 obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
41 endif
42 obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMSET) += memset.o
43 obj-$(CONFIG_$(SPL_TPL_)USE_ARCH_MEMCPY) += memcpy.o
44 obj-$(CONFIG_SEMIHOSTING) += semihosting.o
45
46 obj-y   += bdinfo.o
47 obj-y   += sections.o
48 CFLAGS_REMOVE_sections.o := $(LTO_CFLAGS)
49
50 obj-y   += stack.o
51 ifdef CONFIG_CPU_V7M
52 obj-y   += interrupts_m.o
53 else ifdef CONFIG_ARM64
54 obj-$(CONFIG_FSL_LAYERSCAPE) += ccn504.o
55 ifneq ($(CONFIG_GICV2)$(CONFIG_GICV3),)
56 obj-y   += gic_64.o
57 endif
58 obj-$(CONFIG_GIC_V3_ITS)        += gic-v3-its.o
59 obj-y   += interrupts_64.o
60 else
61 obj-y   += interrupts.o
62 endif
63 ifndef CONFIG_$(SPL_TPL_)SYSRESET
64 obj-y   += reset.o
65 endif
66
67 obj-y   += cache.o
68 obj-$(CONFIG_SYS_ARM_CACHE_CP15)        += cache-cp15.o
69 CFLAGS_REMOVE_cache-cp15.o := $(LTO_CFLAGS)
70
71 obj-y   += psci-dt.o
72
73 obj-$(CONFIG_DEBUG_LL)  += debug.o
74
75 # For EABI conformant tool chains, provide eabi_compat()
76 ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS)))
77 extra-y += eabi_compat.o
78 endif
79
80 # some files can only build in ARM or THUMB2, not THUMB1
81
82 ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD
83 asflags-$(CONFIG_HAS_THUMB2) += -DCONFIG_THUMB2_KERNEL
84 ifndef CONFIG_HAS_THUMB2
85
86 # for C files, just apend -marm, which will override previous -mthumb*
87
88 ifndef CONFIG_ARM64
89 CFLAGS_cache.o := -marm
90 CFLAGS_cache-cp15.o := -marm
91 endif
92
93 # For .S, drop -mthumb* and other thumb-related options.
94 # CFLAGS_REMOVE_* would not have an effet, so AFLAGS_REMOVE_*
95 # was implemented and is used here.
96 # Also, define ${target}_NO_THUMB_BUILD for these two targets
97 # so that the code knows it should not use Thumb.
98
99 AFLAGS_REMOVE_memset.o := -mthumb -mthumb-interwork
100 AFLAGS_REMOVE_memcpy.o := -mthumb -mthumb-interwork
101 AFLAGS_memset.o := -DMEMSET_NO_THUMB_BUILD
102 AFLAGS_memcpy.o := -DMEMCPY_NO_THUMB_BUILD
103 endif
104 endif
105
106 # For building EFI apps
107 CFLAGS_$(EFI_CRT0) := $(CFLAGS_EFI)
108 CFLAGS_REMOVE_$(EFI_CRT0) := $(CFLAGS_NON_EFI)
109
110 CFLAGS_$(EFI_RELOC) := $(CFLAGS_EFI)
111 CFLAGS_REMOVE_$(EFI_RELOC) := $(CFLAGS_NON_EFI)
112
113 extra-$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE) += $(EFI_CRT0) $(EFI_RELOC)
114 # TODO: As of v2019.01 the relocation code for the EFI application cannot
115 # be built on ARMv7-M.
116 ifndef CONFIG_CPU_V7M
117 #extra-$(CONFIG_CMD_BOOTEFI_SELFTEST) += $(EFI_CRT0) $(EFI_RELOC)
118 endif
119 extra-$(CONFIG_EFI) += $(EFI_CRT0) $(EFI_RELOC)
This page took 0.035832 seconds and 4 git commands to generate.