Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 1 | # |
Alexei Fedorov | 0f30547 | 2019-10-29 14:06:54 +0000 | [diff] [blame] | 2 | # Copyright (c) 2018-2019, 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 |
| 8 | |
Antonio Nino Diaz | 1451f61 | 2018-11-30 10:51:26 +0000 | [diff] [blame] | 9 | CACTUS_DTB := $(BUILD_PLAT)/cactus.dtb |
| 10 | |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 11 | CACTUS_INCLUDES := \ |
| 12 | -Iinclude \ |
| 13 | -Iinclude/common \ |
| 14 | -Iinclude/common/${ARCH} \ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 15 | -Iinclude/lib \ |
| 16 | -Iinclude/lib/${ARCH} \ |
Antonio Nino Diaz | 43ef393 | 2018-07-03 14:39:47 +0100 | [diff] [blame] | 17 | -Iinclude/lib/sprt \ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 18 | -Iinclude/lib/utils \ |
| 19 | -Iinclude/lib/xlat_tables \ |
| 20 | -Iinclude/runtime_services \ |
| 21 | -Iinclude/runtime_services/secure_el0_payloads \ |
| 22 | -Ispm/cactus \ |
| 23 | -Ispm/common \ |
Antonio Nino Diaz | 43ef393 | 2018-07-03 14:39:47 +0100 | [diff] [blame] | 24 | ${SPRT_LIB_INCLUDES} |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 25 | |
| 26 | CACTUS_SOURCES := \ |
| 27 | $(addprefix spm/cactus/, \ |
| 28 | aarch64/cactus_entrypoint.S \ |
| 29 | cactus_main.c \ |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 30 | cactus_tests_memory_attributes.c \ |
| 31 | cactus_tests_misc.c \ |
| 32 | cactus_tests_system_setup.c \ |
| 33 | ) \ |
| 34 | $(addprefix spm/common/, \ |
| 35 | aarch64/sp_arch_helpers.S \ |
| 36 | sp_helpers.c \ |
| 37 | ) \ |
| 38 | |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 39 | # TODO: Remove dependency on TFTF files. |
| 40 | CACTUS_SOURCES += \ |
| 41 | tftf/framework/debug.c \ |
| 42 | tftf/framework/${ARCH}/asm_debug.S |
| 43 | |
| 44 | CACTUS_SOURCES += drivers/arm/pl011/${ARCH}/pl011_console.S \ |
| 45 | lib/${ARCH}/cache_helpers.S \ |
| 46 | lib/${ARCH}/misc_helpers.S \ |
Sandrine Bailleux | 750b7cc | 2018-11-08 14:10:18 +0100 | [diff] [blame] | 47 | lib/locks/${ARCH}/spinlock.S \ |
| 48 | lib/utils/mp_printf.c \ |
Antonio Nino Diaz | 43ef393 | 2018-07-03 14:39:47 +0100 | [diff] [blame] | 49 | ${SPRT_LIB_SOURCES} |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 50 | |
| 51 | CACTUS_LINKERFILE := spm/cactus/cactus.ld.S |
| 52 | |
| 53 | CACTUS_DEFINES := |
| 54 | |
| 55 | $(eval $(call add_define,CACTUS_DEFINES,DEBUG)) |
Alexei Fedorov | 0f30547 | 2019-10-29 14:06:54 +0000 | [diff] [blame] | 56 | $(eval $(call add_define,CACTUS_DEFINES,FVP_MAX_PE_PER_CPU)) |
Sandrine Bailleux | 3cd87d7 | 2018-10-09 11:12:55 +0200 | [diff] [blame] | 57 | $(eval $(call add_define,CACTUS_DEFINES,ENABLE_ASSERTIONS)) |
| 58 | $(eval $(call add_define,CACTUS_DEFINES,LOG_LEVEL)) |
| 59 | $(eval $(call add_define,CACTUS_DEFINES,PLAT_${PLAT})) |
| 60 | ifeq (${ARCH},aarch32) |
| 61 | $(eval $(call add_define,CACTUS_DEFINES,AARCH32)) |
| 62 | else |
| 63 | $(eval $(call add_define,CACTUS_DEFINES,AARCH64)) |
| 64 | endif |
| 65 | |
Antonio Nino Diaz | 1451f61 | 2018-11-30 10:51:26 +0000 | [diff] [blame] | 66 | $(CACTUS_DTB) : $(BUILD_PLAT)/cactus $(BUILD_PLAT)/cactus/cactus.elf |
| 67 | $(CACTUS_DTB) : spm/cactus/cactus.dts |
| 68 | @echo " DTBGEN spm/cactus/cactus.dts" |
| 69 | ${Q}tools/generate_dtb/generate_dtb.sh \ |
| 70 | cactus spm/cactus/cactus.dts $(BUILD_PLAT) |
| 71 | @echo |
| 72 | @echo "Built $@ successfully" |
| 73 | @echo |
| 74 | |
Bence Szépkúti | 537b358 | 2019-11-29 18:23:56 +0100 | [diff] [blame^] | 75 | cactus: $(CACTUS_DTB) |