summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-20 01:23:37 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-20 01:23:37 +0100
commitbc61c39ec8c487661676bdee32626377cd78f5a4 (patch)
tree3d553ed5288830b373df803edd343e8b1f88b668
parent808458ced5bcc5131d542e7e2fcb8120a613c8eb (diff)
vendor.sh: minor code cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xinclude/vendor.sh13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/vendor.sh b/include/vendor.sh
index 31b50889..9c819bbf 100755
--- a/include/vendor.sh
+++ b/include/vendor.sh
@@ -35,14 +35,13 @@ vendor_download()
boarddir="$cbcfgsdir/$board"
_b="${board%%_*mb}" # shorthand (no duplication per rom size)
- detect_firmware && exit 0
- scan_config "$_b" "config/vendor" && bootstrap && getfiles
+ getcfg && scancfg "$_b" "config/vendor" && bootstrap && getfiles
}
-detect_firmware()
+getcfg()
{
[ -d "$boarddir" ] || $err "Target '$board' not defined."
- check_defconfig "$boarddir" 1>"$tmpdir/vendorcfg.list" && return 0
+ check_defconfig "$boarddir" 1>"$tmpdir/vendorcfg.list" && return 1
while read -r cbcfgfile; do
set +u +e
. "$cbcfgfile" 2>/dev/null
@@ -50,7 +49,7 @@ detect_firmware()
done < "$tmpdir/vendorcfg.list"
. "$boarddir/target.cfg" 2>/dev/null
- [ -z "$tree" ] && $err "detect_firmware $boarddir: tree undefined"
+ [ -z "$tree" ] && $err "getcfg $boarddir: tree undefined"
cbdir="src/coreboot/$tree"
cbfstool="elf/cbfstool/$tree/cbfstool"
@@ -60,9 +59,9 @@ detect_firmware()
for c in CONFIG_HAVE_MRC CONFIG_HAVE_ME_BIN CONFIG_KBC1126_FIRMWARE \
CONFIG_VGA_BIOS_FILE CONFIG_INCLUDE_SMSC_SCH5545_EC_FW; do
eval "[ \"\${$c}\" = \"/dev/null\" ] && continue"
- eval "[ -z \"\${$c}\" ] || return 1"
+ eval "[ -z \"\${$c}\" ] || return 0"
done
- printf "Vendor files not needed for: %s\n" "$board" 1>&2
+ printf "Vendor files not needed for: %s\n" "$board" 1>&2 && return 1
}
bootstrap()