cbfstool: Update FIT entries in the second bootblock

Hardware / Coreboot - Rizwan Qureshi [intel.com] - 26 June 2018 05:59 EDT

Once a second bootblock has been added using topswap (-j) option, Update the entries in second FIT using -j option with update-fit command.

Additionally add a -q option which allows to insert the address of a FMAP region (which should hold a microcode) as the first entry in the second FIT.

BUG=None BRANCH=None TEST= Create ROM images with -j options and update FIT using -q option. example: ./build/util/cbfstool/cbfstool coreboot.tmp create \-M build/fmap.fmap -r COREBOOT,FW_MAIN_A,FW_MAIN_B,RW_LEGACY build/util/cbfstool/cbfstool coreboot.tmp add \-f build/cbfs/fallback/bootblock.bin -n bootblock -t \ bootblock -b -49152 -j 0x10000 build/util/cbfstool/cbfstool coreboot.tmp add-master-header -j 0x10000 build/util/cbfstool/cbfstool coreboot.tmp add -f build/cpu_microcode_blob.bin \-n cpu_microcode_blob.bin -t microcode -r COREBOOT -a 16 build/util/cbfstool/cbfstool coreboot.tmp. update-fit \-n cpu_microcode_blob.bin -x 4 -j 0x10000 -q FW_MAIN_A

Also try the failure scenarion by providing invalid topswap size.

Change-Id: I9a417031c279038903cdf1761a791f2da0fe8644

c1072f2fc7 cbfstool: Update FIT entries in the second bootblock
util/cbfstool/cbfstool.c | 35 +++++++++++--
util/cbfstool/fit.c | 133 ++++++++++++++++++++++++++++++++++-------------
util/cbfstool/fit.h | 12 ++++-
3 files changed, 138 insertions(+), 42 deletions(-)

Upstream: review.coreboot.org

  • Share