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 <pgeorgi@chromium.org> Original-Commit-Id: 36e026404ed049d61b677ef043a781c8c209dd93 Original-Change-Id: Ib872627740dbd8ac19fc3e2a01464457f38366ed Original-Signed-off-by: Patrick Georgi <pgeorgi@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/336358 Original-Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Original-Tested-by: Patrick Georgi <pgeorgi@chromium.org> Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/14239 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
85cc5fdc4a
commit
fcc434764d
|
@ -91,11 +91,12 @@ GBB_FLAGS := $(call int-add, \
|
||||||
)
|
)
|
||||||
|
|
||||||
ifneq ($(CONFIG_GBB_BMPFV_FILE),)
|
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"
|
@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.sizetmp) 0x2180),0x1000 $@.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
|
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
else
|
else
|
||||||
$(obj)/gbb.stub: $(obj)/coreboot.rom $(FUTILITY)
|
$(obj)/gbb.stub: $(obj)/coreboot.rom $(FUTILITY)
|
||||||
|
@ -113,6 +114,11 @@ $(obj)/gbb.region: $(obj)/gbb.stub
|
||||||
--recoverykey="$(CONFIG_VBOOT_RECOVERY_KEY)" \
|
--recoverykey="$(CONFIG_VBOOT_RECOVERY_KEY)" \
|
||||||
--flags=$(GBB_FLAGS) \
|
--flags=$(GBB_FLAGS) \
|
||||||
$@.tmp
|
$@.tmp
|
||||||
|
ifneq ($(CONFIG_GBB_BMPFV_FILE),)
|
||||||
|
$(FUTILITY) gbb_utility -s \
|
||||||
|
--bmpfv="$(CONFIG_GBB_BMPFV_FILE)" \
|
||||||
|
$@.tmp
|
||||||
|
endif
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
|
|
||||||
build_complete:: $(obj)/gbb.region
|
build_complete:: $(obj)/gbb.region
|
||||||
|
|
Loading…
Reference in New Issue