summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2016-05-17 17:38:10 +0200
committerDavid Hendricks <dhendrix@chromium.org>2016-05-18 00:17:18 +0200
commit0e962eeb93741a9116e201aa52ab7bb966dfd482 (patch)
treedb01fb6df1734a0ed201683f49a2981734334c22 /util
parent5d9f5ff910a61d59b73fadb586ff1268ba41c9f3 (diff)
board_status: Abort early if the coreboot image doesn't exist
Change-Id: I274c990e69634ebcb9dd77470cbf1515281de312 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/14683 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'util')
-rwxr-xr-xutil/board_status/board_status.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index 4716f2cefa..1dcca713da 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -266,6 +266,12 @@ if [ $? -ne 0 ]; then
exit $EXIT_FAILURE
fi
+if [ ! -e "$COREBOOT_IMAGE" ]; then
+ echo "board_status needs $COREBOOT_IMAGE, but it does not exist."
+ echo "Use \"-i IMAGE_FILE\" to select a different image, or \"--help\" for more options."
+ exit $EXIT_FAILURE
+fi
+
# Results will be placed in a temporary location until we're ready to upload.
# If the user does not wish to upload, results will remain in /tmp.
tmpdir=$(mktemp -d --tmpdir coreboot_board_status.XXXXXXXX)