Debian Codegraph @

plat/nxp/soc-ls1088a/soc.mk

raw
1 #
2 # Copyright 2022 NXP
3 #
4 # SPDX-License-Identifier: BSD-3-Clause
5 #
6
7 # SoC-specific build parameters
8 SOC := ls1088a
9 PLAT_PATH := plat/nxp
10 PLAT_COMMON_PATH:= plat/nxp/common
11 PLAT_DRIVERS_PATH:= drivers/nxp
12 PLAT_SOC_PATH := ${PLAT_PATH}/soc-${SOC}
13 BOARD_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
17 SEPARATE_BL2_NOLOAD_REGION := 1
18
19 # get SoC-specific defnitions
20 include ${PLAT_SOC_PATH}/soc.def
21 include ${PLAT_COMMON_PATH}/plat_make_helper/soc_common_def.mk
22 include ${PLAT_COMMON_PATH}/plat_make_helper/plat_build_macros.mk
23
24 # For Security Features
25 DISABLE_FUSE_WRITE := 1
26 $(eval $(call SET_NXP_MAKE_FLAG,SMMU_NEEDED,BL2))
27 ifeq (${TRUSTED_BOARD_BOOT}, 1)
28 ifeq (${GENERATE_COT},1)
29 # Save Keys to be used by DDR FIP image
30 SAVE_KEYS=1
31 endif
32 $(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
36 SECURE_BOOT := yes
37 endif
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
58 include ${PLAT_COMMON_PATH}/soc_errata/errata.mk
59
60 PLAT_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
67 ifeq (${SECURE_BOOT},yes)
68 include ${PLAT_COMMON_PATH}/tbbr/tbbr.mk
69 endif
70
71 ifeq (${PSCI_NEEDED}, yes)
72 include ${PLAT_COMMON_PATH}/psci/psci.mk
73 endif
74
75 ifeq (${SIPSVC_NEEDED}, yes)
76 include ${PLAT_COMMON_PATH}/sip_svc/sipsvc.mk
77 endif
78
79 # for fuse-fip & fuse-programming
80 ifeq (${FUSE_PROG}, 1)
81 include ${PLAT_COMMON_PATH}/fip_handler/fuse_fip/fuse.mk
82 endif
83
84 ifeq (${IMG_LOADR_NEEDED},yes)
85 include $(PLAT_COMMON_PATH)/img_loadr/img_loadr.mk
86 endif
87
88 # Adding source files for the above selected drivers.
89 include ${PLAT_DRIVERS_PATH}/drivers.mk
90
91 PLAT_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
95 BL31_SOURCES += ${PLAT_SOC_PATH}/$(ARCH)/${SOC}.S\
96 ${PSCI_SOURCES}\
97 ${SIPSVC_SOURCES}\
98 ${PLAT_COMMON_PATH}/$(ARCH)/bl31_data.S
99
100 ifeq (${TEST_BL31}, 1)
101 BL31_SOURCES += ${PLAT_SOC_PATH}/$(ARCH)/bootmain64.S \
102 ${PLAT_SOC_PATH}/$(ARCH)/nonboot64.S
103 endif
104
105 BL2_SOURCES += ${DDR_CNTLR_SOURCES}\
106 ${TBBR_SOURCES}\
107 ${FUSE_SOURCES}
108
109 # Adding TFA setup files
110 include ${PLAT_PATH}/common/setup/common.mk