blob: e965499dcf50cf01d0933772a99cb072bb366419 [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 \
J-Alves9f6f0142020-06-17 15:37:59 +010028 cactus_ffa_tests.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020029 cactus_main.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020030 ) \
31 $(addprefix spm/common/, \
32 aarch64/sp_arch_helpers.S \
33 sp_helpers.c \
34 ) \
35
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020036# TODO: Remove dependency on TFTF files.
37CACTUS_SOURCES += \
38 tftf/framework/debug.c \
J-Alves5aecd982020-06-11 10:25:33 +010039 tftf/framework/${ARCH}/asm_debug.S \
40 tftf/tests/runtime_services/secure_service/ffa_helpers.c
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020041
42CACTUS_SOURCES += drivers/arm/pl011/${ARCH}/pl011_console.S \
43 lib/${ARCH}/cache_helpers.S \
44 lib/${ARCH}/misc_helpers.S \
Olivier Deprezafcdb7c2019-11-29 14:21:48 +010045 lib/smc/${ARCH}/asm_smc.S \
46 lib/smc/${ARCH}/smc.c \
47 lib/smc/${ARCH}/hvc.c \
Sandrine Bailleux750b7cc2018-11-08 14:10:18 +010048 lib/locks/${ARCH}/spinlock.S \
49 lib/utils/mp_printf.c \
Olivier Deprezafcdb7c2019-11-29 14:21:48 +010050 ${XLAT_TABLES_LIB_SRCS}
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020051
52CACTUS_LINKERFILE := spm/cactus/cactus.ld.S
53
54CACTUS_DEFINES :=
55
56$(eval $(call add_define,CACTUS_DEFINES,DEBUG))
Alexei Fedorov0f305472019-10-29 14:06:54 +000057$(eval $(call add_define,CACTUS_DEFINES,FVP_MAX_PE_PER_CPU))
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020058$(eval $(call add_define,CACTUS_DEFINES,ENABLE_ASSERTIONS))
59$(eval $(call add_define,CACTUS_DEFINES,LOG_LEVEL))
60$(eval $(call add_define,CACTUS_DEFINES,PLAT_${PLAT}))
Deepika Bhavnanic249d5e2020-02-06 16:29:45 -060061
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020062
Antonio Nino Diaz1451f612018-11-30 10:51:26 +000063$(CACTUS_DTB) : $(BUILD_PLAT)/cactus $(BUILD_PLAT)/cactus/cactus.elf
64$(CACTUS_DTB) : spm/cactus/cactus.dts
65 @echo " DTBGEN spm/cactus/cactus.dts"
66 ${Q}tools/generate_dtb/generate_dtb.sh \
67 cactus spm/cactus/cactus.dts $(BUILD_PLAT)
Manish Pandey270ee152020-03-16 22:25:40 +000068 ${Q}tools/generate_json/generate_json.sh \
69 cactus $(PLAT) $(BUILD_TYPE)
Antonio Nino Diaz1451f612018-11-30 10:51:26 +000070 @echo
71 @echo "Built $@ successfully"
72 @echo
73
Bence Szépkúti537b3582019-11-29 18:23:56 +010074cactus: $(CACTUS_DTB)