summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2024-11-07 11:35:22 -0600
committerMatt DeVillier <matt.devillier@gmail.com>2024-11-08 19:22:37 +0000
commitcfe1e921dd5d358fec2b46f50e356839531d487f (patch)
treeb0d4c5121b291d5c44dc0ee1e576f15ca7c06fc4
parent7e0c771c50abbab6ff28483f75c5e3ae19de3301 (diff)
util/crosfirmware: Add support for parsing from manifest.json
Some ChromeOS recovery images, such as for GRUNT, support multiple boards / multiple bios/ec images, but do not break them out in a 'models' subdirectory like modern recovery images do. Instead, they use a manifest.json to map the board name to the correct bios/ec images. Add support for parsing out the info from here. TEST=run `util/chromeos/crosfirmware.sh kasumi` and verify that the correct shellball firmware is extracted from the recovery image. Change-Id: I64153ba16cb8328d65a0f088d05f04a969f6810f Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/85024 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
-rwxr-xr-xutil/chromeos/crosfirmware.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/chromeos/crosfirmware.sh b/util/chromeos/crosfirmware.sh
index e72ff7d395..ee873290a5 100755
--- a/util/chromeos/crosfirmware.sh
+++ b/util/chromeos/crosfirmware.sh
@@ -107,6 +107,9 @@ extract_coreboot() {
fi
_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'"')
else
_version=$(cat $_unpacked/VERSION | grep BIOS\ version: |
cut -f2 -d: | tr -d \ )