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 | |
Aaron Durbin | b66d673 | 2015-10-07 16:10:43 -0500 | [diff] [blame] | 3 | verstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c |
| 4 | |
Duncan Laurie | d8c4f2b | 2014-04-22 10:46:06 -0700 | [diff] [blame] | 5 | romstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c |
Lee Leahy | 14ecb54 | 2015-02-09 21:16:14 -0800 | [diff] [blame] | 6 | romstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c |
Lee Leahy | 94b856e | 2015-10-15 12:07:03 -0700 | [diff] [blame] | 7 | romstage-y += util.c |
Pratik Prajapati | b90b94d | 2015-09-11 13:51:38 -0700 | [diff] [blame] | 8 | romstage-$(CONFIG_MMA) += mma.c |
Lee Leahy | 0946ec3 | 2015-04-20 15:24:54 -0700 | [diff] [blame] | 9 | |
Lee Leahy | 0946ec3 | 2015-04-20 15:24:54 -0700 | [diff] [blame] | 10 | ramstage-y += hda_verb.c |
| 11 | ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c |
| 12 | ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += nvm.c |
| 13 | ramstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c |
Lee Leahy | 94b856e | 2015-10-15 12:07:03 -0700 | [diff] [blame] | 14 | ramstage-y += util.c |
Pratik Prajapati | b90b94d | 2015-09-11 13:51:38 -0700 | [diff] [blame] | 15 | ramstage-$(CONFIG_MMA) += mma.c |
Duncan Laurie | 63ebc80 | 2015-09-08 16:09:28 -0700 | [diff] [blame] | 16 | ramstage-$(CONFIG_SOC_INTEL_COMMON_ACPI_WAKE_SOURCE) += acpi_wake_source.c |
Stefan Reinauer | aae53ab | 2015-04-27 14:03:57 -0700 | [diff] [blame] | 17 | |
Alexandru Gagniuc | bc140cf | 2015-08-28 14:28:35 -0400 | [diff] [blame] | 18 | # Create and add the MRC cache to the cbfs image |
| 19 | ifneq ($(CONFIG_CHROMEOS),y) |
| 20 | $(obj)/mrc.cache: $(obj)/config.h |
| 21 | dd if=/dev/zero count=1 \ |
| 22 | bs=$(shell printf "%d" $(CONFIG_MRC_SETTINGS_CACHE_SIZE) ) | \ |
| 23 | tr '\000' '\377' > $@ |
| 24 | |
| 25 | cbfs-files-$(CONFIG_CACHE_MRC_SETTINGS) += mrc.cache |
| 26 | mrc.cache-file := $(obj)/mrc.cache |
| 27 | mrc.cache-position := $(CONFIG_MRC_SETTINGS_CACHE_BASE) |
| 28 | mrc.cache-type := mrc_cache |
| 29 | endif |
| 30 | |
Pratik Prajapati | b90b94d | 2015-09-11 13:51:38 -0700 | [diff] [blame] | 31 | ifeq ($(CONFIG_MMA),y) |
| 32 | MMA_BLOBS_PATH = $(call strip_quotes,$(CONFIG_MMA_BLOBS_PATH)) |
| 33 | MMA_TEST_NAMES = $(notdir $(wildcard $(MMA_BLOBS_PATH)/tests/*)) |
| 34 | MMA_TEST_CONFIG_NAMES = $(notdir $(wildcard $(MMA_BLOBS_PATH)/configs/*)) |
| 35 | |
| 36 | # |
| 37 | # MMA_CBFS_template is the template to be expanded by eval |
| 38 | # where $(1) is file name |
| 39 | # $(2) is file path |
| 40 | # $(3) is file type, efi for test names (all .EFI files under $(MMA_BLOBS_PATH)/tests ) |
| 41 | # , mma for test param (all .BIN files under $(MMA_BLOBS_PATH)/configs/<test name>) |
| 42 | # |
| 43 | # $(MMA_BLOBS_PATH)/tests/<testX>.efi has coresponding test params |
| 44 | # at $(MMA_BLOBS_PATH)/configs/<testX>/<XYZ>.bin |
| 45 | # |
| 46 | |
| 47 | |
| 48 | define MMA_CBFS_template = |
| 49 | cbfs-files-y += $(1) |
| 50 | $(1)-file := $(MMA_BLOBS_PATH)/$(2)/$(1) |
| 51 | $(1)-type := $(3) |
| 52 | endef |
| 53 | |
| 54 | # |
| 55 | # following loop calls MMA_CBFS_template for each .EFI file under $(MMA_BLOBS_PATH)/tests with type = efi |
| 56 | # |
| 57 | $(foreach mma_test,$(MMA_TEST_NAMES),$(eval $(call MMA_CBFS_template,$(mma_test),tests,efi))) |
| 58 | |
| 59 | |
| 60 | # |
| 61 | # following nested loops calls MMA_CBFS_template for each .BIN file under each MMA_TEST_CONFIG_NAMES |
| 62 | # |
| 63 | # foreach <testX> do following |
| 64 | # foreach <XYZ>.bin in <testX> do following |
| 65 | # call MMA_CBFS_template for each <XYZ>.bin under current <testX> with type = mma |
| 66 | # |
| 67 | |
| 68 | $(foreach mma_test, $(MMA_TEST_CONFIG_NAMES),\ |
| 69 | $(eval $(foreach mma_config,$(notdir $(wildcard $(MMA_BLOBS_PATH)/configs/$(mma_test)/*)),\ |
| 70 | $(eval $(call MMA_CBFS_template,$(mma_config),configs/$(mma_test),mma))))) |
| 71 | |
| 72 | endif |
| 73 | |
Stefan Reinauer | aae53ab | 2015-04-27 14:03:57 -0700 | [diff] [blame] | 74 | endif |