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