From 97c9f06c9136899bcba38d57ae7b68bedc69c044 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 20 Jun 2023 01:49:25 +0100 Subject: 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 --- resources/scripts/update/blobs/download | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'resources/scripts') 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 -- cgit v1.2.1