1# 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 \ 25 -Iinclude/plat/arm/common/ \ 26 -Iplat/imx/common/include/ \ 27 -Iplat/imx/imx7/warp7/include \ 28 -Idrivers/imx/timer \ 29 -Idrivers/imx/usdhc \ 30 -Iplat/imx/imx7/include 31 32# Translation tables library 33include lib/xlat_tables_v2/xlat_tables.mk 34 35BL2_SOURCES += common/desc_image_load.c \ 36 drivers/console/aarch32/console.S \ 37 drivers/delay_timer/delay_timer.c \ 38 drivers/mmc/mmc.c \ 39 drivers/io/io_block.c \ 40 drivers/io/io_fip.c \ 41 drivers/io/io_memmap.c \ 42 drivers/io/io_storage.c \ 43 drivers/imx/timer/imx_gpt.c \ 44 drivers/imx/uart/imx_uart.c \ 45 drivers/imx/uart/imx_crash_uart.S \ 46 drivers/imx/usdhc/imx_usdhc.c \ 47 lib/aarch32/arm32_aeabi_divmod.c \ 48 lib/aarch32/arm32_aeabi_divmod_a32.S \ 49 lib/cpus/aarch32/cortex_a7.S \ 50 lib/optee/optee_utils.c \ 51 plat/imx/common/imx_aips.c \ 52 plat/imx/common/imx_caam.c \ 53 plat/imx/common/imx_clock.c \ 54 plat/imx/common/imx_csu.c \ 55 plat/imx/common/imx_io_mux.c \ 56 plat/imx/common/imx_snvs.c \ 57 plat/imx/common/imx_wdog.c \ 58 plat/imx/common/imx7_clock.c \ 59 plat/imx/imx7/warp7/aarch32/warp7_helpers.S \ 60 plat/imx/imx7/warp7/warp7_bl2_el3_setup.c \ 61 plat/imx/imx7/warp7/warp7_bl2_mem_params_desc.c \ 62 plat/imx/imx7/warp7/warp7_io_storage.c \ 63 plat/imx/imx7/warp7/warp7_image_load.c \ 64 ${XLAT_TABLES_LIB_SRCS} 65 66# Build config flags 67# ------------------ 68 69WORKAROUND_CVE_2017_5715 := 0 70 71# Disable the PSCI platform compatibility layer by default 72ENABLE_PLAT_COMPAT := 0 73 74# Enable reset to BL31 by default 75RESET_TO_BL31 := 0 76 77# Non-TF Boot ROM 78BL2_AT_EL3 := 1 79 80# Indicate single-core 81COLD_BOOT_SINGLE_CPU := 1 82 83# Have different sections for code and rodata 84SEPARATE_CODE_AND_RODATA := 1 85 86# Use Coherent memory 87USE_COHERENT_MEM := 1 88 89# Enable new version of image loading required for AArch32 90LOAD_IMAGE_V2 := 1 91 92# PLAT_WARP7_UART 93PLAT_WARP7_UART :=1 94$(eval $(call add_define,PLAT_WARP7_UART)) 95 96# Verify build config 97# ------------------- 98 99ifneq (${LOAD_IMAGE_V2}, 1) 100 $(error Error: warp7 needs LOAD_IMAGE_V2=1) 101endif 102 103ifeq (${ARCH},aarch64) 104 $(error Error: AArch64 not supported on i.mx7) 105endif 106