blob: 4fd357b8d599718dbe5ae8a8ff1662524f572a02 [file] [log] [blame]
Usama Arif82e95092019-06-18 16:46:05 +01001#
2# Copyright (c) 2019, Arm Limited. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7# Add `libfdt` and Arm common helpers required for Dynamic Config
8include lib/libfdt/libfdt.mk
9
10DYN_CFG_SOURCES += plat/arm/common/arm_dyn_cfg.c \
11 plat/arm/common/arm_dyn_cfg_helpers.c \
12 common/fdt_wrappers.c
13
14A5DS_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \
15 drivers/arm/gic/v2/gicv2_main.c \
16 drivers/arm/gic/v2/gicv2_helpers.c \
17 plat/common/plat_gicv2.c \
18 plat/arm/common/arm_gicv2.c
19
20A5DS_SECURITY_SOURCES := plat/arm/board/a5ds/a5ds_security.c
21
22PLAT_INCLUDES := -Iplat/arm/board/a5ds/include
23
24PLAT_BL_COMMON_SOURCES := drivers/arm/pl011/${ARCH}/pl011_console.S \
25 plat/arm/board/a5ds/a5ds_common.c \
26 plat/arm/common/${ARCH}/arm_helpers.S \
27 plat/arm/common/arm_common.c \
28 plat/arm/common/arm_console.c \
29 plat/arm/board/common/${ARCH}/board_arm_helpers.S
30
31A5DS_CPU_LIBS := lib/cpus/aarch32/cortex_a5.S
32
33BL1_SOURCES += drivers/io/io_fip.c \
34 drivers/io/io_memmap.c \
35 drivers/io/io_storage.c \
36 drivers/cfi/v2m/v2m_flash.c \
37 plat/arm/common/arm_bl1_setup.c \
38 plat/arm/common/arm_err.c \
39 plat/arm/common/arm_io_storage.c \
40 plat/arm/board/a5ds/${ARCH}/a5ds_helpers.S \
41 plat/arm/board/a5ds/a5ds_bl1_setup.c \
42 lib/aarch32/arm32_aeabi_divmod.c \
43 lib/aarch32/arm32_aeabi_divmod_a32.S \
44 ${A5DS_CPU_LIBS} \
45 ${DYN_CFG_SOURCES}
46
47BL2_SOURCES += lib/aarch32/arm32_aeabi_divmod.c \
48 lib/aarch32/arm32_aeabi_divmod_a32.S \
49 drivers/delay_timer/delay_timer.c \
50 drivers/delay_timer/generic_delay_timer.c \
51 drivers/cfi/v2m/v2m_flash.c \
52 drivers/io/io_fip.c \
53 drivers/io/io_memmap.c \
54 drivers/io/io_storage.c \
55 plat/arm/board/a5ds/a5ds_bl2_setup.c \
56 plat/arm/common/arm_bl2_setup.c \
57 plat/arm/common/arm_err.c \
58 plat/arm/common/arm_io_storage.c \
59 plat/arm/common/${ARCH}/arm_bl2_mem_params_desc.c \
60 plat/arm/common/arm_image_load.c \
61 common/desc_image_load.c \
62 ${DYN_CFG_SOURCES} \
63 ${A5DS_SECURITY_SOURCES}
64
65# Add the FDT_SOURCES and options for Dynamic Config (only for Unix env)
66ifdef UNIX_MK
67
68FVP_TB_FW_CONFIG := ${BUILD_PLAT}/fdts/a5ds_tb_fw_config.dtb
69
70# Add the TB_FW_CONFIG to FIP and specify the same to certtool
71$(eval $(call TOOL_ADD_PAYLOAD,${FVP_TB_FW_CONFIG},--tb-fw-config))
72
73$(eval FVP_HW_CONFIG := ${BUILD_PLAT}/$(patsubst %.dts,%.dtb, \
74 fdts/$(notdir ${FVP_HW_CONFIG_DTS})))
75# Add the HW_CONFIG to FIP and specify the same to certtool
76$(eval $(call TOOL_ADD_PAYLOAD,${FVP_HW_CONFIG},--hw-config))
77
78FDT_SOURCES += plat/arm/board/a5ds/fdts/a5ds_tb_fw_config.dts \
79 ${FVP_HW_CONFIG_DTS}
80endif
81
82NEED_BL32 := yes
83
84MULTI_CONSOLE_API := 1
85
86PLAT_BL_COMMON_SOURCES += lib/xlat_tables/aarch32/nonlpae_tables.c
87
88# Use translation tables library v1 when using Cortex-A5
89ARM_XLAT_TABLES_LIB_V1 := 1
90$(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1))
91$(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1))
92
93$(eval $(call assert_boolean,ARM_DISABLE_TRUSTED_WDOG))
94$(eval $(call add_define,ARM_DISABLE_TRUSTED_WDOG))