Stefan Reinauer | 9616f3c | 2015-04-29 10:45:22 -0700 | [diff] [blame] | 1 | ifeq ($(CONFIG_SOC_INTEL_COMMON),y) |
Stefan Reinauer | aae53ab | 2015-04-27 14:03:57 -0700 | [diff] [blame] | 2 | |
Subrata Banik | 9a0245a | 2017-02-22 14:22:44 +0530 | [diff] [blame] | 3 | subdirs-y += basecode/ |
| 4 | subdirs-y += block/ |
Subrata Banik | 19cd07f | 2018-05-17 13:53:29 +0530 | [diff] [blame] | 5 | subdirs-y += pch/ |
Subrata Banik | 9a0245a | 2017-02-22 14:22:44 +0530 | [diff] [blame] | 6 | |
Aaron Durbin | b66d673 | 2015-10-07 16:10:43 -0500 | [diff] [blame] | 7 | verstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c |
| 8 | |
Subrata Banik | e4a8537 | 2016-07-24 00:36:12 +0530 | [diff] [blame] | 9 | bootblock-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c |
Subrata Banik | e4a8537 | 2016-07-24 00:36:12 +0530 | [diff] [blame] | 10 | |
Lee Leahy | 14ecb54 | 2015-02-09 21:16:14 -0800 | [diff] [blame] | 11 | romstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c |
Pratik Prajapati | b90b94d | 2015-09-11 13:51:38 -0700 | [diff] [blame] | 12 | romstage-$(CONFIG_MMA) += mma.c |
Barnali Sarkar | e13b775 | 2017-02-21 16:24:49 +0530 | [diff] [blame] | 13 | romstage-y += smbios.c |
Lee Leahy | 0946ec3 | 2015-04-20 15:24:54 -0700 | [diff] [blame] | 14 | |
Furquan Shaikh | 566fedd | 2016-10-28 14:55:46 -0700 | [diff] [blame] | 15 | postcar-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c |
Lee Leahy | 4c18de2 | 2016-07-30 07:17:13 -0700 | [diff] [blame] | 16 | |
Lee Leahy | 0946ec3 | 2015-04-20 15:24:54 -0700 | [diff] [blame] | 17 | ramstage-y += hda_verb.c |
Lee Leahy | 0946ec3 | 2015-04-20 15:24:54 -0700 | [diff] [blame] | 18 | ramstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c |
Pratik Prajapati | b90b94d | 2015-09-11 13:51:38 -0700 | [diff] [blame] | 19 | ramstage-$(CONFIG_MMA) += mma.c |
Andrey Petrov | 060b215 | 2016-05-13 15:27:42 -0700 | [diff] [blame] | 20 | ramstage-y += vbt.c |
Aaron Durbin | c14a1a9 | 2016-06-28 15:41:07 -0500 | [diff] [blame] | 21 | ramstage-$(CONFIG_SOC_INTEL_COMMON_NHLT) += nhlt.c |
Stefan Reinauer | aae53ab | 2015-04-27 14:03:57 -0700 | [diff] [blame] | 22 | |
Philipp Deppenwiese | c07f8fb | 2018-02-27 19:40:52 +0100 | [diff] [blame] | 23 | bootblock-$(CONFIG_TPM_CR50) += tpm_tis.c |
| 24 | verstage-$(CONFIG_TPM_CR50) += tpm_tis.c |
| 25 | romstage-$(CONFIG_TPM_CR50) += tpm_tis.c |
| 26 | ramstage-$(CONFIG_TPM_CR50) += tpm_tis.c |
Philipp Deppenwiese | 545ed7a | 2018-02-14 16:47:12 +0100 | [diff] [blame] | 27 | postcar-$(CONFIG_TPM_CR50) += tpm_tis.c |
Aaron Durbin | 9d9a121 | 2017-04-19 10:02:27 -0500 | [diff] [blame] | 28 | |
Subrata Banik | 2b2ade9 | 2020-10-31 21:07:16 +0530 | [diff] [blame] | 29 | romstage-$(CONFIG_SOC_INTEL_COMMON_FSP_RESET) += fsp_reset.c |
| 30 | ramstage-$(CONFIG_SOC_INTEL_COMMON_FSP_RESET) += fsp_reset.c |
| 31 | |
Pratik Prajapati | b90b94d | 2015-09-11 13:51:38 -0700 | [diff] [blame] | 32 | ifeq ($(CONFIG_MMA),y) |
| 33 | MMA_BLOBS_PATH = $(call strip_quotes,$(CONFIG_MMA_BLOBS_PATH)) |
| 34 | MMA_TEST_NAMES = $(notdir $(wildcard $(MMA_BLOBS_PATH)/tests/*)) |
| 35 | MMA_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 Roth | 26f97f9 | 2021-10-01 14:53:22 -0600 | [diff] [blame] | 44 | # $(MMA_BLOBS_PATH)/tests/<testX>.efi has corresponding test params |
Pratik Prajapati | b90b94d | 2015-09-11 13:51:38 -0700 | [diff] [blame] | 45 | # at $(MMA_BLOBS_PATH)/configs/<testX>/<XYZ>.bin |
| 46 | # |
| 47 | |
| 48 | |
| 49 | define MMA_CBFS_template = |
| 50 | cbfs-files-y += $(1) |
| 51 | $(1)-file := $(MMA_BLOBS_PATH)/$(2)/$(1) |
| 52 | $(1)-type := $(3) |
| 53 | endef |
| 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 | |
| 73 | endif |
| 74 | |
Stefan Reinauer | aae53ab | 2015-04-27 14:03:57 -0700 | [diff] [blame] | 75 | endif |