ec/google/chromeec: Drop 'choice' selections for EC and PD firmware

Since the EC and PD firmware sources are now limited to two options -
'none' and 'external' - drop the choice selection and make the
EC and PD external options independent.

TEST=build google/lulu with external EC binary using existing defconfig

Change-Id: Ie37ff3a188b414fd099fbb344858bca4df419086
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83639
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Matt DeVillier 2024-07-24 15:46:49 -05:00 committed by Felix Singer
parent a391ae18a8
commit 6d6ec575b7
2 changed files with 8 additions and 40 deletions

View File

@ -110,22 +110,10 @@ config EC_GOOGLE_CHROMEEC_RTC
Enable support for the real-time clock on the ChromeOS EC. This
uses the EC_CMD_RTC_GET_VALUE command to read the current time.
choice
prompt "Chrome EC firmware source"
default EC_GOOGLE_CHROMEEC_FIRMWARE_NONE
config EC_GOOGLE_CHROMEEC_FIRMWARE_NONE
bool "No EC firmware is included"
config EC_GOOGLE_CHROMEEC_FIRMWARE_EXTERNAL
bool "Include an external EC firmware binary"
help
No EC firmware is included in the image.
config EC_GOOGLE_CHROMEEC_FIRMWARE_EXTERNAL
bool "External EC firmware is included"
help
Include EC firmware binary in the image from an external source.
It is expected to be built externally.
endchoice
Include a precompiled EC firmware binary in the image.
config EC_GOOGLE_CHROMEEC_FIRMWARE_FILE
string "Chrome EC firmware path and filename"
@ -133,23 +121,11 @@ config EC_GOOGLE_CHROMEEC_FIRMWARE_FILE
help
The path and filename of the EC firmware file to use.
choice
prompt "Chrome EC firmware source for PD"
config EC_GOOGLE_CHROMEEC_PD_FIRMWARE_EXTERNAL
bool "Include an external PD firmware binary"
depends on EC_GOOGLE_CHROMEEC_PD
default EC_GOOGLE_CHROMEEC_PD_FIRMWARE_NONE
config EC_GOOGLE_CHROMEEC_PD_FIRMWARE_NONE
bool "No PD firmware is included"
help
No PD firmware is included in the image.
config EC_GOOGLE_CHROMEEC_PD_FIRMWARE_EXTERNAL
bool "External PD firmware is included"
help
Include PD firmware binary in the image from an external source.
It is expected to be built externally.
endchoice
Include a precompiled PD firmware binary in the image.
config EC_GOOGLE_CHROMEEC_PD_FIRMWARE_FILE
string "Chrome EC firmware path and filename for PD"

View File

@ -57,7 +57,7 @@ CHROMEEC_SOURCE ?= $(top)/3rdparty/chromeec
# use to update the EC. ecrw is the main embedded controller's firmware,
# pdrw is for a USB PD controller.
ifneq ($(CONFIG_EC_GOOGLE_CHROMEEC_FIRMWARE_NONE),y)
ifeq ($(CONFIG_EC_GOOGLE_CHROMEEC_FIRMWARE_EXTERNAL),y)
cbfs-files-y += ecrw
ecrw-file := $(obj)/mainboard/$(MAINBOARDDIR)/ecrw
@ -69,21 +69,17 @@ ecrw.hash-file := $(obj)/mainboard/$(MAINBOARDDIR)/ecrw.hash
ecrw.hash-name := ecrw.hash
ecrw.hash-type := raw
ifeq ($(CONFIG_EC_GOOGLE_CHROMEEC_FIRMWARE_EXTERNAL),y)
CONFIG_EC_GOOGLE_CHROMEEC_FIRMWARE_FILE := $(call strip_quotes,$(CONFIG_EC_GOOGLE_CHROMEEC_FIRMWARE_FILE))
$(obj)/mainboard/$(MAINBOARDDIR)/ecrw: $(CONFIG_EC_GOOGLE_CHROMEEC_FIRMWARE_FILE)
cp $(CONFIG_EC_GOOGLE_CHROMEEC_FIRMWARE_FILE) $@
endif
$(obj)/mainboard/$(MAINBOARDDIR)/ecrw.hash: $(obj)/mainboard/$(MAINBOARDDIR)/ecrw
openssl dgst -sha256 -binary $< > $@
endif
ifeq ($(CONFIG_EC_GOOGLE_CHROMEEC_PD),y)
ifneq ($(CONFIG_EC_GOOGLE_CHROMEEC_PD_FIRMWARE_NONE),y)
ifeq ($(CONFIG_EC_GOOGLE_CHROMEEC_PD_FIRMWARE_EXTERNAL),y)
cbfs-files-y += pdrw
pdrw-file := $(obj)/mainboard/$(MAINBOARDDIR)/pdrw
@ -95,12 +91,10 @@ pdrw.hash-file := $(obj)/mainboard/$(MAINBOARDDIR)/pdrw.hash
pdrw.hash-name := pdrw.hash
pdrw.hash-type := raw
ifeq ($(CONFIG_EC_GOOGLE_CHROMEEC_PD_FIRMWARE_EXTERNAL),y)
CONFIG_EC_GOOGLE_CHROMEEC_PD_FIRMWARE_FILE := $(call strip_quotes,$(CONFIG_EC_GOOGLE_CHROMEEC_PD_FIRMWARE_FILE))
$(obj)/mainboard/$(MAINBOARDDIR)/pdrw: $(CONFIG_EC_GOOGLE_CHROMEEC_PD_FIRMWARE_FILE)
cp $(CONFIG_EC_GOOGLE_CHROMEEC_PD_FIRMWARE_FILE) $@
endif
$(obj)/mainboard/$(MAINBOARDDIR)/pdrw.hash: $(obj)/mainboard/$(MAINBOARDDIR)/pdrw
openssl dgst -sha256 -binary $< > $@
@ -108,5 +102,3 @@ $(obj)/mainboard/$(MAINBOARDDIR)/pdrw.hash: $(obj)/mainboard/$(MAINBOARDDIR)/pdr
endif
endif
endif