xbmk: reintroduce setvar as newvar (init only)

use the simpler logic recently introduced, generalised
but it only sets variables to empty. this is safer than
the previous design, and brings the same reduction in
sloccount overall since i wasn't doing anything other
than emptying variables anyway, when it was used before.

i didn't like the long list of variables inside files,
so this makes everything more readable.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-09-11 14:24:55 +01:00
parent aad748c5ca
commit 8173aea83b
6 changed files with 36 additions and 166 deletions
+11 -60
View File
@@ -36,67 +36,18 @@ checkvarsxbmk="CONFIG_ME_BIN_PATH CONFIG_SMSC_SCH5545_EC_FW_FILE \
CONFIG_FSP_FD_PATH CONFIG_IFD_BIN_PATH CONFIG_MRC_FILE CONFIG_FSP_M_CBFS"
# lbmk-specific extensions; general variables
cbdir=""
cbfstoolref=""
has_hashes=""
hashfile=""
kbc1126_ec_dump=""
mecleaner=""
mfs=""
nuke=""
rom=""
vcfg=""
xromsize=""
eval "`newvar cbdir cbfstoolref has_hashes hashfile kbc1126_ec_dump mecleaner \
mfs nuke rom vcfg xromsize _7ztest _dest _dl _dl_bin _me _metmp _pre_dest`"
_7ztest=""
_dest=""
_dl=""
_dl_bin=""
_me=""
_metmp=""
_pre_dest=""
# lbmk-specific extensions; declared in pkg.cfg files in config/vendor/
DL_hash=""
DL_url=""
DL_url_bkup=""
E6400_VGA_bin_hash=""
E6400_VGA_DL_hash=""
E6400_VGA_DL_url=""
E6400_VGA_DL_url_bkup=""
E6400_VGA_offset=""
E6400_VGA_romname=""
EC_FW1_hash=""
EC_FW2_hash=""
EC_hash=""
EC_url=""
EC_url_bkup=""
FSPFD_hash=""
FSPM_bin_hash=""
FSPS_bin_hash=""
ME11bootguard=""
ME11delta=""
ME11pch=""
ME11sku=""
ME11version=""
ME_bin_hash=""
MEcheck=""
MEclean=""
MEshrink=""
MRC_bin_hash=""
MRC_refcode_cbtree=""
MRC_refcode_gbe=""
REF_bin_hash=""
SCH5545EC_bin_hash=""
SCH5545EC_DL_hash=""
SCH5545EC_DL_url=""
SCH5545EC_DL_url_bkup=""
TBFW_bin_hash=""
TBFW_hash=""
TBFW_size=""
TBFW_url=""
TBFW_url_bkup=""
XBMKmecleaner=""
# lbmk-specific extensions; declared by pkg.cfg files in config/vendor/
eval "`newvar DL_hash DL_url DL_url_bkup E6400_VGA_bin_hash E6400_VGA_DL_hash \
E6400_VGA_DL_url E6400_VGA_DL_url_bkup E6400_VGA_offset E6400_VGA_romname \
EC_FW1_hash EC_FW2_hash EC_hash EC_url EC_url_bkup FSPFD_hash \
FSPM_bin_hash FSPS_bin_hash ME11bootguard ME11delta ME11pch ME11sku \
ME11version ME_bin_hash MEcheck MEclean MEshrink MRC_bin_hash \
MRC_refcode_cbtree MRC_refcode_gbe REF_bin_hash SCH5545EC_bin_hash \
SCH5545EC_DL_hash SCH5545EC_DL_url SCH5545EC_DL_url_bkup TBFW_bin_hash \
TBFW_hash TBFW_size TBFW_url TBFW_url_bkup XBMKmecleaner`"
download()
{