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>
This commit is contained in:
parent
b6b79e980e
commit
9bb805e0c9
1 changed files with 2 additions and 2 deletions
|
|
@ -114,8 +114,8 @@ extract_coreboot() {
|
|||
_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 \ )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue