summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-10-16 15:46:44 +0100
committerLeah Rowe <leah@libreboot.org>2025-10-16 15:46:44 +0100
commite1b6ccf69ec42f24d751466cee00b265fe44e899 (patch)
treeb6c8ba5159943a84a8159cf827d6fff82fce9a8f
parentd84a556bf084b4622cf389847ee3f888bb4dbbe5 (diff)
xbmk: sort global variables alphabetically
also separate some of the special ones. this makes the variables easier to read/find. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--include/get.sh17
-rw-r--r--include/init.sh30
-rw-r--r--include/inject.sh12
-rw-r--r--include/mrc.sh4
-rw-r--r--include/release.sh6
-rw-r--r--include/tree.sh98
-rw-r--r--include/vendor.sh70
7 files changed, 121 insertions, 116 deletions
diff --git a/include/get.sh b/include/get.sh
index 20ee4fe5..e3e4c311 100644
--- a/include/get.sh
+++ b/include/get.sh
@@ -3,14 +3,15 @@
# Copyright (c) 2020-2021,2023-2025 Leah Rowe <leah@libreboot.org>
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
-depend=""
-loc=""
url=""
bkup_url=""
-subgit=""
-subgit_bkup=""
+
+depend=""
+loc=""
subcurl=""
subcurl_bkup=""
+subgit=""
+subgit_bkup=""
subhash=""
tmpgit="$xbtmp/gitclone"
@@ -102,12 +103,12 @@ fetch_submodule()
{
mcfgdir="$mdir/${1##*/}"
- subhash=""
- subgit=""
- subgit_bkup=""
+ st=""
subcurl=""
subcurl_bkup=""
- st=""
+ subgit=""
+ subgit_bkup=""
+ subhash=""
if e "$mcfgdir/module.cfg" f missing; then
return 0
diff --git a/include/init.sh b/include/init.sh
index 9904d780..abd06862 100644
--- a/include/init.sh
+++ b/include/init.sh
@@ -15,27 +15,27 @@ if [ -z "${PATH+x}" ]; then
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
fi
+sha512sum="util/sbase/sha512sum"
+
+aur_notice=""
+basetmp=""
board=""
+checkvarschk=""
+checkvarsxbmk=""
+configdir=""
+datadir=""
+is_child=""
+python=""
+pyver=""
reinstall=""
+relname=""
version=""
versiondate=""
-aur_notice=""
-configdir=""
+xbmklock=""
xbmkpath=""
-datadir=""
xbmkpwd=""
-relname=""
xbmkpwd=""
xbtmp=""
-python=""
-pyver=""
-xbmklock=""
-checkvarsxbmk=""
-checkvarschk=""
-is_child=""
-basetmp=""
-
-sha512sum="util/sbase/sha512sum"
xbmk_init()
{
@@ -184,8 +184,8 @@ xbmk_child_set_env()
xbmk_child_set_tmp()
{
badtmp=""
- xbtmpchk=""
locktmp=""
+ xbtmpchk=""
xbtmpchk="`findpath "$TMPDIR" || err "!findpath $TMPDIR"`" || \
err "!findpath '$TMPDIR'" "xbmk_child_set_tmp" "$@"
@@ -323,9 +323,9 @@ xbmk_set_version()
xbmk_set_pyver()
{
- pyv="import sys; print(sys.version_info[:])"
python="python3"
pyver="2"
+ pyv="import sys; print(sys.version_info[:])"
if ! pybin python3 1>/dev/null; then
python="python"
diff --git a/include/inject.sh b/include/inject.sh
index 90528ac0..ee3df6af 100644
--- a/include/inject.sh
+++ b/include/inject.sh
@@ -18,13 +18,13 @@ if [ -n "$checkvarschk" ]; then
fi
archive=""
+board=""
boarddir=""
IFD_platform=""
ifdprefix=""
-tree=""
new_mac=""
tmpromdir=""
-board=""
+tree=""
xchanged=""
eval "`setvars "" $checkvars`"
@@ -37,13 +37,13 @@ inject()
err "No options specified" "inject" "$@"
fi
- nuke=""
- new_mac=""
- xchanged=""
-
archive="$1";
new_mac="xx:xx:xx:xx:xx:xx"
+ new_mac=""
+ nuke=""
+ xchanged=""
+
[ $# -gt 1 ] && case "$2" in
nuke)
new_mac=""
diff --git a/include/mrc.sh b/include/mrc.sh
index f1e31fa7..9c50af5c 100644
--- a/include/mrc.sh
+++ b/include/mrc.sh
@@ -4,10 +4,10 @@
# Modifications in this version are Copyright 2021,2023-2025 Leah Rowe.
# Original copyright detailed in repo: https://review.coreboot.org/coreboot/
+MRC_board=""
+MRC_hash=""
MRC_url=""
MRC_url_bkup=""
-MRC_hash=""
-MRC_board=""
SHELLBALL=""
extract_refcode()
diff --git a/include/release.sh b/include/release.sh
index 339ab3f5..e9017a05 100644
--- a/include/release.sh
+++ b/include/release.sh
@@ -2,11 +2,11 @@
# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
-reldir=""
reldest=""
-vdir=""
-rsrc=""
+reldir=""
relmode=""
+rsrc=""
+vdir=""
release()
{
diff --git a/include/tree.sh b/include/tree.sh
index 2020c450..450d79cf 100644
--- a/include/tree.sh
+++ b/include/tree.sh
@@ -7,48 +7,50 @@
# flag e.g. ./mk -b <-- mkflag would be "b"
flag=""
-xarch=""
-srcdir=""
-premake=""
-gnatdir=""
-xlang=""
-mode=""
-makeargs=""
-elfdir=""
-cmd=""
-project=""
-target=""
-target_dir=""
-targets=""
-xgcctree=""
-release=""
-bootstrapargs=""
-mkhelper=""
+# macros, overridden depending on the flag
+if_dry_build=":"
+if_not_dry_build=""
+
autoconfargs=""
-listfile=""
autogenargs=""
-buildtype=""
-rev=""
+badhash=""
+badtghash=""
+bootstrapargs=""
build_depend=""
-gccdir=""
+buildtype=""
+cleanargs=""
cmakedir=""
+cmd=""
defconfig=""
-postmake=""
-mkhelpercfg=""
-if_dry_build=":"
-if_not_dry_build=""
dest_dir=""
-mdir=""
-cleanargs=""
-gccver=""
+do_make=""
+elfdir=""
+forcepull=""
+gccdir=""
gccfull=""
-gnatver=""
+gccver=""
+gnatdir=""
gnatfull=""
-do_make=""
-badhash=""
-badtghash=""
+gnatver=""
+listfile=""
+makeargs=""
+mdir=""
+mkhelper=""
+mkhelpercfg=""
+mode=""
+postmake=""
+premake=""
+project=""
+release=""
+rev=""
+srcdir=""
+target=""
+target_dir=""
+targets=""
tree=""
-forcepull=""
+xarch=""
+xgcctree=""
+xlang=""
trees()
{
@@ -259,23 +261,23 @@ handle_defconfig()
configure_project()
{
- cleanargs=""
- build_depend=""
+ _tcfg="$1/target.cfg"
+
autoconfargs=""
- xgcctree=""
- postmake=""
- makeargs=""
+ badhash=""
+ badtghash=""
+ bootstrapargs=""
+ build_depend=""
buildtype=""
+ cleanargs=""
+ makeargs=""
mkhelper=""
- bootstrapargs=""
+ postmake=""
premake=""
release=""
- xlang=""
xarch=""
- badhash=""
- badtghash=""
-
- _tcfg="$1/target.cfg"
+ xgcctree=""
+ xlang=""
if [ ! -f "$_tcfg" ]; then
buildtype="auto"
@@ -526,12 +528,12 @@ check_gnu_path()
err "Host '$1' unavailable" "check_gnu_path" "$@"
fi
- gccver=""
- gccfull=""
- gnatver=""
- gnatfull=""
gccdir=""
+ gccfull=""
+ gccver=""
gnatdir=""
+ gnatfull=""
+ gnatver=""
if host_gcc_gnat_match "$@"; then
return 0
diff --git a/include/vendor.sh b/include/vendor.sh
index 761f9250..509cea8e 100644
--- a/include/vendor.sh
+++ b/include/vendor.sh
@@ -36,64 +36,65 @@ 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
-_dest=""
+cbdir=""
+cbfstoolref=""
has_hashes=""
-vcfg=""
-mecleaner=""
+hashfile=""
kbc1126_ec_dump=""
-_dl=""
-rom=""
+mecleaner=""
+mfs=""
nuke=""
+rom=""
+vcfg=""
+xromsize=""
+
_7ztest=""
-cbfstoolref=""
+_dest=""
+_dl=""
+_dl_bin=""
_me=""
_metmp=""
-mfs=""
-cbdir=""
-hashfile=""
-_dl_bin=""
_pre_dest=""
-xromsize=""
# lbmk-specific extensions; declared in pkg.cfg files in config/vendor/
-EC_hash=""
DL_hash=""
+DL_url=""
DL_url_bkup=""
-MRC_refcode_gbe=""
+E6400_VGA_bin_hash=""
E6400_VGA_DL_hash=""
E6400_VGA_DL_url=""
E6400_VGA_DL_url_bkup=""
E6400_VGA_offset=""
E6400_VGA_romname=""
-SCH5545EC_DL_url_bkup=""
-SCH5545EC_DL_hash=""
-MRC_refcode_cbtree=""
-SCH5545EC_DL_url=""
+EC_FW1_hash=""
+EC_FW2_hash=""
+EC_hash=""
EC_url=""
-DL_url=""
+EC_url_bkup=""
FSPFD_hash=""
+FSPM_bin_hash=""
+FSPS_bin_hash=""
ME11bootguard=""
ME11delta=""
-ME11version=""
-ME11sku=""
ME11pch=""
-TBFW_url_bkup=""
-TBFW_url=""
-TBFW_hash=""
-TBFW_size=""
-EC_url_bkup=""
-FSPM_bin_hash=""
-FSPS_bin_hash=""
-EC_FW1_hash=""
-EC_FW2_hash=""
+ME11sku=""
+ME11version=""
ME_bin_hash=""
+MEclean=""
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=""
-E6400_VGA_bin_hash=""
+TBFW_hash=""
+TBFW_size=""
+TBFW_url=""
+TBFW_url_bkup=""
XBMKmecleaner=""
-MEclean=""
download()
{
@@ -316,10 +317,11 @@ find_me()
fi
_7ztest="${_7ztest}a"
- _r="-r" # re-locate modules
- _trunc="-t" # -t: truncate the ME size
+
_keep="" # -k: keep fptr modules even if they can be removed
_pass="" # -p: skip fptr check
+ _r="-r" # re-locate modules
+ _trunc="-t" # -t: truncate the ME size
if [ -n "$mfs" ] || [ "$MEclean" = "n" ]; then
_r=""
@@ -327,8 +329,8 @@ find_me()
if [ "$MEclean" = "n" ]; then
_keep="-k"
- _trunc=""
_pass="-p"
+ _trunc=""
fi
if "$mecleaner" $mfs $_r $_keep $_pass $_trunc -O "$xbtmp/a" \