From 4f0b6fd10aa89fbb38bdebf14b8a82d52e9ee233 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Thu, 12 May 2016 15:13:23 +0200 Subject: [PATCH] build system: really disable building CrEC when not needed Enable users to set the EC_EXTERNAL_FIRMWARE config flag, and actively ignore anything related to EC firmware board names if enabled. BUG=none BRANCH=none CQ-DEPEND=CL:344540 TEST=emerge-samus coreboot works Change-Id: I39c3038d059ec3d7710b864061fcf83b8d6d4d13 Signed-off-by: Patrick Georgi Reviewed-on: https://chromium-review.googlesource.com/345584 Reviewed-by: Aaron Durbin Commit-Queue: Martin Roth Trybot-Ready: Martin Roth Tested-by: Martin Roth --- src/ec/google/chromeec/Kconfig | 3 ++- src/ec/google/chromeec/Makefile.inc | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ec/google/chromeec/Kconfig b/src/ec/google/chromeec/Kconfig index 2e4affc975..0f0803c297 100644 --- a/src/ec/google/chromeec/Kconfig +++ b/src/ec/google/chromeec/Kconfig @@ -76,7 +76,8 @@ config EC_GOOGLE_CHROMEEC_SPI_CHIP config EC_EXTERNAL_FIRMWARE depends on EC_GOOGLE_CHROMEEC - def_bool n + bool "Disable building EC firmware" + default n help Disable building EC firmware if it's already built externally (and added manually.) diff --git a/src/ec/google/chromeec/Makefile.inc b/src/ec/google/chromeec/Makefile.inc index 7ae1835ffc..9f5f0c1572 100644 --- a/src/ec/google/chromeec/Makefile.inc +++ b/src/ec/google/chromeec/Makefile.inc @@ -27,6 +27,7 @@ smm-$(CONFIG_VBOOT_VERIFY_FIRMWARE) += vboot_storage.c romstage-$(CONFIG_VBOOT_VERIFY_FIRMWARE) += vboot_storage.c verstage-$(CONFIG_VBOOT_VERIFY_FIRMWARE) += vboot_storage.c +ifneq ($(CONFIG_EC_EXTERNAL_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. @@ -64,5 +65,6 @@ $(obj)/mainboard/$(MAINBOARDDIR)/pdrw: cp $(obj)/external/chromeec/$(CONFIG_EC_GOOGLE_CHROMEEC_PD_BOARDNAME)/RW/ec.RW.flat $@ .PHONY: $(obj)/mainboard/$(MAINBOARDDIR)/ecrw $(obj)/mainboard/$(MAINBOARDDIR)/pdrw +endif endif