blob: a70da04e4e954c64613660dae196a3d043d6c397 [file] [log] [blame]
Stefan Reinauer9616f3c2015-04-29 10:45:22 -07001ifeq ($(CONFIG_SOC_INTEL_COMMON),y)
Stefan Reinaueraae53ab2015-04-27 14:03:57 -07002
Aaron Durbinb66d6732015-10-07 16:10:43 -05003verstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
4
Duncan Lauried8c4f2b2014-04-22 10:46:06 -07005romstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c
Lee Leahy14ecb542015-02-09 21:16:14 -08006romstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
Lee Leahy94b856e2015-10-15 12:07:03 -07007romstage-y += util.c
Pratik Prajapatib90b94d2015-09-11 13:51:38 -07008romstage-$(CONFIG_MMA) += mma.c
Lee Leahy0946ec32015-04-20 15:24:54 -07009
Lee Leahy0946ec32015-04-20 15:24:54 -070010ramstage-y += hda_verb.c
11ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c
12ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += nvm.c
13ramstage-$(CONFIG_SOC_INTEL_COMMON_RESET) += reset.c
Lee Leahy94b856e2015-10-15 12:07:03 -070014ramstage-y += util.c
Pratik Prajapatib90b94d2015-09-11 13:51:38 -070015ramstage-$(CONFIG_MMA) += mma.c
Duncan Laurie63ebc802015-09-08 16:09:28 -070016ramstage-$(CONFIG_SOC_INTEL_COMMON_ACPI_WAKE_SOURCE) += acpi_wake_source.c
Andrey Petrov060b2152016-05-13 15:27:42 -070017ramstage-y += vbt.c
Andrey Petrovdc4ae112016-05-12 19:10:11 -070018ramstage-$(CONFIG_SOC_INTEL_COMMON_GFX_OPREGION) += opregion.c
Stefan Reinaueraae53ab2015-04-27 14:03:57 -070019
Alexandru Gagniucbc140cf2015-08-28 14:28:35 -040020# Create and add the MRC cache to the cbfs image
21ifneq ($(CONFIG_CHROMEOS),y)
22$(obj)/mrc.cache: $(obj)/config.h
23 dd if=/dev/zero count=1 \
24 bs=$(shell printf "%d" $(CONFIG_MRC_SETTINGS_CACHE_SIZE) ) | \
25 tr '\000' '\377' > $@
26
27cbfs-files-$(CONFIG_CACHE_MRC_SETTINGS) += mrc.cache
28mrc.cache-file := $(obj)/mrc.cache
29mrc.cache-position := $(CONFIG_MRC_SETTINGS_CACHE_BASE)
30mrc.cache-type := mrc_cache
31endif
32
Pratik Prajapatib90b94d2015-09-11 13:51:38 -070033ifeq ($(CONFIG_MMA),y)
34MMA_BLOBS_PATH = $(call strip_quotes,$(CONFIG_MMA_BLOBS_PATH))
35MMA_TEST_NAMES = $(notdir $(wildcard $(MMA_BLOBS_PATH)/tests/*))
36MMA_TEST_CONFIG_NAMES = $(notdir $(wildcard $(MMA_BLOBS_PATH)/configs/*))
37
38#
39# MMA_CBFS_template is the template to be expanded by eval
40# where $(1) is file name
41# $(2) is file path
42# $(3) is file type, efi for test names (all .EFI files under $(MMA_BLOBS_PATH)/tests )
43# , mma for test param (all .BIN files under $(MMA_BLOBS_PATH)/configs/<test name>)
44#
45# $(MMA_BLOBS_PATH)/tests/<testX>.efi has coresponding test params
46# at $(MMA_BLOBS_PATH)/configs/<testX>/<XYZ>.bin
47#
48
49
50define MMA_CBFS_template =
51 cbfs-files-y += $(1)
52 $(1)-file := $(MMA_BLOBS_PATH)/$(2)/$(1)
53 $(1)-type := $(3)
54endef
55
56#
57# following loop calls MMA_CBFS_template for each .EFI file under $(MMA_BLOBS_PATH)/tests with type = efi
58#
59$(foreach mma_test,$(MMA_TEST_NAMES),$(eval $(call MMA_CBFS_template,$(mma_test),tests,efi)))
60
61
62#
63# following nested loops calls MMA_CBFS_template for each .BIN file under each MMA_TEST_CONFIG_NAMES
64#
65# foreach <testX> do following
66# foreach <XYZ>.bin in <testX> do following
67# call MMA_CBFS_template for each <XYZ>.bin under current <testX> with type = mma
68#
69
70$(foreach mma_test, $(MMA_TEST_CONFIG_NAMES),\
71 $(eval $(foreach mma_config,$(notdir $(wildcard $(MMA_BLOBS_PATH)/configs/$(mma_test)/*)),\
72 $(eval $(call MMA_CBFS_template,$(mma_config),configs/$(mma_test),mma)))))
73
74endif
75
Andrey Petrov060b2152016-05-13 15:27:42 -070076cbfs-files-$(CONFIG_ADD_VBT_DATA_FILE) += vbt.bin
77vbt.bin-file := $(call strip_quotes,$(CONFIG_VBT_FILE))
78vbt.bin-type := raw
79
Stefan Reinaueraae53ab2015-04-27 14:03:57 -070080endif