1 ## SPDX-License-Identifier: GPL-2.0-only
2 ifeq ($(CONFIG_EC_GOOGLE_CHROMEEC
),y
)
4 subdirs-y
+= audio_codec
5 subdirs-y
+= i2c_tunnel
8 bootblock-
$(CONFIG_EC_GOOGLE_CHROMEEC_BOARDID
) += ec_boardid.c
9 verstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_BOARDID
) += ec_boardid.c
10 romstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_BOARDID
) += ec_boardid.c
11 ramstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_BOARDID
) += ec_boardid.c
12 smm-
$(CONFIG_EC_GOOGLE_CHROMEEC_BOARDID
) += ec_boardid.c
14 smm-
$(CONFIG_EC_GOOGLE_CHROMEEC_SKUID
) += ec_skuid.c
15 romstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_SKUID
) += ec_skuid.c
16 ramstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_SKUID
) += ec_skuid.c
18 ifeq ($(CONFIG_GENERATE_SMBIOS_TABLES
),y
)
19 romstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_SKUID
) += ec_smbios.c
20 ramstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_SKUID
) += ec_smbios.c
24 bootblock-
$(CONFIG_EC_GOOGLE_CHROMEEC_LPC
) += ec_lpc.c
25 ramstage-y
+= ec.c crosec_proto.c vstore.c usbc_mux.c
26 ramstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_I2C
) += ec_i2c.c
27 ramstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_LPC
) += ec_lpc.c
28 ramstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_SPI
) += ec_spi.c
29 smm-y
+= ec.c crosec_proto.c smihandler.c vstore.c
30 smm-
$(CONFIG_EC_GOOGLE_CHROMEEC_I2C
) += ec_i2c.c
31 smm-
$(CONFIG_EC_GOOGLE_CHROMEEC_LPC
) += ec_lpc.c
32 smm-
$(CONFIG_EC_GOOGLE_CHROMEEC_SPI
) += ec_spi.c
33 romstage-y
+= ec.c crosec_proto.c vstore.c
34 romstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_I2C
) += ec_i2c.c
35 romstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_LPC
) += ec_lpc.c
36 romstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_SPI
) += ec_spi.c
37 verstage-y
+= ec.c crosec_proto.c vstore.c
38 verstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_I2C
) += ec_i2c.c
39 verstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_LPC
) += ec_lpc.c
40 verstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_SPI
) += ec_spi.c
41 ramstage-
$(CONFIG_HAVE_ACPI_TABLES
) += ec_acpi.c
43 ramstage-
$(CONFIG_VBOOT
) += vboot_storage.c
44 smm-
$(CONFIG_VBOOT
) += vboot_storage.c
45 romstage-
$(CONFIG_VBOOT
) += vboot_storage.c
46 verstage-
$(CONFIG_VBOOT
) += vboot_storage.c
48 verstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_SWITCHES
) += switches.c
49 romstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_SWITCHES
) += switches.c
50 ramstage-
$(CONFIG_EC_GOOGLE_CHROMEEC_SWITCHES
) += switches.c
52 ramstage-
$(CONFIG_DRIVERS_INTEL_DPTF
) += ec_dptf_helpers.c
54 CHROMEEC_SOURCE ?
= $(top
)/3rdparty
/chromeec
56 # These are Chrome EC firmware images that a payload (such as depthcharge) can
57 # use to update the EC. ecrw is the main embedded controller's firmware,
58 # pdrw is for a USB PD controller.
60 ifeq ($(CONFIG_EC_GOOGLE_CHROMEEC_FIRMWARE_EXTERNAL
),y
)
63 ecrw-file
:= $(obj
)/mainboard
/$(MAINBOARDDIR
)/ecrw
66 ecrw-compression
:= $(CBFS_COMPRESS_FLAG
)
67 cbfs-files-y
+= ecrw.hash
68 ecrw.hash-file
:= $(obj
)/mainboard
/$(MAINBOARDDIR
)/ecrw.hash
69 ecrw.hash-name
:= ecrw.hash
72 CONFIG_EC_GOOGLE_CHROMEEC_FIRMWARE_FILE
:= $(call strip_quotes
,$(CONFIG_EC_GOOGLE_CHROMEEC_FIRMWARE_FILE
))
74 $(obj
)/mainboard
/$(MAINBOARDDIR
)/ecrw
: $(CONFIG_EC_GOOGLE_CHROMEEC_FIRMWARE_FILE
)
75 cp
$(CONFIG_EC_GOOGLE_CHROMEEC_FIRMWARE_FILE
) $@
77 $(obj
)/mainboard
/$(MAINBOARDDIR
)/ecrw.hash
: $(obj
)/mainboard
/$(MAINBOARDDIR
)/ecrw
78 openssl dgst
-sha256
-binary
$< > $@
82 ifeq ($(CONFIG_EC_GOOGLE_CHROMEEC_PD_FIRMWARE_EXTERNAL
),y
)
85 pdrw-file
:= $(obj
)/mainboard
/$(MAINBOARDDIR
)/pdrw
88 pdrw-compression
:= $(CBFS_COMPRESS_FLAG
)
89 cbfs-files-y
+= pdrw.hash
90 pdrw.hash-file
:= $(obj
)/mainboard
/$(MAINBOARDDIR
)/pdrw.hash
91 pdrw.hash-name
:= pdrw.hash
94 CONFIG_EC_GOOGLE_CHROMEEC_PD_FIRMWARE_FILE
:= $(call strip_quotes
,$(CONFIG_EC_GOOGLE_CHROMEEC_PD_FIRMWARE_FILE
))
96 $(obj
)/mainboard
/$(MAINBOARDDIR
)/pdrw
: $(CONFIG_EC_GOOGLE_CHROMEEC_PD_FIRMWARE_FILE
)
97 cp
$(CONFIG_EC_GOOGLE_CHROMEEC_PD_FIRMWARE_FILE
) $@
99 $(obj
)/mainboard
/$(MAINBOARDDIR
)/pdrw.hash
: $(obj
)/mainboard
/$(MAINBOARDDIR
)/pdrw
100 openssl dgst
-sha256
-binary
$< > $@