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