blob: 6e39461e3dc4c2540cf4de9d02848796cabe6561 [file] [log] [blame]
Jiafei Panb9d543c2022-02-18 15:26:08 +08001#
2# Copyright 2022 NXP
3#
4# SPDX-License-Identifier: BSD-3-Clause
5#
6
7# SoC-specific build parameters
8SOC := ls1088a
9PLAT_PATH := plat/nxp
10PLAT_COMMON_PATH:= plat/nxp/common
11PLAT_DRIVERS_PATH:= drivers/nxp
12PLAT_SOC_PATH := ${PLAT_PATH}/soc-${SOC}
13BOARD_PATH := ${PLAT_SOC_PATH}/${BOARD}
14
15# Separate BL2 NOLOAD region (.bss, stack, page tables). need to
16# define BL2_NOLOAD_START and BL2_NOLOAD_LIMIT
17SEPARATE_BL2_NOLOAD_REGION := 1
18
19# get SoC-specific defnitions
20include ${PLAT_SOC_PATH}/soc.def
21include ${PLAT_COMMON_PATH}/plat_make_helper/soc_common_def.mk
22include ${PLAT_COMMON_PATH}/plat_make_helper/plat_build_macros.mk
23
24# For Security Features
25DISABLE_FUSE_WRITE := 1
Howard Lub41f1ed2022-11-01 19:45:46 +080026$(eval $(call SET_NXP_MAKE_FLAG,SMMU_NEEDED,BL2))
Jiafei Panb9d543c2022-02-18 15:26:08 +080027ifeq (${TRUSTED_BOARD_BOOT}, 1)
28ifeq (${GENERATE_COT},1)
29# Save Keys to be used by DDR FIP image
30SAVE_KEYS=1
31endif
Jiafei Panb9d543c2022-02-18 15:26:08 +080032$(eval $(call SET_NXP_MAKE_FLAG,SFP_NEEDED,BL2))
33$(eval $(call SET_NXP_MAKE_FLAG,SNVS_NEEDED,BL2))
34# Used by create_pbl tool to
35# create bl2_<boot_mode>_sec.pbl image
36SECURE_BOOT := yes
37endif
38$(eval $(call SET_NXP_MAKE_FLAG,CRYPTO_NEEDED,BL_COMM))
39
40# Selecting Drivers for SoC
41$(eval $(call SET_NXP_MAKE_FLAG,DCFG_NEEDED,BL_COMM))
42$(eval $(call SET_NXP_MAKE_FLAG,TIMER_NEEDED,BL_COMM))
43$(eval $(call SET_NXP_MAKE_FLAG,INTERCONNECT_NEEDED,BL_COMM))
44$(eval $(call SET_NXP_MAKE_FLAG,GIC_NEEDED,BL31))
45$(eval $(call SET_NXP_MAKE_FLAG,CONSOLE_NEEDED,BL_COMM))
46$(eval $(call SET_NXP_MAKE_FLAG,PMU_NEEDED,BL_COMM))
47$(eval $(call SET_NXP_MAKE_FLAG,DDR_DRIVER_NEEDED,BL2))
48$(eval $(call SET_NXP_MAKE_FLAG,TZASC_NEEDED,BL2))
49$(eval $(call SET_NXP_MAKE_FLAG,I2C_NEEDED,BL2))
50$(eval $(call SET_NXP_MAKE_FLAG,IMG_LOADR_NEEDED,BL2))
51
52# Selecting PSCI & SIP_SVC support
53$(eval $(call SET_NXP_MAKE_FLAG,PSCI_NEEDED,BL31))
54$(eval $(call SET_NXP_MAKE_FLAG,SIPSVC_NEEDED,BL31))
55
56
57# Adding SoC specific files
58include ${PLAT_COMMON_PATH}/soc_errata/errata.mk
59
60PLAT_INCLUDES += -I${PLAT_COMMON_PATH}/include/default\
61 -I${BOARD_PATH}\
62 -I${PLAT_COMMON_PATH}/include/default/ch_${CHASSIS}\
63 -I${PLAT_COMMON_PATH}/soc_errata\
64 -I${PLAT_COMMON_PATH}/include\
65 -I${PLAT_SOC_PATH}/include
66
67ifeq (${SECURE_BOOT},yes)
68include ${PLAT_COMMON_PATH}/tbbr/tbbr.mk
69endif
70
71ifeq (${PSCI_NEEDED}, yes)
72include ${PLAT_COMMON_PATH}/psci/psci.mk
73endif
74
75ifeq (${SIPSVC_NEEDED}, yes)
76include ${PLAT_COMMON_PATH}/sip_svc/sipsvc.mk
77endif
78
79# for fuse-fip & fuse-programming
80ifeq (${FUSE_PROG}, 1)
81include ${PLAT_COMMON_PATH}/fip_handler/fuse_fip/fuse.mk
82endif
83
84ifeq (${IMG_LOADR_NEEDED},yes)
85include $(PLAT_COMMON_PATH)/img_loadr/img_loadr.mk
86endif
87
88# Adding source files for the above selected drivers.
89include ${PLAT_DRIVERS_PATH}/drivers.mk
90
91PLAT_BL_COMMON_SOURCES += ${PLAT_COMMON_PATH}/$(ARCH)/ls_helpers.S\
92 ${PLAT_SOC_PATH}/${ARCH}/${SOC}_helpers.S\
93 ${PLAT_SOC_PATH}/soc.c
94
95BL31_SOURCES += ${PLAT_SOC_PATH}/$(ARCH)/${SOC}.S\
96 ${PSCI_SOURCES}\
97 ${SIPSVC_SOURCES}\
98 ${PLAT_COMMON_PATH}/$(ARCH)/bl31_data.S
99
100ifeq (${TEST_BL31}, 1)
101BL31_SOURCES += ${PLAT_SOC_PATH}/$(ARCH)/bootmain64.S \
102 ${PLAT_SOC_PATH}/$(ARCH)/nonboot64.S
103endif
104
105BL2_SOURCES += ${DDR_CNTLR_SOURCES}\
106 ${TBBR_SOURCES}\
107 ${FUSE_SOURCES}
108
109# Adding TFA setup files
110include ${PLAT_PATH}/common/setup/common.mk