soc.mk 3.2 KB

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