summaryrefslogtreecommitdiff
path: root/include/vendor.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-01-04 19:32:39 +0000
committerLeah Rowe <leah@libreboot.org>2025-01-04 19:32:39 +0000
commit4d5caf1dcfc974e097a1fbe2d9265e612b0566d8 (patch)
tree0271dfc5dce4fd41a86969cbeea441ac64fee748 /include/vendor.sh
parentfc4ee88e167c8a8a537a57e7d44f643ffff19385 (diff)
vendor.sh: check that the vcfg file exists
setcfg already checks it, but it's good to check anyway Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/vendor.sh')
-rw-r--r--include/vendor.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/vendor.sh b/include/vendor.sh
index cefed456..f83bf290 100644
--- a/include/vendor.sh
+++ b/include/vendor.sh
@@ -33,7 +33,8 @@ eval "`setvars "" has_hashes EC_hash DL_hash DL_url_bkup MRC_refcode_gbe vcfg \
archive EC_url boarddir rom cbdir DL_url nukemode cbfstoolref FSPFD_hash \
_7ztest ME11bootguard ME11delta ME11version ME11sku ME11pch tmpromdir \
IFD_platform ifdprefix cdir sdir _me _metmp mfs TBFW_url_bkup TBFW_url \
- TBFW_hash TBFW_size hashfile xromsize xchanged EC_url_bkup need_files $cv`"
+ TBFW_hash TBFW_size hashfile xromsize xchanged EC_url_bkup need_files \
+ vfile $cv`"
vendor_download()
{
@@ -65,7 +66,7 @@ readkconfig()
CONFIG_LENOVO_TBFW_BIN CONFIG_FSP_M_FILE CONFIG_FSP_S_FILE; do
eval "[ \"\${$c}\" = \"/dev/null\" ] && continue"
eval "[ -z \"\${$c}\" ] && continue"
- eval "`setcfg "config/vendor/$vcfg/pkg.cfg"`"; return 0
+ eval "`setcfg "$vfile"`"; return 0
done
printf "Vendor files not needed for: %s\n" "$board" 1>&2; return 1
}
@@ -441,6 +442,9 @@ readcfg()
x_ ./mk -d coreboot "$tree" # even if vendorfiles not used, see: setmac
[ -z "$vcfg" ] && return 1
+ vfile="config/vendor/$vcfg/pkg.cfg"
+ [ -L "$vfile" ] && $err "'$archive', '$board': $vfile is a symlink"
+ [ -f "$vfile" ] || $err "'$archive', '$board': $vfile doesn't exist"
cbdir="src/coreboot/$tree"
cbfstool="elf/cbfstool/$tree/cbfstool"