util/chromeos/crosfirmware: Increase lookahead when parsing bios_image

Newer recovery images change the manifest format yet again, so increase
the lookhead when parsing the bios_image field to ensure we can find it.

TEST=run `./crosfirmware.sh craaskbowl` without erroring out

Change-Id: Idb1862e38a82f3cec8db55993ccf421cf3572c6f
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86777
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
This commit is contained in:
Matt DeVillier 2025-03-09 20:49:27 -05:00
commit 53b53ddd1c

View file

@ -116,8 +116,8 @@ extract_coreboot() {
elif [ -f "$_unpacked/manifest.json" ]; then
_version=$(grep -m1 -A4 "$BOARD\":" "$_unpacked/manifest.json" | grep -m1 "rw" |
sed 's/.*\(rw.*\)/\1/' | sed 's/.*\("Google.*\)/\1/' | cut -f2 -d'"')
_bios_image=$(grep -m1 -A7 "$BOARD\":" "$_unpacked/manifest.json" | grep -m1 "image" |
sed 's/.*"image": //' | cut -f2 -d'"')
_bios_image=$(grep -m1 -A10 "$BOARD\":" "$_unpacked/manifest.json" |
grep -m1 "image" | sed 's/.*"image": //' | cut -f2 -d'"')
else
_version=$(cat $_unpacked/VERSION | grep BIOS\ version: |
cut -f2 -d: | tr -d \ )