ddr_sb.mk 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #
  2. # Copyright 2021 NXP
  3. #
  4. # SPDX-License-Identifier: BSD-3-Clause
  5. #
  6. ifneq (${TRUSTED_BOARD_BOOT},0)
  7. ifeq (${GENERATE_COT},0)
  8. DDR_FIP_ARGS += --ddr-immem-udimm-1d ${DDR_IMEM_UDIMM_1D}.sb \
  9. --ddr-immem-udimm-2d ${DDR_IMEM_UDIMM_2D}.sb \
  10. --ddr-dmmem-udimm-1d ${DDR_DMEM_UDIMM_1D}.sb \
  11. --ddr-dmmem-udimm-2d ${DDR_DMEM_UDIMM_2D}.sb \
  12. --ddr-immem-rdimm-1d ${DDR_IMEM_RDIMM_1D}.sb \
  13. --ddr-immem-rdimm-2d ${DDR_IMEM_RDIMM_2D}.sb \
  14. --ddr-dmmem-rdimm-1d ${DDR_DMEM_RDIMM_1D}.sb \
  15. --ddr-dmmem-rdimm-2d ${DDR_DMEM_RDIMM_2D}.sb
  16. endif
  17. UDIMM_DEPS = ${DDR_IMEM_UDIMM_1D}.sb ${DDR_IMEM_UDIMM_2D}.sb ${DDR_DMEM_UDIMM_1D}.sb ${DDR_DMEM_UDIMM_2D}.sb
  18. RDIMM_DEPS = ${DDR_IMEM_RDIMM_1D}.sb ${DDR_IMEM_RDIMM_2D}.sb ${DDR_DMEM_RDIMM_1D}.sb ${DDR_DMEM_RDIMM_2D}.sb
  19. DDR_FIP_DEPS += ${UDIMM_DEPS}
  20. DDR_FIP_DEPS += ${RDIMM_DEPS}
  21. # Max Size of CSF header (CSF_HDR_SZ = 0x3000).
  22. # Image will be appended at this offset of the header.
  23. # Path to CST directory is required to generate the CSF header,
  24. # and prepend it to image before fip image gets generated
  25. ifeq (${CST_DIR},)
  26. $(error Error: CST_DIR not set)
  27. endif
  28. ifeq (${DDR_INPUT_FILE},)
  29. DDR_INPUT_FILE:= drivers/nxp/auth/csf_hdr_parser/${CSF_FILE}
  30. endif
  31. %.sb: %
  32. @echo " Generating CSF Header for $@ $<"
  33. $(CST_DIR)/create_hdr_esbc --in $< --out $@ --app_off ${CSF_HDR_SZ} \
  34. --app $< ${DDR_INPUT_FILE}
  35. endif