blob: c588267eed98ff05682dc02f9a24ed19389969c6 [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
Antonio Nino Diaz43ef3932018-07-03 14:39:47 +01007include lib/sprt/sprt_client.mk
Olivier Deprezafcdb7c2019-11-29 14:21:48 +01008include lib/xlat_tables_v2/xlat_tables.mk
Antonio Nino Diaz43ef3932018-07-03 14:39:47 +01009
Antonio Nino Diaz1451f612018-11-30 10:51:26 +000010CACTUS_DTB := $(BUILD_PLAT)/cactus.dtb
11
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020012CACTUS_INCLUDES := \
Olivier Deprezafcdb7c2019-11-29 14:21:48 +010013 -Itftf/framework/include \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020014 -Iinclude \
15 -Iinclude/common \
16 -Iinclude/common/${ARCH} \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020017 -Iinclude/lib \
18 -Iinclude/lib/${ARCH} \
Antonio Nino Diaz43ef3932018-07-03 14:39:47 +010019 -Iinclude/lib/sprt \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020020 -Iinclude/lib/utils \
21 -Iinclude/lib/xlat_tables \
22 -Iinclude/runtime_services \
23 -Iinclude/runtime_services/secure_el0_payloads \
24 -Ispm/cactus \
25 -Ispm/common \
Antonio Nino Diaz43ef3932018-07-03 14:39:47 +010026 ${SPRT_LIB_INCLUDES}
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020027
28CACTUS_SOURCES := \
29 $(addprefix spm/cactus/, \
30 aarch64/cactus_entrypoint.S \
31 cactus_main.c \
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020032 cactus_tests_memory_attributes.c \
33 cactus_tests_misc.c \
34 cactus_tests_system_setup.c \
35 ) \
36 $(addprefix spm/common/, \
37 aarch64/sp_arch_helpers.S \
38 sp_helpers.c \
39 ) \
40
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020041# TODO: Remove dependency on TFTF files.
42CACTUS_SOURCES += \
43 tftf/framework/debug.c \
44 tftf/framework/${ARCH}/asm_debug.S
45
46CACTUS_SOURCES += drivers/arm/pl011/${ARCH}/pl011_console.S \
47 lib/${ARCH}/cache_helpers.S \
48 lib/${ARCH}/misc_helpers.S \
Olivier Deprezafcdb7c2019-11-29 14:21:48 +010049 lib/smc/${ARCH}/asm_smc.S \
50 lib/smc/${ARCH}/smc.c \
51 lib/smc/${ARCH}/hvc.c \
Sandrine Bailleux750b7cc2018-11-08 14:10:18 +010052 lib/locks/${ARCH}/spinlock.S \
53 lib/utils/mp_printf.c \
Olivier Deprezafcdb7c2019-11-29 14:21:48 +010054 ${SPRT_LIB_SOURCES} \
55 ${XLAT_TABLES_LIB_SRCS}
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020056
57CACTUS_LINKERFILE := spm/cactus/cactus.ld.S
58
59CACTUS_DEFINES :=
60
61$(eval $(call add_define,CACTUS_DEFINES,DEBUG))
Alexei Fedorov0f305472019-10-29 14:06:54 +000062$(eval $(call add_define,CACTUS_DEFINES,FVP_MAX_PE_PER_CPU))
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020063$(eval $(call add_define,CACTUS_DEFINES,ENABLE_ASSERTIONS))
64$(eval $(call add_define,CACTUS_DEFINES,LOG_LEVEL))
65$(eval $(call add_define,CACTUS_DEFINES,PLAT_${PLAT}))
Deepika Bhavnanic249d5e2020-02-06 16:29:45 -060066
Sandrine Bailleux3cd87d72018-10-09 11:12:55 +020067
Antonio Nino Diaz1451f612018-11-30 10:51:26 +000068$(CACTUS_DTB) : $(BUILD_PLAT)/cactus $(BUILD_PLAT)/cactus/cactus.elf
69$(CACTUS_DTB) : spm/cactus/cactus.dts
70 @echo " DTBGEN spm/cactus/cactus.dts"
71 ${Q}tools/generate_dtb/generate_dtb.sh \
72 cactus spm/cactus/cactus.dts $(BUILD_PLAT)
73 @echo
74 @echo "Built $@ successfully"
75 @echo
76
Bence Szépkúti537b3582019-11-29 18:23:56 +010077cactus: $(CACTUS_DTB)