Debian Codegraph @

drivers/nxp/auth/csf_hdr_parser/csf_hdr.mk

raw
1 #
2 # Copyright 2021 NXP
3 #
4 # SPDX-License-Identifier: BSD-3-Clause
5 #
6 #
7
8 CSF_HDR_SOURCES := $(PLAT_DRIVERS_PATH)/auth/csf_hdr_parser/csf_hdr_parser.c
9
10 CSF_HDR_SOURCES += $(PLAT_DRIVERS_PATH)/auth/csf_hdr_parser/plat_img_parser.c
11
12 PLAT_INCLUDES += -I$(PLAT_DRIVERS_INCLUDE_PATH)/auth/csf_hdr_parser/
13
14 $(eval $(call add_define, CSF_HEADER_PREPENDED))
15
16
17 # Path to CST directory is required to generate the CSF header
18 # and prepend it to image before fip image gets generated
19 ifeq (${CST_DIR},)
20 $(error Error: CST_DIR not set)
21 endif
22
23 # Rules are created for generating and appending CSF header to images before
24 # FIT image generation
25
26 # CST_BL31
27 define CST_BL31_RULE
28 $(1): $(2)
29 $(s)echo " Generating CSF Header for $$@ $$<"
30 $(q)$(CST_DIR)/create_hdr_esbc --in $(2) --out $(1) --app_off ${CSF_HDR_SZ} \
31 --app $(2) ${BL31_INPUT_FILE}
32 endef
33
34 CST_BL31_SUFFIX := .cst
35
36 # CST_BL32
37 define CST_BL32_RULE
38 $(1): $(2)
39 $(s)echo " Generating CSF Header for $$@ $$<"
40 $(q)$(CST_DIR)/create_hdr_esbc --in $(2) --out $(1) --app_off ${CSF_HDR_SZ} \
41 --app $(2) ${BL32_INPUT_FILE}
42 endef
43
44 CST_BL32_SUFFIX := .cst
45
46 # CST_BL33
47 define CST_BL33_RULE
48 $(1): $(2)
49 $(s)echo " Generating CSF Header for $$@ $$<"
50 $(q)$(CST_DIR)/create_hdr_esbc --in $(2) --out $(1) --app_off ${CSF_HDR_SZ} \
51 --app $(2) ${BL33_INPUT_FILE}
52 endef
53
54 CST_BL33_SUFFIX := .cst
55
56 # CST_SCP_BL2
57 define CST_SCP_BL2_RULE
58 $(1): $(2)
59 $(s)echo " Generating CSF Header for $$@ $$<"
60 $(q)$(CST_DIR)/create_hdr_esbc --in $(2) --out $(1) --app_off ${CSF_HDR_SZ} \
61 --app $(2) ${FUSE_INPUT_FILE}
62 endef
63
64 CST_SCP_BL2_SUFFIX := .cst