Marcello Sylvester Bauer has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38719 )
Change subject: sb/intel/common/firmware: add ifd update option ......................................................................
sb/intel/common/firmware: add ifd update option
Add a Kconfig option to update the ifd descriptor regions by providing a flashrom layout file.
depends on: https://review.coreboot.org/c/coreboot/+/38711 -> Id3db09291af2bd2e759c283e316afd5da1fb4ca7
Change-Id: I41914f83aca443551b93f6e44b3aa975076accbe Signed-off-by: Marcello Sylvester Bauer sylv@sylv.io --- M src/southbridge/intel/common/firmware/Kconfig M src/southbridge/intel/common/firmware/Makefile.inc 2 files changed, 22 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/38719/1
diff --git a/src/southbridge/intel/common/firmware/Kconfig b/src/southbridge/intel/common/firmware/Kconfig index eb63d34..99d99bf 100644 --- a/src/southbridge/intel/common/firmware/Kconfig +++ b/src/southbridge/intel/common/firmware/Kconfig @@ -38,6 +38,15 @@ default "3rdparty/blobs/mainboard/$(MAINBOARDDIR)/descriptor.bin" depends on HAVE_IFD_BIN
+config HAVE_IFD_BIN_LAYOUT + bool "update regions using a flashrom layout file" + default false + depends on HAVE_IFD_BIN + +config IFD_BIN_LAYOUT_PATH + string "Path and filename flashrom layout file" + depends on HAVE_IFD_BIN_LAYOUT + config HAVE_ME_BIN bool "Add Intel ME/TXE firmware" depends on HAVE_IFD_BIN diff --git a/src/southbridge/intel/common/firmware/Makefile.inc b/src/southbridge/intel/common/firmware/Makefile.inc index 5f3212f..2fc685e 100644 --- a/src/southbridge/intel/common/firmware/Makefile.inc +++ b/src/southbridge/intel/common/firmware/Makefile.inc @@ -27,6 +27,10 @@ endif
IFD_BIN_PATH := $(CONFIG_IFD_BIN_PATH) +ifeq ($(CONFIG_HAVE_IFD_BIN_LAYOUT),y) +IFD_BIN_PATH := $(obj)/descriptor-new.bin +endif + ifneq ($(call strip_quotes,$(CONFIG_IFD_CHIPSET)),) IFDTOOL_USE_CHIPSET := -p $(CONFIG_IFD_CHIPSET) endif @@ -42,6 +46,15 @@ add_intel_firmware: $(call strip_quotes,$(CONFIG_EC_BIN_PATH)) endif add_intel_firmware: $(obj)/coreboot.pre $(IFDTOOL) +ifeq ($(CONFIG_HAVE_IFD_BIN_LAYOUT),y) + printf " IFDTOOL Update Intel Firmware Descriptor\n" + cp $(CONFIG_IFD_BIN_PATH) $(obj)/descriptor-old.bin + $(objutil)/ifdtool/ifdtool \ + $(IFDTOOL_USE_CHIPSET) \ + -n $(CONFIG_IFD_BIN_LAYOUT_PATH) \ + $(obj)/descriptor-old.bin + mv $(obj)/descriptor-old.bin.new $(obj)/descriptor-new.bin +endif printf " DD Adding Intel Firmware Descriptor\n" dd if=$(IFD_BIN_PATH) \ of=$(obj)/coreboot.pre conv=notrunc >/dev/null 2>&1