]>
Commit | Line | Data |
---|---|---|
f47713f3 | 1 | # |
f9328639 | 2 | # (C) Copyright 2002-2006 |
f47713f3 WD |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | |
1a459660 | 5 | # SPDX-License-Identifier: GPL-2.0+ |
f47713f3 WD |
6 | # |
7 | ||
c5a543ea | 8 | lib-$(CONFIG_USE_PRIVATE_LIBGCC) += ashldi3.o ashrdi3.o lshrdi3.o \ |
0bf65c64 MV |
9 | lib1funcs.o uldivmod.o div0.o \ |
10 | div64.o muldi3.o | |
823afe7c | 11 | |
12d8a729 | 12 | ifdef CONFIG_CPU_V7M |
13 | obj-y += vectors_m.o crt0.o | |
14 | else ifdef CONFIG_ARM64 | |
0ae76531 DF |
15 | obj-y += crt0_64.o |
16 | else | |
41623c91 | 17 | obj-y += vectors.o crt0.o |
0ae76531 | 18 | endif |
e05e5de7 | 19 | |
c497be78 | 20 | ifndef CONFIG_SPL_BUILD |
0ae76531 DF |
21 | ifdef CONFIG_ARM64 |
22 | obj-y += relocate_64.o | |
23 | else | |
24 | obj-y += relocate.o | |
25 | endif | |
959daa21 | 26 | |
f99993c1 | 27 | obj-$(CONFIG_CPU_V7M) += cmd_boot.o |
fa8f9508 | 28 | obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o |
5db28905 | 29 | obj-$(CONFIG_CMD_BOOTI) += bootm.o |
fa8f9508 | 30 | obj-$(CONFIG_CMD_BOOTM) += bootm.o |
5db28905 | 31 | obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o |
fa8f9508 MY |
32 | obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o |
33 | obj-$(CONFIG_USE_ARCH_MEMSET) += memset.o | |
34 | obj-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o | |
6507f133 | 35 | else |
fa8f9508 | 36 | obj-$(CONFIG_SPL_FRAMEWORK) += spl.o |
431889d6 | 37 | obj-$(CONFIG_SPL_FRAMEWORK) += zimage.o |
05bad4aa | 38 | endif |
261d2760 | 39 | obj-$(CONFIG_SEMIHOSTING) += semihosting.o |
823afe7c | 40 | |
d0b5d9da | 41 | obj-y += sections.o |
68145d4c | 42 | obj-y += stack.o |
12d8a729 | 43 | ifdef CONFIG_CPU_V7M |
44 | obj-y += interrupts_m.o | |
45 | else ifdef CONFIG_ARM64 | |
3ffa95c2 | 46 | obj-y += ccn504.o |
c71645ad | 47 | obj-y += gic_64.o |
0ae76531 DF |
48 | obj-y += interrupts_64.o |
49 | else | |
fa8f9508 | 50 | obj-y += interrupts.o |
0ae76531 | 51 | endif |
11636258 | 52 | ifndef CONFIG_SYSRESET |
fa8f9508 | 53 | obj-y += reset.o |
c6aabe92 | 54 | endif |
52b1bf2c | 55 | |
fa8f9508 | 56 | obj-y += cache.o |
0ae76531 | 57 | ifndef CONFIG_ARM64 |
fa8f9508 | 58 | obj-y += cache-cp15.o |
0ae76531 | 59 | endif |
f772acf8 | 60 | |
45684ae3 HZ |
61 | obj-y += psci-dt.o |
62 | ||
51b17d49 MY |
63 | obj-$(CONFIG_DEBUG_LL) += debug.o |
64 | ||
f772acf8 WD |
65 | # For EABI conformant tool chains, provide eabi_compat() |
66 | ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS))) | |
fa8f9508 | 67 | extra-y += eabi_compat.o |
52b1bf2c | 68 | endif |
62e92077 | 69 | |
c0db6f8d | 70 | asflags-y += -DCONFIG_ARM_ASM_UNIFIED |
c0db6f8d | 71 | |
62e92077 AA |
72 | # some files can only build in ARM or THUMB2, not THUMB1 |
73 | ||
74 | ifdef CONFIG_SYS_THUMB_BUILD | |
c0db6f8d | 75 | asflags-$(CONFIG_HAS_THUMB2) += -DCONFIG_THUMB2_KERNEL |
62e92077 AA |
76 | ifndef CONFIG_HAS_THUMB2 |
77 | ||
78 | # for C files, just apend -marm, which will override previous -mthumb* | |
79 | ||
80 | CFLAGS_cache.o := -marm | |
81 | CFLAGS_cache-cp15.o := -marm | |
82 | ||
83 | # For .S, drop -mthumb* and other thumb-related options. | |
84 | # CFLAGS_REMOVE_* would not have an effet, so AFLAGS_REMOVE_* | |
85 | # was implemented and is used here. | |
86 | # Also, define ${target}_NO_THUMB_BUILD for these two targets | |
87 | # so that the code knows it should not use Thumb. | |
88 | ||
89 | AFLAGS_REMOVE_memset.o := -mthumb -mthumb-interwork | |
90 | AFLAGS_REMOVE_memcpy.o := -mthumb -mthumb-interwork | |
91 | AFLAGS_memset.o := -DMEMSET_NO_THUMB_BUILD | |
92 | AFLAGS_memcpy.o := -DMEMCPY_NO_THUMB_BUILD | |
62e92077 AA |
93 | endif |
94 | endif | |
dd46eef2 SG |
95 | |
96 | # For building EFI apps | |
97 | CFLAGS_$(EFI_CRT0) := $(CFLAGS_EFI) | |
98 | CFLAGS_REMOVE_$(EFI_CRT0) := $(CFLAGS_NON_EFI) | |
99 | ||
100 | CFLAGS_$(EFI_RELOC) := $(CFLAGS_EFI) | |
101 | CFLAGS_REMOVE_$(EFI_RELOC) := $(CFLAGS_NON_EFI) | |
102 | ||
95b62b2e | 103 | extra-$(CONFIG_CMD_BOOTEFI_HELLO_COMPILE) += $(EFI_CRT0) $(EFI_RELOC) |
dd46eef2 | 104 | extra-$(CONFIG_EFI) += $(EFI_CRT0) $(EFI_RELOC) |