soc.mk 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #
  2. # Copyright 2022 NXP
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. # SoC-specific build parameters
  7. SOC := ls1088a
  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. # Separate BL2 NOLOAD region (.bss, stack, page tables). need to
  14. # define BL2_NOLOAD_START and BL2_NOLOAD_LIMIT
  15. SEPARATE_BL2_NOLOAD_REGION := 1
  16. # get SoC-specific defnitions
  17. include ${PLAT_SOC_PATH}/soc.def
  18. include ${PLAT_COMMON_PATH}/plat_make_helper/soc_common_def.mk
  19. include ${PLAT_COMMON_PATH}/plat_make_helper/plat_build_macros.mk
  20. # For Security Features
  21. DISABLE_FUSE_WRITE := 1
  22. $(eval $(call SET_NXP_MAKE_FLAG,SMMU_NEEDED,BL2))
  23. ifeq (${TRUSTED_BOARD_BOOT}, 1)
  24. ifeq (${GENERATE_COT},1)
  25. # Save Keys to be used by DDR FIP image
  26. SAVE_KEYS=1
  27. endif
  28. $(eval $(call SET_NXP_MAKE_FLAG,SFP_NEEDED,BL2))
  29. $(eval $(call SET_NXP_MAKE_FLAG,SNVS_NEEDED,BL2))
  30. # Used by create_pbl tool to
  31. # create bl2_<boot_mode>_sec.pbl image
  32. SECURE_BOOT := yes
  33. endif
  34. $(eval $(call SET_NXP_MAKE_FLAG,CRYPTO_NEEDED,BL_COMM))
  35. # Selecting Drivers for SoC
  36. $(eval $(call SET_NXP_MAKE_FLAG,DCFG_NEEDED,BL_COMM))
  37. $(eval $(call SET_NXP_MAKE_FLAG,TIMER_NEEDED,BL_COMM))
  38. $(eval $(call SET_NXP_MAKE_FLAG,INTERCONNECT_NEEDED,BL_COMM))
  39. $(eval $(call SET_NXP_MAKE_FLAG,GIC_NEEDED,BL31))
  40. $(eval $(call SET_NXP_MAKE_FLAG,CONSOLE_NEEDED,BL_COMM))
  41. $(eval $(call SET_NXP_MAKE_FLAG,PMU_NEEDED,BL_COMM))
  42. $(eval $(call SET_NXP_MAKE_FLAG,DDR_DRIVER_NEEDED,BL2))
  43. $(eval $(call SET_NXP_MAKE_FLAG,TZASC_NEEDED,BL2))
  44. $(eval $(call SET_NXP_MAKE_FLAG,I2C_NEEDED,BL2))
  45. $(eval $(call SET_NXP_MAKE_FLAG,IMG_LOADR_NEEDED,BL2))
  46. # Selecting PSCI & SIP_SVC support
  47. $(eval $(call SET_NXP_MAKE_FLAG,PSCI_NEEDED,BL31))
  48. $(eval $(call SET_NXP_MAKE_FLAG,SIPSVC_NEEDED,BL31))
  49. # Adding SoC specific files
  50. include ${PLAT_COMMON_PATH}/soc_errata/errata.mk
  51. PLAT_INCLUDES += -I${PLAT_COMMON_PATH}/include/default\
  52. -I${BOARD_PATH}\
  53. -I${PLAT_COMMON_PATH}/include/default/ch_${CHASSIS}\
  54. -I${PLAT_COMMON_PATH}/soc_errata\
  55. -I${PLAT_COMMON_PATH}/include\
  56. -I${PLAT_SOC_PATH}/include
  57. ifeq (${SECURE_BOOT},yes)
  58. include ${PLAT_COMMON_PATH}/tbbr/tbbr.mk
  59. endif
  60. ifeq (${PSCI_NEEDED}, yes)
  61. include ${PLAT_COMMON_PATH}/psci/psci.mk
  62. endif
  63. ifeq (${SIPSVC_NEEDED}, yes)
  64. include ${PLAT_COMMON_PATH}/sip_svc/sipsvc.mk
  65. endif
  66. # for fuse-fip & fuse-programming
  67. ifeq (${FUSE_PROG}, 1)
  68. include ${PLAT_COMMON_PATH}/fip_handler/fuse_fip/fuse.mk
  69. endif
  70. ifeq (${IMG_LOADR_NEEDED},yes)
  71. include $(PLAT_COMMON_PATH)/img_loadr/img_loadr.mk
  72. endif
  73. # Adding source files for the above selected drivers.
  74. include ${PLAT_DRIVERS_PATH}/drivers.mk
  75. PLAT_BL_COMMON_SOURCES += ${PLAT_COMMON_PATH}/$(ARCH)/ls_helpers.S\
  76. ${PLAT_SOC_PATH}/${ARCH}/${SOC}_helpers.S\
  77. ${PLAT_SOC_PATH}/soc.c
  78. BL31_SOURCES += ${PLAT_SOC_PATH}/$(ARCH)/${SOC}.S\
  79. ${PSCI_SOURCES}\
  80. ${SIPSVC_SOURCES}\
  81. ${PLAT_COMMON_PATH}/$(ARCH)/bl31_data.S
  82. ifeq (${TEST_BL31}, 1)
  83. BL31_SOURCES += ${PLAT_SOC_PATH}/$(ARCH)/bootmain64.S \
  84. ${PLAT_SOC_PATH}/$(ARCH)/nonboot64.S
  85. endif
  86. BL2_SOURCES += ${DDR_CNTLR_SOURCES}\
  87. ${TBBR_SOURCES}\
  88. ${FUSE_SOURCES}
  89. # Adding TFA setup files
  90. include ${PLAT_PATH}/common/setup/common.mk