Matt DeVillier has submitted this change. ( https://review.coreboot.org/c/coreboot/+/85935?usp=email )
Change subject: util/chromeos/crosfirmware: Improve matching when scanning manifest file ......................................................................
util/chromeos/crosfirmware: Improve matching when scanning manifest file
To ensure we find the correct firmware image, match against `$BOARD":` rather than just `$BOARD`. This fixes an issue where another board (b1) using the same firmware build or name as the one we are searching for, causes the grep matching to return empty strings.
TEST=successfully extract the firmware image for CAREENA, which previously failed.
Change-Id: I2f2a71f0b033938aafc1fd27e2996fe319614b3c Signed-off-by: Matt DeVillier matt.devillier@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/85935 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Felix Singer service+coreboot-gerrit@felixsinger.de --- M util/chromeos/crosfirmware.sh 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Felix Singer: Looks good to me, approved build bot (Jenkins): Verified
diff --git a/util/chromeos/crosfirmware.sh b/util/chromeos/crosfirmware.sh index 1972aec..cfb1fcc 100755 --- a/util/chromeos/crosfirmware.sh +++ b/util/chromeos/crosfirmware.sh @@ -114,8 +114,8 @@ _bios_image=$(grep -m1 "image" "$_unpacked/manifest.json" | cut -f4 -d'"') fi elif [ -f "$_unpacked/manifest.json" ]; then - _version=$(grep -m1 -A1 "$BOARD" "$_unpacked/manifest.json" | grep "host" | cut -f12 -d'"') - _bios_image=$(grep -m1 -A3 "$BOARD" "$_unpacked/manifest.json" | grep "image" | cut -f4 -d'"') + _version=$(grep -m1 -A1 "$BOARD":" "$_unpacked/manifest.json" | grep "host" | cut -f12 -d'"') + _bios_image=$(grep -m1 -A3 "$BOARD":" "$_unpacked/manifest.json" | grep "image" | cut -f4 -d'"') else _version=$(cat $_unpacked/VERSION | grep BIOS\ version: | cut -f2 -d: | tr -d \ )