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