From fcc434764deff0eeb17e86a775f4d3da71d28a86 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Thu, 31 Mar 2016 13:08:42 +0200 Subject: chromeos: Fix adding a bmpblk to GBB The codepath was untested and incomplete. It now determines the right GBB region sizes and puts the data in. BUG=chromium:595715 BRANCH=none TEST=none Change-Id: I2cc47ddd8aa7675375ca5ed5f75632c30c65dd1e Signed-off-by: Patrick Georgi Original-Commit-Id: 36e026404ed049d61b677ef043a781c8c209dd93 Original-Change-Id: Ib872627740dbd8ac19fc3e2a01464457f38366ed Original-Signed-off-by: Patrick Georgi Original-Reviewed-on: https://chromium-review.googlesource.com/336358 Original-Commit-Ready: Patrick Georgi Original-Tested-by: Patrick Georgi Original-Reviewed-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/14239 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/vendorcode/google/chromeos/Makefile.inc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/vendorcode') diff --git a/src/vendorcode/google/chromeos/Makefile.inc b/src/vendorcode/google/chromeos/Makefile.inc index 43258d0bd4..0ae6fb0429 100644 --- a/src/vendorcode/google/chromeos/Makefile.inc +++ b/src/vendorcode/google/chromeos/Makefile.inc @@ -91,11 +91,12 @@ GBB_FLAGS := $(call int-add, \ ) ifneq ($(CONFIG_GBB_BMPFV_FILE),) -$(obj)/gbb.stub: $(obj)/coreboot.rom $(FUTILITY) +$(obj)/gbb.sizetmp: $(obj)/coreboot.rom + $(CBFSTOOL) $< read -r GBB -f $@ + +$(obj)/gbb.stub: $(obj)/coreboot.rom $(FUTILITY) $(obj)/gbb.sizetmp @printf " CREATE GBB (with BMPFV)\n" - $(CBFSTOOL) $< read -r GBB -f $(obj)/gbb.stub.tmp - $(FUTILITY) gbb_utility -c 0x100,0x1000,$(call int-subtract $(call file-size,$(obj)/gbb.stub.tmp) 0x2180),0x1000 $@.tmp - rm -f $(obj)/gbb.stub.tmp + $(FUTILITY) gbb_utility -c 0x100,0x1000,$(call int-subtract,$(call file-size,$(obj)/gbb.sizetmp) 0x2180),0x1000 $@.tmp mv $@.tmp $@ else $(obj)/gbb.stub: $(obj)/coreboot.rom $(FUTILITY) @@ -113,6 +114,11 @@ $(obj)/gbb.region: $(obj)/gbb.stub --recoverykey="$(CONFIG_VBOOT_RECOVERY_KEY)" \ --flags=$(GBB_FLAGS) \ $@.tmp +ifneq ($(CONFIG_GBB_BMPFV_FILE),) + $(FUTILITY) gbb_utility -s \ + --bmpfv="$(CONFIG_GBB_BMPFV_FILE)" \ + $@.tmp +endif mv $@.tmp $@ build_complete:: $(obj)/gbb.region -- cgit v1.2.3