Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/85873?usp=email )
Change subject: util/chromeos/crosfirmware: Add special handling for REEF board ......................................................................
util/chromeos/crosfirmware: Add special handling for REEF board
The layout of an extracted REEF shellball doesn't conform to the usual ones used by other boards, so add a special-case handler for it.
TEST= run `bash croshfirmware.sh reef` and receive the correct firmware image for the board.
Change-Id: Ib391f30a77b6aa75aa130ffb525e6e1d1239a588 Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M util/chromeos/crosfirmware.sh 1 file changed, 8 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/73/85873/1
diff --git a/util/chromeos/crosfirmware.sh b/util/chromeos/crosfirmware.sh index ee87329..2eaa839 100755 --- a/util/chromeos/crosfirmware.sh +++ b/util/chromeos/crosfirmware.sh @@ -105,8 +105,14 @@ _version=$(cat $_unpacked/VERSION | grep -m 1 -e Model.*$_board -A5 | grep "BIOS version:" | cut -f2 -d: | tr -d \ ) fi - _bios_image=$(grep "IMAGE_MAIN" $_unpacked/models/$_board/setvars.sh | - cut -f2 -d") + if [ -f $_unpacked/models/$_board/setvars.sh ]; then + _bios_image=$(grep "IMAGE_MAIN" $_unpacked/models/$_board/setvars.sh | + cut -f2 -d") + else + # special case for REEF, others? + _version=$(grep -m1 "host" "$_unpacked/manifest.json" | cut -f12 -d'"') + _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'"')