blob: 8b0dc5cf37451a586467da2590bd4f23c2d71e00 [file] [log] [blame]
Usama Arif82e95092019-06-18 16:46:05 +01001#
Louis Mayencourt5a15b2d2019-10-17 14:46:51 +01002# Copyright (c) 2019-2020, Arm Limited. All rights reserved.
Usama Arif82e95092019-06-18 16:46:05 +01003#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
Louis Mayencourt5a15b2d2019-10-17 14:46:51 +01007# Firmware Configuration Framework sources
8include lib/fconf/fconf.mk
9
Usama Arif82e95092019-06-18 16:46:05 +010010# Add `libfdt` and Arm common helpers required for Dynamic Config
11include lib/libfdt/libfdt.mk
12
13DYN_CFG_SOURCES += plat/arm/common/arm_dyn_cfg.c \
14 plat/arm/common/arm_dyn_cfg_helpers.c \
15 common/fdt_wrappers.c
16
Alexei Fedorovcaa18022020-07-14 10:47:25 +010017# Include GICv2 driver files
18include drivers/arm/gic/v2/gicv2.mk
19
20A5DS_GIC_SOURCES := ${GICV2_SOURCES} \
Usama Arif82e95092019-06-18 16:46:05 +010021 plat/common/plat_gicv2.c \
22 plat/arm/common/arm_gicv2.c
23
24A5DS_SECURITY_SOURCES := plat/arm/board/a5ds/a5ds_security.c
25
26PLAT_INCLUDES := -Iplat/arm/board/a5ds/include
27
28PLAT_BL_COMMON_SOURCES := drivers/arm/pl011/${ARCH}/pl011_console.S \
29 plat/arm/board/a5ds/a5ds_common.c \
30 plat/arm/common/${ARCH}/arm_helpers.S \
31 plat/arm/common/arm_common.c \
32 plat/arm/common/arm_console.c \
33 plat/arm/board/common/${ARCH}/board_arm_helpers.S
34
35A5DS_CPU_LIBS := lib/cpus/aarch32/cortex_a5.S
36
37BL1_SOURCES += drivers/io/io_fip.c \
38 drivers/io/io_memmap.c \
39 drivers/io/io_storage.c \
40 drivers/cfi/v2m/v2m_flash.c \
41 plat/arm/common/arm_bl1_setup.c \
42 plat/arm/common/arm_err.c \
Ambroise Vincentfa42c9e2019-07-04 14:58:45 +010043 plat/arm/board/a5ds/a5ds_err.c \
Usama Arif82e95092019-06-18 16:46:05 +010044 plat/arm/common/arm_io_storage.c \
Louis Mayencourt6b232d92020-02-28 16:57:30 +000045 plat/arm/common/fconf/arm_fconf_io.c \
Usama Arif82e95092019-06-18 16:46:05 +010046 plat/arm/board/a5ds/${ARCH}/a5ds_helpers.S \
47 plat/arm/board/a5ds/a5ds_bl1_setup.c \
48 lib/aarch32/arm32_aeabi_divmod.c \
49 lib/aarch32/arm32_aeabi_divmod_a32.S \
50 ${A5DS_CPU_LIBS} \
51 ${DYN_CFG_SOURCES}
52
53BL2_SOURCES += lib/aarch32/arm32_aeabi_divmod.c \
54 lib/aarch32/arm32_aeabi_divmod_a32.S \
55 drivers/delay_timer/delay_timer.c \
56 drivers/delay_timer/generic_delay_timer.c \
57 drivers/cfi/v2m/v2m_flash.c \
58 drivers/io/io_fip.c \
59 drivers/io/io_memmap.c \
60 drivers/io/io_storage.c \
61 plat/arm/board/a5ds/a5ds_bl2_setup.c \
62 plat/arm/common/arm_bl2_setup.c \
63 plat/arm/common/arm_err.c \
Ambroise Vincentfa42c9e2019-07-04 14:58:45 +010064 plat/arm/board/a5ds/a5ds_err.c \
Usama Arif82e95092019-06-18 16:46:05 +010065 plat/arm/common/arm_io_storage.c \
Louis Mayencourt6b232d92020-02-28 16:57:30 +000066 plat/arm/common/fconf/arm_fconf_io.c \
Usama Arif82e95092019-06-18 16:46:05 +010067 plat/arm/common/${ARCH}/arm_bl2_mem_params_desc.c \
68 plat/arm/common/arm_image_load.c \
69 common/desc_image_load.c \
70 ${DYN_CFG_SOURCES} \
71 ${A5DS_SECURITY_SOURCES}
72
73# Add the FDT_SOURCES and options for Dynamic Config (only for Unix env)
74ifdef UNIX_MK
75
Manish V Badarkhe64616a52020-05-31 08:53:40 +010076FW_CONFIG := ${BUILD_PLAT}/fdts/a5ds_fw_config.dtb
77TB_FW_CONFIG := ${BUILD_PLAT}/fdts/a5ds_tb_fw_config.dtb
Usama Arif82e95092019-06-18 16:46:05 +010078
79# Add the TB_FW_CONFIG to FIP and specify the same to certtool
Anders Dellien3f694742020-08-23 19:32:48 +010080$(eval $(call TOOL_ADD_PAYLOAD,${TB_FW_CONFIG},--tb-fw-config,${TB_FW_CONFIG}))
Manish V Badarkhe64616a52020-05-31 08:53:40 +010081# Add the FW_CONFIG to FIP and specify the same to certtool
Anders Dellien3f694742020-08-23 19:32:48 +010082$(eval $(call TOOL_ADD_PAYLOAD,${FW_CONFIG},--fw-config,${FW_CONFIG}))
Usama Arif82e95092019-06-18 16:46:05 +010083
84$(eval FVP_HW_CONFIG := ${BUILD_PLAT}/$(patsubst %.dts,%.dtb, \
85 fdts/$(notdir ${FVP_HW_CONFIG_DTS})))
86# Add the HW_CONFIG to FIP and specify the same to certtool
Anders Dellien3f694742020-08-23 19:32:48 +010087$(eval $(call TOOL_ADD_PAYLOAD,${FVP_HW_CONFIG},--hw-config,${FVP_HW_CONFIG}))
Usama Arif82e95092019-06-18 16:46:05 +010088
Louis Mayencourt6d2b5732019-12-17 13:17:25 +000089FDT_SOURCES += plat/arm/board/a5ds/fdts/a5ds_fw_config.dts \
Manish V Badarkhe64616a52020-05-31 08:53:40 +010090 plat/arm/board/a5ds/fdts/a5ds_tb_fw_config.dts \
Usama Arif82e95092019-06-18 16:46:05 +010091 ${FVP_HW_CONFIG_DTS}
92endif
93
94NEED_BL32 := yes
95
96MULTI_CONSOLE_API := 1
97
98PLAT_BL_COMMON_SOURCES += lib/xlat_tables/aarch32/nonlpae_tables.c
99
100# Use translation tables library v1 when using Cortex-A5
101ARM_XLAT_TABLES_LIB_V1 := 1
102$(eval $(call assert_boolean,ARM_XLAT_TABLES_LIB_V1))
103$(eval $(call add_define,ARM_XLAT_TABLES_LIB_V1))
104
105$(eval $(call assert_boolean,ARM_DISABLE_TRUSTED_WDOG))
106$(eval $(call add_define,ARM_DISABLE_TRUSTED_WDOG))