blob: d42b2bfa89fdfca9d138194d6ea6440adae3b778 [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 \
Ambroise Vincentfa42c9e2019-07-04 14:58:45 +010039 plat/arm/board/a5ds/a5ds_err.c \
Usama Arif82e95092019-06-18 16:46:05 +010040 plat/arm/common/arm_io_storage.c \
41 plat/arm/board/a5ds/${ARCH}/a5ds_helpers.S \
42 plat/arm/board/a5ds/a5ds_bl1_setup.c \
43 lib/aarch32/arm32_aeabi_divmod.c \
44 lib/aarch32/arm32_aeabi_divmod_a32.S \
45 ${A5DS_CPU_LIBS} \
46 ${DYN_CFG_SOURCES}
47
48BL2_SOURCES += lib/aarch32/arm32_aeabi_divmod.c \
49 lib/aarch32/arm32_aeabi_divmod_a32.S \
50 drivers/delay_timer/delay_timer.c \
51 drivers/delay_timer/generic_delay_timer.c \
52 drivers/cfi/v2m/v2m_flash.c \
53 drivers/io/io_fip.c \
54 drivers/io/io_memmap.c \
55 drivers/io/io_storage.c \
56 plat/arm/board/a5ds/a5ds_bl2_setup.c \
57 plat/arm/common/arm_bl2_setup.c \
58 plat/arm/common/arm_err.c \
Ambroise Vincentfa42c9e2019-07-04 14:58:45 +010059 plat/arm/board/a5ds/a5ds_err.c \
Usama Arif82e95092019-06-18 16:46:05 +010060 plat/arm/common/arm_io_storage.c \
61 plat/arm/common/${ARCH}/arm_bl2_mem_params_desc.c \
62 plat/arm/common/arm_image_load.c \
63 common/desc_image_load.c \
64 ${DYN_CFG_SOURCES} \
65 ${A5DS_SECURITY_SOURCES}
66
67# Add the FDT_SOURCES and options for Dynamic Config (only for Unix env)
68ifdef UNIX_MK
69
70FVP_TB_FW_CONFIG := ${BUILD_PLAT}/fdts/a5ds_tb_fw_config.dtb
71
72# Add the TB_FW_CONFIG to FIP and specify the same to certtool
73$(eval $(call TOOL_ADD_PAYLOAD,${FVP_TB_FW_CONFIG},--tb-fw-config))
74
75$(eval FVP_HW_CONFIG := ${BUILD_PLAT}/$(patsubst %.dts,%.dtb, \
76 fdts/$(notdir ${FVP_HW_CONFIG_DTS})))
77# Add the HW_CONFIG to FIP and specify the same to certtool
78$(eval $(call TOOL_ADD_PAYLOAD,${FVP_HW_CONFIG},--hw-config))
79
80FDT_SOURCES += plat/arm/board/a5ds/fdts/a5ds_tb_fw_config.dts \
81 ${FVP_HW_CONFIG_DTS}
82endif
83
84NEED_BL32 := yes
85
86MULTI_CONSOLE_API := 1
87
88PLAT_BL_COMMON_SOURCES += lib/xlat_tables/aarch32/nonlpae_tables.c
89
90# Use translation tables library v1 when using Cortex-A5
91ARM_XLAT_TABLES_LIB_V1 := 1
92$(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1))
93$(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1))
94
95$(eval $(call assert_boolean,ARM_DISABLE_TRUSTED_WDOG))
96$(eval $(call add_define,ARM_DISABLE_TRUSTED_WDOG))