common.mk 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. #
  2. # Copyright 2018-2021 NXP
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. #
  7. ###############################################################################
  8. # Flow begins in BL2 at EL3 mode
  9. RESET_TO_BL2 := 1
  10. # Though one core is powered up by default, there are
  11. # platform specific ways to release more than one core
  12. COLD_BOOT_SINGLE_CPU := 0
  13. PROGRAMMABLE_RESET_ADDRESS := 1
  14. USE_COHERENT_MEM := 0
  15. # Use generic OID definition (tbbr_oid.h)
  16. USE_TBBR_DEFS := 1
  17. PLAT_XLAT_TABLES_DYNAMIC := 0
  18. ENABLE_SVE_FOR_NS := 0
  19. ENABLE_STACK_PROTECTOR := 0
  20. ERROR_DEPRECATED := 0
  21. LS_DISABLE_TRUSTED_WDOG := 1
  22. # On ARM platforms, separate the code and read-only data sections to allow
  23. # mapping the former as executable and the latter as execute-never.
  24. SEPARATE_CODE_AND_RODATA := 1
  25. # Enable new version of image loading on ARM platforms
  26. LOAD_IMAGE_V2 := 1
  27. RCW := ""
  28. ifneq (${SPD},none)
  29. $(eval $(call add_define, NXP_LOAD_BL32))
  30. endif
  31. ###############################################################################
  32. PLAT_TOOL_PATH := tools/nxp
  33. CREATE_PBL_TOOL_PATH := ${PLAT_TOOL_PATH}/create_pbl
  34. PLAT_SETUP_PATH := ${PLAT_PATH}/common/setup
  35. PLAT_INCLUDES += -I${PLAT_SETUP_PATH}/include \
  36. -Iinclude/plat/arm/common \
  37. -Iinclude/drivers/arm \
  38. -Iinclude/lib \
  39. -Iinclude/drivers/io \
  40. -Ilib/psci
  41. # Required without TBBR.
  42. # To include the defines for DDR PHY Images.
  43. PLAT_INCLUDES += -Iinclude/common/tbbr
  44. include ${PLAT_SETUP_PATH}/core.mk
  45. PLAT_BL_COMMON_SOURCES += ${CPU_LIBS} \
  46. plat/nxp/common/setup/ls_err.c \
  47. plat/nxp/common/setup/ls_common.c
  48. ifneq (${ENABLE_STACK_PROTECTOR},0)
  49. PLAT_BL_COMMON_SOURCES += ${PLAT_SETUP_PATH}/ls_stack_protector.c
  50. endif
  51. include lib/xlat_tables_v2/xlat_tables.mk
  52. PLAT_BL_COMMON_SOURCES += ${XLAT_TABLES_LIB_SRCS}
  53. BL2_SOURCES += drivers/io/io_fip.c \
  54. drivers/io/io_memmap.c \
  55. drivers/io/io_storage.c \
  56. common/desc_image_load.c \
  57. plat/nxp/common/setup/ls_image_load.c \
  58. plat/nxp/common/setup/ls_io_storage.c \
  59. plat/nxp/common/setup/ls_bl2_el3_setup.c \
  60. plat/nxp/common/setup/${ARCH}/ls_bl2_mem_params_desc.c
  61. BL31_SOURCES += plat/nxp/common/setup/ls_bl31_setup.c \
  62. ifeq (${LS_EL3_INTERRUPT_HANDLER}, yes)
  63. $(eval $(call add_define, LS_EL3_INTERRUPT_HANDLER))
  64. BL31_SOURCES += plat/nxp/common/setup/ls_interrupt_mgmt.c
  65. endif
  66. ifeq (${TEST_BL31}, 1)
  67. BL31_SOURCES += ${TEST_SOURCES}
  68. endif
  69. # Verify build config
  70. # -------------------
  71. ifneq (${LOAD_IMAGE_V2}, 1)
  72. $(error Error: Layerscape needs LOAD_IMAGE_V2=1)
  73. else
  74. $(eval $(call add_define,LOAD_IMAGE_V2))
  75. endif
  76. include $(CREATE_PBL_TOOL_PATH)/create_pbl.mk