From bc61c39ec8c487661676bdee32626377cd78f5a4 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 20 Jun 2024 01:23:37 +0100 Subject: vendor.sh: minor code cleanup Signed-off-by: Leah Rowe --- include/vendor.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'include') 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() -- cgit v1.2.1