summaryrefslogtreecommitdiff
path: root/resources/scripts/blobs
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-05-14 08:35:34 +0100
committerLeah Rowe <leah@libreboot.org>2023-05-14 08:35:34 +0100
commit6289eeb55e8939bf4d5e52f8ebff386fa4b7b9e0 (patch)
tree65393a470c8bfea23a665f8275063e64009f1718 /resources/scripts/blobs
parent54f8a45325daf718cef772584bc7b60aa2114d85 (diff)
blobutil/inject: fail if gbe.bin doesn't exist
Diffstat (limited to 'resources/scripts/blobs')
-rwxr-xr-xresources/scripts/blobs/inject11
1 files changed, 9 insertions, 2 deletions
diff --git a/resources/scripts/blobs/inject b/resources/scripts/blobs/inject
index 805db0db..ca43dd77 100755
--- a/resources/scripts/blobs/inject
+++ b/resources/scripts/blobs/inject
@@ -334,10 +334,17 @@ modify_gbe()
printf "changing mac address in gbe to ${new_mac}\n"
rom=${1}
- # TODO: check if CONFIG_GBE_BIN_PATH is empty
- # TODO: check that the gbe file actually exists
+
+ if [ -z ${CONFIG_GBE_BIN_PATH} ]; then
+ fail "CONFIG_GBE_BIN_PATH not set"
+ fi
+
_gbe_location=${CONFIG_GBE_BIN_PATH#../../}
+ if [ ! -f "${_gbe_location}" ]; then
+ fail "CONFIG_GBE_BIN_PATH points to missing file"
+ fi
+
if [ ! -f ${nvmutil} ]; then
make -C util/nvmutil || fail 'failed to build nvmutil'
fi