blob: a32d3d38aa9f47fa0e40301e879cfad75b170bbd [file] [log] [blame]
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02001#
Olivier Deprezafcdb7c2019-11-29 14:21:48 +01002# Copyright (c) 2018-2020, Arm Limited. All rights reserved.
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +02003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
Olivier Deprezafcdb7c2019-11-29 14:21:48 +01007include lib/xlat_tables_v2/xlat_tables.mk
Antonio Nino Diaz43ef3932018-07-03 14:39:47 +01008
Antonio Nino Diaz1451f612018-11-30 10:51:26 +00009CACTUS_DTB := $(BUILD_PLAT)/cactus.dtb
10
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020011CACTUS_INCLUDES := \
Olivier Deprezafcdb7c2019-11-29 14:21:48 +010012 -Itftf/framework/include \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020013 -Iinclude \
14 -Iinclude/common \
15 -Iinclude/common/${ARCH} \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020016 -Iinclude/lib \
17 -Iinclude/lib/${ARCH} \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020018 -Iinclude/lib/utils \
19 -Iinclude/lib/xlat_tables \
20 -Iinclude/runtime_services \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020021 -Ispm/cactus \
22 -Ispm/common \
23
24CACTUS_SOURCES := \
25 $(addprefix spm/cactus/, \
26 aarch64/cactus_entrypoint.S \
Manish Pandey29495372020-04-09 15:19:26 +010027 cactus_debug.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020028 cactus_main.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020029 ) \
30 $(addprefix spm/common/, \
31 aarch64/sp_arch_helpers.S \
32 sp_helpers.c \
33 ) \
34
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020035# TODO: Remove dependency on TFTF files.
36CACTUS_SOURCES += \
37 tftf/framework/debug.c \
38 tftf/framework/${ARCH}/asm_debug.S
39
40CACTUS_SOURCES += drivers/arm/pl011/${ARCH}/pl011_console.S \
41 lib/${ARCH}/cache_helpers.S \
42 lib/${ARCH}/misc_helpers.S \
Olivier Deprezafcdb7c2019-11-29 14:21:48 +010043 lib/smc/${ARCH}/asm_smc.S \
44 lib/smc/${ARCH}/smc.c \
45 lib/smc/${ARCH}/hvc.c \
Sandrine Bailleux750b7cc2018-11-08 14:10:18 +010046 lib/locks/${ARCH}/spinlock.S \
47 lib/utils/mp_printf.c \
Olivier Deprezafcdb7c2019-11-29 14:21:48 +010048 ${XLAT_TABLES_LIB_SRCS}
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020049
50CACTUS_LINKERFILE := spm/cactus/cactus.ld.S
51
52CACTUS_DEFINES :=
53
54$(eval $(call add_define,CACTUS_DEFINES,DEBUG))
Alexei Fedorov0f305472019-10-29 14:06:54 +000055$(eval $(call add_define,CACTUS_DEFINES,FVP_MAX_PE_PER_CPU))
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020056$(eval $(call add_define,CACTUS_DEFINES,ENABLE_ASSERTIONS))
57$(eval $(call add_define,CACTUS_DEFINES,LOG_LEVEL))
58$(eval $(call add_define,CACTUS_DEFINES,PLAT_${PLAT}))
Deepika Bhavnanic249d5e2020-02-06 16:29:45 -060059
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020060
Antonio Nino Diaz1451f612018-11-30 10:51:26 +000061$(CACTUS_DTB) : $(BUILD_PLAT)/cactus $(BUILD_PLAT)/cactus/cactus.elf
62$(CACTUS_DTB) : spm/cactus/cactus.dts
63 @echo " DTBGEN spm/cactus/cactus.dts"
64 ${Q}tools/generate_dtb/generate_dtb.sh \
65 cactus spm/cactus/cactus.dts $(BUILD_PLAT)
Manish Pandey270ee152020-03-16 22:25:40 +000066 ${Q}tools/generate_json/generate_json.sh \
67 cactus $(PLAT) $(BUILD_TYPE)
Antonio Nino Diaz1451f612018-11-30 10:51:26 +000068 @echo
69 @echo "Built $@ successfully"
70 @echo
71
Bence Szépkúti537b3582019-11-29 18:23:56 +010072cactus: $(CACTUS_DTB)