util/chromeos/crosfirmware: Improve parsing of manifest.json
Some newer boards (like google/skyrim) use a separate line for each field, so adjust parsing to accommodate that. TEST=run `bash crosfirmware.sh` for frostflow, grunt, careena. Change-Id: I3af38d3577f1390c999ad5e6df0fa2c4c4382245 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/86057 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
This commit is contained in:
parent
a1238333d1
commit
2ce7c3946f
1 changed files with 4 additions and 2 deletions
|
|
@ -114,8 +114,10 @@ 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 -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'"')
|
||||
else
|
||||
_version=$(cat $_unpacked/VERSION | grep BIOS\ version: |
|
||||
cut -f2 -d: | tr -d \ )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue