blob: a77186582745f8d7313f76bd2130770ee090552f [file] [log] [blame]
Bryan O'Donoghue38c45612018-07-27 13:50:15 +01001#
2# Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7# Architecture
8$(eval $(call add_define,ARMV7_SUPPORTS_LARGE_PAGE_ADDRESSING))
9
10# Tune compiler for Cortex-A7
11ifeq ($(notdir $(CC)),armclang)
12 TF_CFLAGS += -mfpu=neon
13 ASFLAGS += -mfpu=neon
14else ifneq ($(findstring clang,$(notdir $(CC))),)
15 TF_CFLAGS += -mfpu=neon
16 ASFLAGS += -mfpu=neon
17else
18 TF_CFLAGS += -mfpu=neon
19 ASFLAGS += -mfpu=neon
20endif
21
22# Platform
23PLAT_INCLUDES := -Idrivers/imx/uart \
24 -Iinclude/common/tbbr \
Bryan O'Donoghue38c45612018-07-27 13:50:15 +010025 -Iplat/imx/common/include/ \
26 -Iplat/imx/imx7/warp7/include \
27 -Idrivers/imx/timer \
28 -Idrivers/imx/usdhc \
29 -Iplat/imx/imx7/include
30
31# Translation tables library
32include lib/xlat_tables_v2/xlat_tables.mk
33
34BL2_SOURCES += common/desc_image_load.c \
35 drivers/console/aarch32/console.S \
36 drivers/delay_timer/delay_timer.c \
37 drivers/mmc/mmc.c \
38 drivers/io/io_block.c \
39 drivers/io/io_fip.c \
40 drivers/io/io_memmap.c \
41 drivers/io/io_storage.c \
42 drivers/imx/timer/imx_gpt.c \
43 drivers/imx/uart/imx_uart.c \
44 drivers/imx/uart/imx_crash_uart.S \
45 drivers/imx/usdhc/imx_usdhc.c \
46 lib/aarch32/arm32_aeabi_divmod.c \
47 lib/aarch32/arm32_aeabi_divmod_a32.S \
48 lib/cpus/aarch32/cortex_a7.S \
49 lib/optee/optee_utils.c \
50 plat/imx/common/imx_aips.c \
51 plat/imx/common/imx_caam.c \
52 plat/imx/common/imx_clock.c \
53 plat/imx/common/imx_csu.c \
54 plat/imx/common/imx_io_mux.c \
55 plat/imx/common/imx_snvs.c \
56 plat/imx/common/imx_wdog.c \
57 plat/imx/common/imx7_clock.c \
58 plat/imx/imx7/warp7/aarch32/warp7_helpers.S \
59 plat/imx/imx7/warp7/warp7_bl2_el3_setup.c \
60 plat/imx/imx7/warp7/warp7_bl2_mem_params_desc.c \
61 plat/imx/imx7/warp7/warp7_io_storage.c \
62 plat/imx/imx7/warp7/warp7_image_load.c \
63 ${XLAT_TABLES_LIB_SRCS}
64
65# Build config flags
66# ------------------
67
68WORKAROUND_CVE_2017_5715 := 0
69
Bryan O'Donoghue38c45612018-07-27 13:50:15 +010070# Enable reset to BL31 by default
71RESET_TO_BL31 := 0
72
73# Non-TF Boot ROM
74BL2_AT_EL3 := 1
75
76# Indicate single-core
77COLD_BOOT_SINGLE_CPU := 1
78
79# Have different sections for code and rodata
80SEPARATE_CODE_AND_RODATA := 1
81
82# Use Coherent memory
83USE_COHERENT_MEM := 1
84
Bryan O'Donoghue38c45612018-07-27 13:50:15 +010085# PLAT_WARP7_UART
86PLAT_WARP7_UART :=1
87$(eval $(call add_define,PLAT_WARP7_UART))
88
89# Verify build config
90# -------------------
91
Bryan O'Donoghue38c45612018-07-27 13:50:15 +010092ifeq (${ARCH},aarch64)
93 $(error Error: AArch64 not supported on i.mx7)
94endif