xref: /optee_os/core/sub.mk (revision b8bb0afa738e6038bbd92b57742aa2526df9f20a)
1subdirs-y += kernel
2subdirs-y += crypto
3subdirs-y += tee
4subdirs-y += drivers
5
6ifeq ($(CFG_WITH_USER_TA),y)
7gensrcs-y += ta_pub_key
8produce-ta_pub_key = ta_pub_key.c
9depends-ta_pub_key = $(TA_SIGN_KEY) scripts/pem_to_pub_c.py
10recipe-ta_pub_key = scripts/pem_to_pub_c.py --prefix ta_pub_key \
11		--key $(TA_SIGN_KEY) --out $(sub-dir-out)/ta_pub_key.c
12cleanfiles += $(sub-dir-out)/ta_pub_key.c
13endif
14
15ifeq ($(CFG_WITH_USER_TA)-$(CFG_EARLY_TA),y-y)
16define process_early_ta
17early-ta-$1-uuid := $(firstword $(subst ., ,$(notdir $1)))
18gensrcs-y += early-ta-$1
19produce-early-ta-$1 = early_ta_$$(early-ta-$1-uuid).c
20depends-early-ta-$1 = $1 scripts/ta_bin_to_c.py
21recipe-early-ta-$1 = scripts/ta_bin_to_c.py --compress --ta $1 \
22		--out $(sub-dir-out)/early_ta_$$(early-ta-$1-uuid).c
23cleanfiles += $(sub-dir-out)/early_ta_$$(early-ta-$1-uuid).c
24endef
25$(foreach f, $(EARLY_TA_PATHS), $(eval $(call process_early_ta,$(f))))
26$(foreach f, $(CFG_IN_TREE_EARLY_TAS), $(eval $(call \
27	process_early_ta,$(out-dir)/ta/$(f).stripped.elf)))
28endif
29
30ifeq ($(CFG_EMBED_DTB),y)
31core-embed-fdt-dts = $(arch-dir)/dts/$(CFG_EMBED_DTB_SOURCE_FILE)
32core-embed-fdt-dtb = $(out-dir)/$(arch-dir)/dts/$(CFG_EMBED_DTB_SOURCE_FILE:.dts=.dtb)
33core-embed-fdt-c = $(out-dir)/$(arch-dir)/dts/$(CFG_EMBED_DTB_SOURCE_FILE:.dts=.c)
34gensrcs-y += embedded_secure_dtb
35cleanfiles += $(core-embed-fdt-c)
36produce-embedded_secure_dtb = arch/$(ARCH)/dts/$(CFG_EMBED_DTB_SOURCE_FILE:.dts=.c)
37depends-embedded_secure_dtb = $(core-embed-fdt-dtb) scripts/bin_to_c.py
38recipe-embedded_secure_dtb = scripts/bin_to_c.py \
39				--bin $(core-embed-fdt-dtb) \
40				--vname embedded_secure_dtb \
41				--out $(core-embed-fdt-c)
42$(eval $(call gen-dtb-file,$(core-embed-fdt-dts),$(core-embed-fdt-dtb)))
43endif
44