summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-28 13:33:50 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-28 13:33:50 +0100
commit473f2778457b9a9e523cda11b50653518e837b46 (patch)
treeddc1b3ee1c02a279d28f17f797a76558de9eb22c
parenta2f4eba581078887d402db91ed5372e25238e589 (diff)
vendor.sh: unified reading of board configs
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xinclude/lib.sh2
-rwxr-xr-xinclude/vendor.sh20
2 files changed, 11 insertions, 11 deletions
diff --git a/include/lib.sh b/include/lib.sh
index 3f41b872..84107420 100755
--- a/include/lib.sh
+++ b/include/lib.sh
@@ -37,7 +37,7 @@ chkvars()
done
}
-eval `setvars "" _nogit board boarddir relname versiondate projectsite \
+eval `setvars "" _nogit board relname versiondate projectsite \
projectname aur_notice cfgsdir datadir version xbmk_parent`
for fv in projectname projectsite version versiondate; do
diff --git a/include/vendor.sh b/include/vendor.sh
index 7d1c4459..8f4daeed 100755
--- a/include/vendor.sh
+++ b/include/vendor.sh
@@ -24,22 +24,18 @@ eval `setvars "" EC_url_bkup EC_hash DL_hash DL_url_bkup MRC_refcode_gbe vcfg \
CONFIG_VGA_BIOS_FILE CONFIG_VGA_BIOS_ID CONFIG_KBC1126_FW1 release DL_url \
CONFIG_INCLUDE_SMSC_SCH5545_EC_FW CONFIG_SMSC_SCH5545_EC_FW_FILE nukemode \
CONFIG_IFD_BIN_PATH CONFIG_MRC_FILE CONFIG_HAVE_REFCODE_BLOB cbfstoolref \
- CONFIG_REFCODE_BLOB_FILE cbdir`
+ CONFIG_REFCODE_BLOB_FILE cbdir boarddir`
vendor_download()
{
export PATH="$PATH:/sbin"
[ $# -gt 0 ] || $err "No argument given"
- board="$1"; boarddir="$cbcfgsdir/$board"
- getcfg && bootstrap && getfiles; return 0
+ board="$1" && readcfg && getcfg && bootstrap && getfiles; return 0
}
getcfg()
{
- eval `setcfg "$boarddir/target.cfg"`
- chkvars vcfg tree
-
check_defconfig "$boarddir" 1>"$TMPDIR/vendorcfg.list" && return 1
while read -r cbcfgfile; do
set +u +e; . "$cbcfgfile" 2>/dev/null; set -u -e
@@ -269,10 +265,7 @@ check_board()
release="y"
board="$(detect_board "$archive")"
fi
-
- boarddir="$cbcfgsdir/$board"
- eval `setcfg "$boarddir/target.cfg"`
- [ -z "$tree" ] && $err "check_board $board: tree undefined"; return 0
+ readcfg
}
check_release()
@@ -302,6 +295,13 @@ detect_board()
printf "%s\n" "$board"
}
+readcfg()
+{
+ boarddir="$cbcfgsdir/$board"
+ eval `setcfg "$boarddir/target.cfg"`
+ chkvars vcfg tree
+}
+
build_dependencies_inject()
{
cbdir="src/coreboot/$tree"