summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-09-04 15:57:48 +0100
committerLeah Rowe <leah@libreboot.org>2023-09-04 15:57:48 +0100
commit52677309c529c6cbaad5cc76b39f2b9598488ed7 (patch)
treeaca82991369e39cb616d0dab65ea15d59849283e
parentea7fae97bd93ecbb82a1100c220d13a1f39d6ab2 (diff)
update/blobs/extract: replace errant target code
check based on whether defconfigs are available, which are used extensively, rather than checking based on whether target.cfg is available, which is not used Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xscript/update/blobs/extract20
1 files changed, 7 insertions, 13 deletions
diff --git a/script/update/blobs/extract b/script/update/blobs/extract
index f44086a9..7b7ee2d5 100755
--- a/script/update/blobs/extract
+++ b/script/update/blobs/extract
@@ -37,22 +37,12 @@ main()
vendor_rom="${2}"
boarddir="${cbcfgsdir}/${board}"
- check_board
+ [ -f "${vendor_rom}" ] || \
+ err "${board}: file does not exist: ${vendor_rom}"
build_dependencies
extract_blobs
}
-check_board()
-{
- if [ ! -f "${vendor_rom}" ]; then
- err "check_board: ${board}: file does not exist: ${vendor_rom}"
- elif [ ! -d "${boarddir}" ]; then
- err "check_board: ${board}: target not defined"
- elif [ ! -f "${boarddir}/target.cfg" ]; then
- err "check_board: ${board}: missing target.cfg"
- fi
-}
-
build_dependencies()
{
if [ ! -d me_cleaner ]; then
@@ -71,9 +61,13 @@ extract_blobs()
{
printf "extracting blobs for %s from %s\n" ${board} ${vendor_rom}
+ no_config="printf \"No configs on target, %s\\n\" ${board} 1>&2; exit 1"
+ for x in "${boarddir}"/config/*; do
+ [ -f "${x}" ] && no_config=""
+ done
+ eval "${no_config}"
set -- "${boarddir}/config/"*
. "${1}" 2>/dev/null
- . "${boarddir}/target.cfg"
[ "$CONFIG_HAVE_MRC" != "y" ] || \
./update blobs mrc || err "extract_blobs: can't fetch mrc"