Jiafei Pan | 2f71dbf | 2021-09-10 14:57:49 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright 2020-2021 NXP |
| 3 | # |
| 4 | # SPDX-License-Identifier: BSD-3-Clause |
| 5 | # |
| 6 | |
| 7 | # SoC-specific build parameters |
| 8 | SOC := ls1028a |
| 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 | # Get SoC-specific definitions |
| 16 | include ${PLAT_SOC_PATH}/soc.def |
| 17 | include ${PLAT_COMMON_PATH}/plat_make_helper/soc_common_def.mk |
| 18 | include ${PLAT_COMMON_PATH}/plat_make_helper/plat_build_macros.mk |
| 19 | |
| 20 | ifeq (${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)) |
| 24 | SECURE_BOOT := yes |
| 25 | endif |
| 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 | |
| 43 | PLAT_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 | |
| 49 | ifeq (${SECURE_BOOT},yes) |
| 50 | include ${PLAT_COMMON_PATH}/tbbr/tbbr.mk |
| 51 | endif |
| 52 | |
| 53 | ifeq ($(WARM_BOOT),yes) |
| 54 | include ${PLAT_COMMON_PATH}/warm_reset/warm_reset.mk |
| 55 | endif |
| 56 | |
| 57 | ifeq (${NXP_NV_SW_MAINT_LAST_EXEC_DATA}, yes) |
| 58 | include ${PLAT_COMMON_PATH}/nv_storage/nv_storage.mk |
| 59 | endif |
| 60 | |
| 61 | ifeq (${PSCI_NEEDED}, yes) |
| 62 | include ${PLAT_COMMON_PATH}/psci/psci.mk |
| 63 | endif |
| 64 | |
| 65 | ifeq (${SIPSVC_NEEDED}, yes) |
| 66 | include ${PLAT_COMMON_PATH}/sip_svc/sipsvc.mk |
| 67 | endif |
| 68 | |
| 69 | ifeq (${DDR_FIP_IO_NEEDED}, yes) |
| 70 | include ${PLAT_COMMON_PATH}/fip_handler/ddr_fip/ddr_fip_io.mk |
| 71 | endif |
| 72 | |
| 73 | # For fuse-fip & fuse-programming |
| 74 | ifeq (${FUSE_PROG}, 1) |
| 75 | include ${PLAT_COMMON_PATH}/fip_handler/fuse_fip/fuse.mk |
| 76 | endif |
| 77 | |
| 78 | ifeq (${IMG_LOADR_NEEDED},yes) |
| 79 | include $(PLAT_COMMON_PATH)/img_loadr/img_loadr.mk |
| 80 | endif |
| 81 | |
| 82 | # Adding source files for the above selected drivers. |
| 83 | include ${PLAT_DRIVERS_PATH}/drivers.mk |
| 84 | |
| 85 | # Adding SoC specific files |
| 86 | include ${PLAT_COMMON_PATH}/soc_errata/errata.mk |
| 87 | |
| 88 | PLAT_INCLUDES += ${NV_STORAGE_INCLUDES}\ |
| 89 | ${WARM_RST_INCLUDES} |
| 90 | |
| 91 | BL31_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 | |
| 97 | PLAT_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 | |
| 103 | ifeq (${TEST_BL31}, 1) |
| 104 | BL31_SOURCES += ${PLAT_SOC_PATH}/$(ARCH)/bootmain64.S \ |
| 105 | ${PLAT_SOC_PATH}/$(ARCH)/nonboot64.S |
| 106 | endif |
| 107 | |
| 108 | BL2_SOURCES += ${DDR_CNTLR_SOURCES}\ |
| 109 | ${TBBR_SOURCES}\ |
| 110 | ${FUSE_SOURCES} |
| 111 | |
| 112 | # Adding TFA setup files |
| 113 | include ${PLAT_PATH}/common/setup/common.mk |