Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 1 | # |
Olivier Deprez | afcdb7c | 2019-11-29 14:21:48 +0100 | [diff] [blame^] | 2 | # Copyright (c) 2018-2020, Arm Limited. All rights reserved. |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
Antonio Nino Diaz | 43ef393 | 2018-07-03 14:39:47 +0100 | [diff] [blame] | 7 | include lib/sprt/sprt_client.mk |
Olivier Deprez | afcdb7c | 2019-11-29 14:21:48 +0100 | [diff] [blame^] | 8 | include lib/xlat_tables_v2/xlat_tables.mk |
Antonio Nino Diaz | 43ef393 | 2018-07-03 14:39:47 +0100 | [diff] [blame] | 9 | |
Antonio Nino Diaz | 1451f61 | 2018-11-30 10:51:26 +0000 | [diff] [blame] | 10 | CACTUS_DTB := $(BUILD_PLAT)/cactus.dtb |
| 11 | |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 12 | CACTUS_INCLUDES := \ |
Olivier Deprez | afcdb7c | 2019-11-29 14:21:48 +0100 | [diff] [blame^] | 13 | -Itftf/framework/include \ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 14 | -Iinclude \ |
| 15 | -Iinclude/common \ |
| 16 | -Iinclude/common/${ARCH} \ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 17 | -Iinclude/lib \ |
| 18 | -Iinclude/lib/${ARCH} \ |
Antonio Nino Diaz | 43ef393 | 2018-07-03 14:39:47 +0100 | [diff] [blame] | 19 | -Iinclude/lib/sprt \ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 20 | -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 Diaz | 43ef393 | 2018-07-03 14:39:47 +0100 | [diff] [blame] | 26 | ${SPRT_LIB_INCLUDES} |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 27 | |
| 28 | CACTUS_SOURCES := \ |
| 29 | $(addprefix spm/cactus/, \ |
| 30 | aarch64/cactus_entrypoint.S \ |
| 31 | cactus_main.c \ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 32 | 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 Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 41 | # TODO: Remove dependency on TFTF files. |
| 42 | CACTUS_SOURCES += \ |
| 43 | tftf/framework/debug.c \ |
| 44 | tftf/framework/${ARCH}/asm_debug.S |
| 45 | |
| 46 | CACTUS_SOURCES += drivers/arm/pl011/${ARCH}/pl011_console.S \ |
| 47 | lib/${ARCH}/cache_helpers.S \ |
| 48 | lib/${ARCH}/misc_helpers.S \ |
Olivier Deprez | afcdb7c | 2019-11-29 14:21:48 +0100 | [diff] [blame^] | 49 | lib/smc/${ARCH}/asm_smc.S \ |
| 50 | lib/smc/${ARCH}/smc.c \ |
| 51 | lib/smc/${ARCH}/hvc.c \ |
Sandrine Bailleux | 750b7cc | 2018-11-08 14:10:18 +0100 | [diff] [blame] | 52 | lib/locks/${ARCH}/spinlock.S \ |
| 53 | lib/utils/mp_printf.c \ |
Olivier Deprez | afcdb7c | 2019-11-29 14:21:48 +0100 | [diff] [blame^] | 54 | ${SPRT_LIB_SOURCES} \ |
| 55 | ${XLAT_TABLES_LIB_SRCS} |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 56 | |
| 57 | CACTUS_LINKERFILE := spm/cactus/cactus.ld.S |
| 58 | |
| 59 | CACTUS_DEFINES := |
| 60 | |
| 61 | $(eval $(call add_define,CACTUS_DEFINES,DEBUG)) |
Alexei Fedorov | 0f30547 | 2019-10-29 14:06:54 +0000 | [diff] [blame] | 62 | $(eval $(call add_define,CACTUS_DEFINES,FVP_MAX_PE_PER_CPU)) |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 63 | $(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 Bhavnani | c249d5e | 2020-02-06 16:29:45 -0600 | [diff] [blame] | 66 | |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 67 | |
Antonio Nino Diaz | 1451f61 | 2018-11-30 10:51:26 +0000 | [diff] [blame] | 68 | $(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úti | 537b358 | 2019-11-29 18:23:56 +0100 | [diff] [blame] | 77 | cactus: $(CACTUS_DTB) |