[coreboot-gerrit] Patch set updated for coreboot: google/chromeec: Add Kconfig option to enable / disable EC build

Martin Roth (martinroth@google.com) gerrit at coreboot.org
Wed Jul 27 20:53:38 CEST 2016


Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15904

-gerrit

commit c2fa0c8d9b50d57872c1e70d5f1a6a7e367c6f1a
Author: Martin Roth <martinroth at google.com>
Date:   Mon Jul 25 14:29:14 2016 -0600

    google/chromeec: Add Kconfig option to enable / disable EC build
    
    Add a Kconfig option to explicitly enable and disable the google
    Chrome EC firmware build.  Disabling the build will also disable
    the software sync in the chipsets where it's enabled. On the
    platforms where EC_SOFTWARE_SYNC is enabled in the mainboard Kconfig,
    the select will need to be removed explicitly.
    
    Change-Id: I724727f8984957ac50fff2436939cd4f5dd7acd8
    Signed-off-by: Martin Roth <martinroth at google.com>
---
 src/ec/google/chromeec/Kconfig         | 6 ++++++
 src/ec/google/chromeec/Makefile.inc    | 5 ++++-
 src/soc/intel/apollolake/Kconfig       | 2 +-
 src/soc/intel/skylake/Kconfig          | 4 ++--
 src/vendorcode/google/chromeos/Kconfig | 2 +-
 5 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/ec/google/chromeec/Kconfig b/src/ec/google/chromeec/Kconfig
index 0e1b4f2..23adf88 100644
--- a/src/ec/google/chromeec/Kconfig
+++ b/src/ec/google/chromeec/Kconfig
@@ -105,3 +105,9 @@ config EC_GOOGLE_CHROMEEC_RTC
 	help
 	  Enable support for the real-time clock on the Chrome OS EC. This
 	  uses the EC_CMD_RTC_GET_VALUE command to read the current time.
+
+config BUILD_EC_GOOGLE_FIRMWARE
+	def_bool y
+	help
+	  Build the Chrome EC firmware, include it in the ROM image, and
+	  enable EC_SOFTWARE_SYNC if supported.
diff --git a/src/ec/google/chromeec/Makefile.inc b/src/ec/google/chromeec/Makefile.inc
index 4f310c8..b1b1ddb 100644
--- a/src/ec/google/chromeec/Makefile.inc
+++ b/src/ec/google/chromeec/Makefile.inc
@@ -27,6 +27,8 @@ smm-$(CONFIG_VBOOT_VERIFY_FIRMWARE) += vboot_storage.c
 romstage-$(CONFIG_VBOOT_VERIFY_FIRMWARE) += vboot_storage.c
 verstage-$(CONFIG_VBOOT_VERIFY_FIRMWARE) += vboot_storage.c
 
+ifeq ($(CONFIG_BUILD_EC_GOOGLE_FIRMWARE),y)
+
 # These are Chrome EC firmware images that a payload (such as depthcharge) can
 # use to update the EC. ecrw is the main embedded controller's firmware,
 # pdrw is for a USB PD controller.
@@ -78,4 +80,5 @@ $(obj)/mainboard/$(MAINBOARDDIR)/%.hash: $(obj)/mainboard/$(MAINBOARDDIR)/%
 
 .PHONY: $(obj)/mainboard/$(MAINBOARDDIR)/ecrw $(obj)/mainboard/$(MAINBOARDDIR)/pdrw
 
-endif
+endif # ifeq ($(CONFIG_BUILD_EC_GOOGLE_FIRMWARE),y)
+endif # ifeq ($(CONFIG_EC_GOOGLE_CHROMEEC),y)
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index 3f14880..8d13a21 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -61,7 +61,7 @@ config CHROMEOS
 	select CHROMEOS_RAMOOPS_DYNAMIC
 	select CHROMEOS_VBNV_CMOS
 	select CHROMEOS_VBNV_CMOS_BACKUP_TO_FLASH
-	select EC_SOFTWARE_SYNC if EC_GOOGLE_CHROMEEC
+	select EC_SOFTWARE_SYNC if EC_GOOGLE_CHROMEEC && BUILD_EC_GOOGLE_FIRMWARE
 	select SEPARATE_VERSTAGE
 	select VBOOT_OPROM_MATTERS
 	select VBOOT_SAVE_RECOVERY_REASON_ON_REBOOT
diff --git a/src/soc/intel/skylake/Kconfig b/src/soc/intel/skylake/Kconfig
index 4c055ea..5cb3834 100644
--- a/src/soc/intel/skylake/Kconfig
+++ b/src/soc/intel/skylake/Kconfig
@@ -55,8 +55,8 @@ config CHROMEOS
 	select CHROMEOS_RAMOOPS_DYNAMIC
 	select CHROMEOS_VBNV_CMOS
 	select CHROMEOS_VBNV_CMOS_BACKUP_TO_FLASH
-	select EC_SOFTWARE_SYNC if EC_GOOGLE_CHROMEEC
-	select VBOOT_EC_SLOW_UPDATE
+	select EC_SOFTWARE_SYNC if EC_GOOGLE_CHROMEEC && BUILD_EC_GOOGLE_FIRMWARE
+	select VBOOT_EC_SLOW_UPDATE if EC_SOFTWARE_SYNC
 	select VBOOT_OPROM_MATTERS
 	select VBOOT_SAVE_RECOVERY_REASON_ON_REBOOT
 	select VIRTUAL_DEV_SWITCH
diff --git a/src/vendorcode/google/chromeos/Kconfig b/src/vendorcode/google/chromeos/Kconfig
index f97a4e1..cb9dd15 100644
--- a/src/vendorcode/google/chromeos/Kconfig
+++ b/src/vendorcode/google/chromeos/Kconfig
@@ -97,7 +97,7 @@ config CHROMEOS_RAMOOPS_RAM_SIZE
 config EC_SOFTWARE_SYNC
 	bool "Enable EC software sync"
 	default n
-	depends on VBOOT_VERIFY_FIRMWARE
+	depends on VBOOT_VERIFY_FIRMWARE && BUILD_EC_GOOGLE_FIRMWARE
 	help
 	  EC software sync is a mechanism where the AP helps the EC verify its
 	  firmware similar to how vboot verifies the main system firmware. This



More information about the coreboot-gerrit mailing list