platform.mk 2.07 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#
# Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#

ARM_CORTEX_A7		:=	yes
ARM_WITH_NEON		:=	yes
LOAD_IMAGE_V2		:=	1
BL2_AT_EL3		:=	1
ENABLE_PLAT_COMPAT	:=	0
USE_COHERENT_MEM	:=	0

STM32_TF_VERSION	?=	0

# Not needed for Cortex-A7
WORKAROUND_CVE_2017_5715:=	0

PLAT_INCLUDES		:=	-Iplat/st/stm32mp1/include/
PLAT_INCLUDES		+=	-Iinclude/common/tbbr
PLAT_INCLUDES		+=	-Iinclude/drivers/st

include lib/libfdt/libfdt.mk

PLAT_BL_COMMON_SOURCES	:=	plat/st/stm32mp1/stm32mp1_common.c

PLAT_BL_COMMON_SOURCES	+=	drivers/console/aarch32/console.S			\
				drivers/st/uart/aarch32/stm32_console.S

ifneq (${ENABLE_STACK_PROTECTOR},0)
PLAT_BL_COMMON_SOURCES	+=	plat/st/stm32mp1/stm32mp1_stack_protector.c
endif

include lib/xlat_tables_v2/xlat_tables.mk
PLAT_BL_COMMON_SOURCES	+=	${XLAT_TABLES_LIB_SRCS}

PLAT_BL_COMMON_SOURCES	+=	lib/cpus/aarch32/cortex_a7.S

PLAT_BL_COMMON_SOURCES	+=	${LIBFDT_SRCS}						\
40
				drivers/arm/tzc/tzc400.c				\
41
42
				drivers/delay_timer/delay_timer.c			\
				drivers/delay_timer/generic_delay_timer.c		\
43
44
				drivers/st/clk/stm32mp1_clk.c				\
				drivers/st/clk/stm32mp1_clkfunc.c			\
45
				drivers/st/ddr/stm32mp1_ddr_helpers.c			\
Yann Gautier's avatar
Yann Gautier committed
46
				drivers/st/gpio/stm32_gpio.c				\
Yann Gautier's avatar
Yann Gautier committed
47
48
49
				drivers/st/pmic/stm32_i2c.c				\
				drivers/st/pmic/stm32mp1_pmic.c				\
				drivers/st/pmic/stpmu1.c				\
50
				drivers/st/reset/stm32mp1_reset.c			\
51
				plat/st/stm32mp1/stm32mp1_context.c			\
52
				plat/st/stm32mp1/stm32mp1_dt.c				\
53
54
				plat/st/stm32mp1/stm32mp1_helper.S			\
				plat/st/stm32mp1/stm32mp1_security.c
55
56
57
58
59
60

BL2_SOURCES		+=	drivers/io/io_dummy.c					\
				drivers/io/io_storage.c					\
				plat/st/stm32mp1/bl2_io_storage.c			\
				plat/st/stm32mp1/bl2_plat_setup.c

61
62
63
BL2_SOURCES		+=	drivers/st/ddr/stm32mp1_ddr.c				\
				drivers/st/ddr/stm32mp1_ram.c

64
65
66
67
68
69
70
BL2_SOURCES		+=	common/desc_image_load.c				\
				plat/st/stm32mp1/plat_bl2_mem_params_desc.c		\
				plat/st/stm32mp1/plat_image_load.c

# For memory footprint optimization, build with thumb and interwork support
ASFLAGS			+=	-mthumb -mthumb-interwork
TF_CFLAGS		+=	-mthumb -mthumb-interwork