blob: ad987dddccce25fc22684f84c184e9c997064673 [file] [log] [blame]
Stefan Reinauer9616f3c2015-04-29 10:45:22 -07001ifeq ($(CONFIG_SOC_INTEL_COMMON),y)
Stefan Reinaueraae53ab2015-04-27 14:03:57 -07002
Subrata Banik9a0245a2017-02-22 14:22:44 +05303subdirs-y += basecode/
4subdirs-y += block/
Subrata Banik19cd07f2018-05-17 13:53:29 +05305subdirs-y += pch/
Subrata Banik9a0245a2017-02-22 14:22:44 +05306
Aaron Durbinb66d6732015-10-07 16:10:43 -05007verstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
8
Subrata Banike4a85372016-07-24 00:36:12 +05309bootblock-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
Subrata Banike4a85372016-07-24 00:36:12 +053010
Lee Leahy14ecb542015-02-09 21:16:14 -080011romstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
Pratik Prajapatib90b94d2015-09-11 13:51:38 -070012romstage-$(CONFIG_MMA) += mma.c
Barnali Sarkare13b7752017-02-21 16:24:49 +053013romstage-y += smbios.c
Lee Leahy0946ec32015-04-20 15:24:54 -070014
Furquan Shaikh566fedd2016-10-28 14:55:46 -070015postcar-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
Lee Leahy4c18de22016-07-30 07:17:13 -070016
Lee Leahy0946ec32015-04-20 15:24:54 -070017ramstage-y += hda_verb.c
Lee Leahy0946ec32015-04-20 15:24:54 -070018ramstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
Pratik Prajapatib90b94d2015-09-11 13:51:38 -070019ramstage-$(CONFIG_MMA) += mma.c
Andrey Petrov060b2152016-05-13 15:27:42 -070020ramstage-y += vbt.c
Aaron Durbinc14a1a92016-06-28 15:41:07 -050021ramstage-$(CONFIG_SOC_INTEL_COMMON_NHLT) += nhlt.c
Stefan Reinaueraae53ab2015-04-27 14:03:57 -070022
Philipp Deppenwiesec07f8fb2018-02-27 19:40:52 +010023bootblock-$(CONFIG_TPM_CR50) += tpm_tis.c
24verstage-$(CONFIG_TPM_CR50) += tpm_tis.c
25romstage-$(CONFIG_TPM_CR50) += tpm_tis.c
26ramstage-$(CONFIG_TPM_CR50) += tpm_tis.c
Philipp Deppenwiese545ed7a2018-02-14 16:47:12 +010027postcar-$(CONFIG_TPM_CR50) += tpm_tis.c
Aaron Durbin9d9a1212017-04-19 10:02:27 -050028
Subrata Banik2b2ade92020-10-31 21:07:16 +053029romstage-$(CONFIG_SOC_INTEL_COMMON_FSP_RESET) += fsp_reset.c
30ramstage-$(CONFIG_SOC_INTEL_COMMON_FSP_RESET) += fsp_reset.c
31
Pratik Prajapatib90b94d2015-09-11 13:51:38 -070032ifeq ($(CONFIG_MMA),y)
33MMA_BLOBS_PATH = $(call strip_quotes,$(CONFIG_MMA_BLOBS_PATH))
34MMA_TEST_NAMES = $(notdir $(wildcard $(MMA_BLOBS_PATH)/tests/*))
35MMA_TEST_CONFIG_NAMES = $(notdir $(wildcard $(MMA_BLOBS_PATH)/configs/*))
36
37#
38# MMA_CBFS_template is the template to be expanded by eval
39# where $(1) is file name
40# $(2) is file path
41# $(3) is file type, efi for test names (all .EFI files under $(MMA_BLOBS_PATH)/tests )
42# , mma for test param (all .BIN files under $(MMA_BLOBS_PATH)/configs/<test name>)
43#
Martin Roth26f97f92021-10-01 14:53:22 -060044# $(MMA_BLOBS_PATH)/tests/<testX>.efi has corresponding test params
Pratik Prajapatib90b94d2015-09-11 13:51:38 -070045# at $(MMA_BLOBS_PATH)/configs/<testX>/<XYZ>.bin
46#
47
48
49define MMA_CBFS_template =
50 cbfs-files-y += $(1)
51 $(1)-file := $(MMA_BLOBS_PATH)/$(2)/$(1)
52 $(1)-type := $(3)
53endef
54
55#
56# following loop calls MMA_CBFS_template for each .EFI file under $(MMA_BLOBS_PATH)/tests with type = efi
57#
58$(foreach mma_test,$(MMA_TEST_NAMES),$(eval $(call MMA_CBFS_template,$(mma_test),tests,efi)))
59
60
61#
62# following nested loops calls MMA_CBFS_template for each .BIN file under each MMA_TEST_CONFIG_NAMES
63#
64# foreach <testX> do following
65# foreach <XYZ>.bin in <testX> do following
66# call MMA_CBFS_template for each <XYZ>.bin under current <testX> with type = mma
67#
68
69$(foreach mma_test, $(MMA_TEST_CONFIG_NAMES),\
70 $(eval $(foreach mma_config,$(notdir $(wildcard $(MMA_BLOBS_PATH)/configs/$(mma_test)/*)),\
71 $(eval $(call MMA_CBFS_template,$(mma_config),configs/$(mma_test),mma)))))
72
73endif
74
Stefan Reinaueraae53ab2015-04-27 14:03:57 -070075endif