1# 2# Copyright 2020-2021 NXP 3# 4# SPDX-License-Identifier: BSD-3-Clause 5# 6 7# SoC-specific build parameters 8SOC := ls1028a 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# Get SoC-specific definitions 16include ${PLAT_SOC_PATH}/soc.def 17include ${PLAT_COMMON_PATH}/plat_make_helper/soc_common_def.mk 18include ${PLAT_COMMON_PATH}/plat_make_helper/plat_build_macros.mk 19 20ifeq (${TRUSTED_BOARD_BOOT},1) 21$(eval $(call SET_NXP_MAKE_FLAG,SMMU_NEEDED,BL2)) 22$(eval $(call SET_NXP_MAKE_FLAG,SFP_NEEDED,BL2)) 23$(eval $(call SET_NXP_MAKE_FLAG,SNVS_NEEDED,BL2)) 24SECURE_BOOT := yes 25endif 26$(eval $(call SET_NXP_MAKE_FLAG,CRYPTO_NEEDED,BL_COMM)) 27 28$(eval $(call SET_NXP_MAKE_FLAG,DCFG_NEEDED,BL_COMM)) 29$(eval $(call SET_NXP_MAKE_FLAG,TIMER_NEEDED,BL_COMM)) 30$(eval $(call SET_NXP_MAKE_FLAG,INTERCONNECT_NEEDED,BL_COMM)) 31$(eval $(call SET_NXP_MAKE_FLAG,GIC_NEEDED,BL31)) 32$(eval $(call SET_NXP_MAKE_FLAG,CONSOLE_NEEDED,BL_COMM)) 33$(eval $(call SET_NXP_MAKE_FLAG,PMU_NEEDED,BL_COMM)) 34$(eval $(call SET_NXP_MAKE_FLAG,DDR_DRIVER_NEEDED,BL2)) 35$(eval $(call SET_NXP_MAKE_FLAG,TZASC_NEEDED,BL2)) 36$(eval $(call SET_NXP_MAKE_FLAG,I2C_NEEDED,BL2)) 37$(eval $(call SET_NXP_MAKE_FLAG,IMG_LOADR_NEEDED,BL2)) 38 39# Selecting PSCI & SIP_SVC support 40$(eval $(call SET_NXP_MAKE_FLAG,PSCI_NEEDED,BL31)) 41$(eval $(call SET_NXP_MAKE_FLAG,SIPSVC_NEEDED,BL31)) 42 43PLAT_INCLUDES += -I${PLAT_COMMON_PATH}/include/default\ 44 -I${BOARD_PATH}\ 45 -I${PLAT_COMMON_PATH}/include/default/ch_${CHASSIS}\ 46 -I${PLAT_SOC_PATH}/include\ 47 -I${PLAT_COMMON_PATH}/soc_errata 48 49ifeq (${SECURE_BOOT},yes) 50include ${PLAT_COMMON_PATH}/tbbr/tbbr.mk 51endif 52 53ifeq ($(WARM_BOOT),yes) 54include ${PLAT_COMMON_PATH}/warm_reset/warm_reset.mk 55endif 56 57ifeq (${NXP_NV_SW_MAINT_LAST_EXEC_DATA}, yes) 58include ${PLAT_COMMON_PATH}/nv_storage/nv_storage.mk 59endif 60 61ifeq (${PSCI_NEEDED}, yes) 62include ${PLAT_COMMON_PATH}/psci/psci.mk 63endif 64 65ifeq (${SIPSVC_NEEDED}, yes) 66include ${PLAT_COMMON_PATH}/sip_svc/sipsvc.mk 67endif 68 69ifeq (${DDR_FIP_IO_NEEDED}, yes) 70include ${PLAT_COMMON_PATH}/fip_handler/ddr_fip/ddr_fip_io.mk 71endif 72 73# For fuse-fip & fuse-programming 74ifeq (${FUSE_PROG}, 1) 75include ${PLAT_COMMON_PATH}/fip_handler/fuse_fip/fuse.mk 76endif 77 78ifeq (${IMG_LOADR_NEEDED},yes) 79include $(PLAT_COMMON_PATH)/img_loadr/img_loadr.mk 80endif 81 82# Adding source files for the above selected drivers. 83include ${PLAT_DRIVERS_PATH}/drivers.mk 84 85# Adding SoC specific files 86include ${PLAT_COMMON_PATH}/soc_errata/errata.mk 87 88PLAT_INCLUDES += ${NV_STORAGE_INCLUDES}\ 89 ${WARM_RST_INCLUDES} 90 91BL31_SOURCES += ${PLAT_SOC_PATH}/$(ARCH)/${SOC}.S\ 92 ${WARM_RST_BL31_SOURCES}\ 93 ${PSCI_SOURCES}\ 94 ${SIPSVC_SOURCES}\ 95 ${PLAT_COMMON_PATH}/$(ARCH)/bl31_data.S 96 97PLAT_BL_COMMON_SOURCES += ${PLAT_COMMON_PATH}/$(ARCH)/ls_helpers.S\ 98 ${PLAT_SOC_PATH}/aarch64/${SOC}_helpers.S\ 99 ${NV_STORAGE_SOURCES}\ 100 ${WARM_RST_BL_COMM_SOURCES}\ 101 ${PLAT_SOC_PATH}/soc.c 102 103ifeq (${TEST_BL31}, 1) 104BL31_SOURCES += ${PLAT_SOC_PATH}/$(ARCH)/bootmain64.S \ 105 ${PLAT_SOC_PATH}/$(ARCH)/nonboot64.S 106endif 107 108BL2_SOURCES += ${DDR_CNTLR_SOURCES}\ 109 ${TBBR_SOURCES}\ 110 ${FUSE_SOURCES} 111 112# Adding TFA setup files 113include ${PLAT_PATH}/common/setup/common.mk 114