| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
ifeq ($(CONFIG_ARCH_RAMSTAGE_ARM),y) |
| 8 |
check-ramstage-overlap-regions += postram_cbfs_cache stack ttb |
| 9 |
endif |
| 10 |
|
| 11 |
ifeq ($(CONFIG_ARCH_ARM),y) |
| 12 |
subdirs-y += libgcc/ |
| 13 |
subdirs-y += armv4/ armv7/ |
| 14 |
|
| 15 |
stages_c = $(src)/arch/arm/stages.c |
| 16 |
stages_o = $(obj)/arch/arm/stages.o |
| 17 |
|
| 18 |
$(stages_o): $(stages_c) $(obj)/config.h |
| 19 |
@printf " CC $(subst $(obj)/,,$(@))\n" |
| 20 |
$(CC_arm) -I. $(CPPFLAGS_arm) -c -o $@ $< -marm |
| 21 |
|
| 22 |
|
| 23 |
TARGETS := decompressor bootblock verstage romstage ramstage rmodules_arm |
| 24 |
$(foreach target,$(TARGETS),$(eval $(call src-to-obj,$(target),$(dir)/eabi_compat.c): CFLAGS_$(target) += -fno-lto)) |
| 25 |
|
| 26 |
endif |
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARM),y) |
| 33 |
|
| 34 |
decompressor-y += boot.c |
| 35 |
bootblock-y += boot.c |
| 36 |
decompressor-y += div0.c |
| 37 |
bootblock-y += div0.c |
| 38 |
decompressor-y += eabi_compat.c |
| 39 |
bootblock-y += eabi_compat.c |
| 40 |
decompressor-y += memset.S |
| 41 |
bootblock-y += memset.S |
| 42 |
decompressor-y += memcpy.S |
| 43 |
bootblock-y += memcpy.S |
| 44 |
decompressor-y += memmove.S |
| 45 |
bootblock-y += memmove.S |
| 46 |
|
| 47 |
bootblock-y += clock.c |
| 48 |
bootblock-y += stages.c |
| 49 |
|
| 50 |
$(eval $(call link_stage,bootblock)) |
| 51 |
$(eval $(call link_stage,decompressor)) |
| 52 |
|
| 53 |
endif |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
ifeq ($(CONFIG_ARCH_VERSTAGE_ARM),y) |
| 60 |
|
| 61 |
$(eval $(call link_stage,verstage)) |
| 62 |
|
| 63 |
verstage-y += boot.c |
| 64 |
verstage-y += div0.c |
| 65 |
verstage-y += eabi_compat.c |
| 66 |
verstage-y += memset.S |
| 67 |
verstage-y += memcpy.S |
| 68 |
verstage-y += memmove.S |
| 69 |
verstage-y += stages.c |
| 70 |
|
| 71 |
endif |
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
ifeq ($(CONFIG_ARCH_ROMSTAGE_ARM),y) |
| 78 |
|
| 79 |
romstage-y += boot.c |
| 80 |
romstage-y += stages.c |
| 81 |
romstage-y += div0.c |
| 82 |
romstage-y += eabi_compat.c |
| 83 |
romstage-y += memset.S |
| 84 |
romstage-y += memcpy.S |
| 85 |
romstage-y += memmove.S |
| 86 |
romstage-y += clock.c |
| 87 |
rmodules_arm-y += memset.S |
| 88 |
rmodules_arm-y += memcpy.S |
| 89 |
rmodules_arm-y += memmove.S |
| 90 |
rmodules_arm-y += eabi_compat.c |
| 91 |
|
| 92 |
$(eval $(call link_stage,romstage)) |
| 93 |
|
| 94 |
endif |
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
ifeq ($(CONFIG_ARCH_RAMSTAGE_ARM),y) |
| 101 |
|
| 102 |
ramstage-y += stages.c |
| 103 |
ramstage-y += div0.c |
| 104 |
ramstage-y += eabi_compat.c |
| 105 |
ramstage-y += boot.c |
| 106 |
ramstage-y += tables.c |
| 107 |
ramstage-y += memset.S |
| 108 |
ramstage-y += memcpy.S |
| 109 |
ramstage-y += memmove.S |
| 110 |
ramstage-y += clock.c |
| 111 |
ramstage-y += boot_linux.S |
| 112 |
ramstage-$(CONFIG_PAYLOAD_FIT_SUPPORT) += fit_payload.c |
| 113 |
|
| 114 |
rmodules_arm-y += memset.S |
| 115 |
rmodules_arm-y += memcpy.S |
| 116 |
rmodules_arm-y += memmove.S |
| 117 |
rmodules_arm-y += eabi_compat.c |
| 118 |
ramstage-srcs += $(wildcard src/mainboard/$(MAINBOARDDIR)/mainboard.c) |
| 119 |
|
| 120 |
$(eval $(call link_stage,ramstage)) |
| 121 |
|
| 122 |
endif |