soc.mk 3.2 KB

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