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