summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-06-20 01:49:25 +0100
committerLeah Rowe <leah@libreboot.org>2023-06-20 01:53:12 +0100
commit97c9f06c9136899bcba38d57ae7b68bedc69c044 (patch)
tree670e38465dcf1741debbf83fb6d51d9b813336d2
parent652f3ba379b7ca9b1d35113b97818475308da25e (diff)
blobs/download: exit if no board configs found
fixes ./build boot roms all in detect_firmware(), "set" is used to get values from configs, to know if things like ME/MRC are needed on some "board" configs under resources/coreboot/, no actual coreboot configs are provided, because they are used as a reference (coreboot revision, tree name etc) for actual boards, with actual coreboot configs when attempting to build for such a board, running "set" on such non-existent files would cause a non-zero exit, when we want zero. the non-zero exit then caused the build/boot/roms command to fail, when running "all" if it found, for example, resources/coreboot/cros/ which has the above problem, in this context work around it by verifying that coreboot configs exist for the given target name, in the blobutil download script. if no such configs exist, then exit zero (success) doing so is correct, because the script is intended to do just that, erroring only if it is detected that blobs are needed for a given board, but other errors occur; if no coreboot configs exist, then no roms will be built and, therefore, no blobs are needed Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xresources/scripts/update/blobs/download8
1 files changed, 8 insertions, 0 deletions
diff --git a/resources/scripts/update/blobs/download b/resources/scripts/update/blobs/download
index eebdf0a3..0896ed47 100755
--- a/resources/scripts/update/blobs/download
+++ b/resources/scripts/update/blobs/download
@@ -44,6 +44,14 @@ main()
board="${1}"
boarddir="${cbcfgsdir}/${board}"
+ exit_if_no_config="exit 0"
+ for x in "${boarddir}"/config/*; do
+ if [ -f "${x}" ]; then
+ exit_if_no_config=""
+ fi
+ done
+ eval "${exit_if_no_config}"
+
if [ ! -d "${boarddir}" ]; then
fail "Target not defined"
elif [ ! -f "${boarddir}/board.cfg" ]; then