southbridge/intel/common: Add an option to allow stitching of CSE binary

In the following changes, CSE binary for some platforms will be
stitched at build time instead of adding a pre-built binary. This
change adds a new Kconfig `STITCH_ME_BIN` which allows mainboard to
select if it wants to stitch CSE binary instead of adding a pre-built
one. In this case, ME_BIN_PATH is not visible to user and instead
mainboard and/or SoC code is expected to provide the recipe for
stitching the CSE image.

BUG=b:189177580

Change-Id: I78ab377e110610f9ef4d86a2b6eeb4113897df85
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58083
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
Furquan Shaikh 2021-10-01 15:18:09 -07:00
parent 555f040772
commit 3959aa6351
2 changed files with 25 additions and 5 deletions

View File

@ -37,10 +37,19 @@ config HAVE_ME_BIN
coreboot without it. In this case however, you'll have to make sure coreboot without it. In this case however, you'll have to make sure
that you don't overwrite your ME/TXE firmware on your flash ROM. that you don't overwrite your ME/TXE firmware on your flash ROM.
config ME_BIN_PATH config STITCH_ME_BIN
string "Path to management engine firmware" bool "Stitch individual ME/CSE components"
default "3rdparty/blobs/mainboard/\$(MAINBOARDDIR)/me.bin" default n
depends on HAVE_ME_BIN depends on HAVE_ME_BIN
help
This config can be selected by mainboard if it wants to stitch ME/CSE
components during build time instead of supplying a pre-stitched
binary.
config ME_BIN_PATH
string "Path to management engine firmware" if !STITCH_ME_BIN
default "3rdparty/blobs/mainboard/\$(MAINBOARDDIR)/me.bin"
depends on HAVE_ME_BIN && !STITCH_ME_BIN
config CHECK_ME config CHECK_ME
bool "Verify the integrity of the supplied ME/TXE firmware" bool "Verify the integrity of the supplied ME/TXE firmware"

View File

@ -25,7 +25,18 @@ endif
add_intel_firmware: $(call strip_quotes,$(CONFIG_IFD_BIN_PATH)) add_intel_firmware: $(call strip_quotes,$(CONFIG_IFD_BIN_PATH))
ifeq ($(CONFIG_HAVE_ME_BIN),y) ifeq ($(CONFIG_HAVE_ME_BIN),y)
add_intel_firmware: $(call strip_quotes,$(CONFIG_ME_BIN_PATH))
OBJ_ME_BIN := $(obj)/me.bin
ifneq ($(CONFIG_STITCH_ME_BIN),y)
$(OBJ_ME_BIN): $(call strip_quotes,$(CONFIG_ME_BIN_PATH))
cp $< $@
endif
add_intel_firmware: $(OBJ_ME_BIN)
endif endif
ifeq ($(CONFIG_HAVE_GBE_BIN),y) ifeq ($(CONFIG_HAVE_GBE_BIN),y)
add_intel_firmware: $(call strip_quotes,$(CONFIG_GBE_BIN_PATH)) add_intel_firmware: $(call strip_quotes,$(CONFIG_GBE_BIN_PATH))
@ -46,7 +57,7 @@ ifeq ($(CONFIG_HAVE_ME_BIN),y)
printf " IFDTOOL me.bin -> coreboot.pre\n" printf " IFDTOOL me.bin -> coreboot.pre\n"
$(objutil)/ifdtool/ifdtool \ $(objutil)/ifdtool/ifdtool \
$(IFDTOOL_USE_CHIPSET) \ $(IFDTOOL_USE_CHIPSET) \
-i ME:$(CONFIG_ME_BIN_PATH) \ -i ME:$(OBJ_ME_BIN) \
-O $(obj)/coreboot.pre \ -O $(obj)/coreboot.pre \
$(obj)/coreboot.pre $(obj)/coreboot.pre
endif endif