From 3959aa63518ed2a3fa6b62b82a9f6daf75dd38d8 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Fri, 1 Oct 2021 15:18:09 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58083 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/southbridge/intel/common/firmware/Kconfig | 13 +++++++++++-- src/southbridge/intel/common/firmware/Makefile.inc | 15 +++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) (limited to 'src/southbridge/intel/common') diff --git a/src/southbridge/intel/common/firmware/Kconfig b/src/southbridge/intel/common/firmware/Kconfig index ab0373a608..b9b766c708 100644 --- a/src/southbridge/intel/common/firmware/Kconfig +++ b/src/southbridge/intel/common/firmware/Kconfig @@ -37,10 +37,19 @@ config HAVE_ME_BIN 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. +config STITCH_ME_BIN + bool "Stitch individual ME/CSE components" + default n + 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" + string "Path to management engine firmware" if !STITCH_ME_BIN default "3rdparty/blobs/mainboard/\$(MAINBOARDDIR)/me.bin" - depends on HAVE_ME_BIN + depends on HAVE_ME_BIN && !STITCH_ME_BIN config CHECK_ME bool "Verify the integrity of the supplied ME/TXE firmware" diff --git a/src/southbridge/intel/common/firmware/Makefile.inc b/src/southbridge/intel/common/firmware/Makefile.inc index d5a48fd6f9..693bafb7a8 100644 --- a/src/southbridge/intel/common/firmware/Makefile.inc +++ b/src/southbridge/intel/common/firmware/Makefile.inc @@ -25,7 +25,18 @@ endif add_intel_firmware: $(call strip_quotes,$(CONFIG_IFD_BIN_PATH)) 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 ifeq ($(CONFIG_HAVE_GBE_BIN),y) 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" $(objutil)/ifdtool/ifdtool \ $(IFDTOOL_USE_CHIPSET) \ - -i ME:$(CONFIG_ME_BIN_PATH) \ + -i ME:$(OBJ_ME_BIN) \ -O $(obj)/coreboot.pre \ $(obj)/coreboot.pre endif -- cgit v1.2.3