Matt DeVillier has uploaded this change for review. ( 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 --- M util/chromeos/crosfirmware.sh 1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/85935/1
diff --git a/util/chromeos/crosfirmware.sh b/util/chromeos/crosfirmware.sh index ee87329..ab03cf6 100755 --- a/util/chromeos/crosfirmware.sh +++ b/util/chromeos/crosfirmware.sh @@ -108,8 +108,8 @@ _bios_image=$(grep "IMAGE_MAIN" $_unpacked/models/$_board/setvars.sh | cut -f2 -d") 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 \ )