Bryan O'Donoghue | 38c4561 | 2018-07-27 13:50:15 +0100 | [diff] [blame] | 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 |
| 11 | ifeq ($(notdir $(CC)),armclang) |
| 12 | TF_CFLAGS += -mfpu=neon |
| 13 | ASFLAGS += -mfpu=neon |
| 14 | else ifneq ($(findstring clang,$(notdir $(CC))),) |
| 15 | TF_CFLAGS += -mfpu=neon |
| 16 | ASFLAGS += -mfpu=neon |
| 17 | else |
| 18 | TF_CFLAGS += -mfpu=neon |
| 19 | ASFLAGS += -mfpu=neon |
| 20 | endif |
| 21 | |
| 22 | # Platform |
| 23 | PLAT_INCLUDES := -Idrivers/imx/uart \ |
| 24 | -Iinclude/common/tbbr \ |
Bryan O'Donoghue | 38c4561 | 2018-07-27 13:50:15 +0100 | [diff] [blame] | 25 | -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 |
| 32 | include lib/xlat_tables_v2/xlat_tables.mk |
| 33 | |
| 34 | BL2_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 | |
| 68 | WORKAROUND_CVE_2017_5715 := 0 |
| 69 | |
Bryan O'Donoghue | 38c4561 | 2018-07-27 13:50:15 +0100 | [diff] [blame] | 70 | # Enable reset to BL31 by default |
| 71 | RESET_TO_BL31 := 0 |
| 72 | |
| 73 | # Non-TF Boot ROM |
| 74 | BL2_AT_EL3 := 1 |
| 75 | |
| 76 | # Indicate single-core |
| 77 | COLD_BOOT_SINGLE_CPU := 1 |
| 78 | |
| 79 | # Have different sections for code and rodata |
| 80 | SEPARATE_CODE_AND_RODATA := 1 |
| 81 | |
| 82 | # Use Coherent memory |
| 83 | USE_COHERENT_MEM := 1 |
| 84 | |
Bryan O'Donoghue | 38c4561 | 2018-07-27 13:50:15 +0100 | [diff] [blame] | 85 | # PLAT_WARP7_UART |
| 86 | PLAT_WARP7_UART :=1 |
| 87 | $(eval $(call add_define,PLAT_WARP7_UART)) |
| 88 | |
| 89 | # Verify build config |
| 90 | # ------------------- |
| 91 | |
Bryan O'Donoghue | 38c4561 | 2018-07-27 13:50:15 +0100 | [diff] [blame] | 92 | ifeq (${ARCH},aarch64) |
| 93 | $(error Error: AArch64 not supported on i.mx7) |
| 94 | endif |