mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
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>
This commit is contained in:
+9
-8
@@ -3,14 +3,15 @@
|
|||||||
# Copyright (c) 2020-2021,2023-2025 Leah Rowe <leah@libreboot.org>
|
# Copyright (c) 2020-2021,2023-2025 Leah Rowe <leah@libreboot.org>
|
||||||
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
||||||
|
|
||||||
depend=""
|
|
||||||
loc=""
|
|
||||||
url=""
|
url=""
|
||||||
bkup_url=""
|
bkup_url=""
|
||||||
subgit=""
|
|
||||||
subgit_bkup=""
|
depend=""
|
||||||
|
loc=""
|
||||||
subcurl=""
|
subcurl=""
|
||||||
subcurl_bkup=""
|
subcurl_bkup=""
|
||||||
|
subgit=""
|
||||||
|
subgit_bkup=""
|
||||||
subhash=""
|
subhash=""
|
||||||
|
|
||||||
tmpgit="$xbtmp/gitclone"
|
tmpgit="$xbtmp/gitclone"
|
||||||
@@ -102,12 +103,12 @@ fetch_submodule()
|
|||||||
{
|
{
|
||||||
mcfgdir="$mdir/${1##*/}"
|
mcfgdir="$mdir/${1##*/}"
|
||||||
|
|
||||||
subhash=""
|
st=""
|
||||||
subgit=""
|
|
||||||
subgit_bkup=""
|
|
||||||
subcurl=""
|
subcurl=""
|
||||||
subcurl_bkup=""
|
subcurl_bkup=""
|
||||||
st=""
|
subgit=""
|
||||||
|
subgit_bkup=""
|
||||||
|
subhash=""
|
||||||
|
|
||||||
if e "$mcfgdir/module.cfg" f missing; then
|
if e "$mcfgdir/module.cfg" f missing; then
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
+17
-17
@@ -15,27 +15,27 @@ if [ -z "${PATH+x}" ]; then
|
|||||||
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
|
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
board=""
|
sha512sum="util/sbase/sha512sum"
|
||||||
reinstall=""
|
|
||||||
version=""
|
|
||||||
versiondate=""
|
|
||||||
aur_notice=""
|
aur_notice=""
|
||||||
|
basetmp=""
|
||||||
|
board=""
|
||||||
|
checkvarschk=""
|
||||||
|
checkvarsxbmk=""
|
||||||
configdir=""
|
configdir=""
|
||||||
xbmkpath=""
|
|
||||||
datadir=""
|
datadir=""
|
||||||
xbmkpwd=""
|
is_child=""
|
||||||
relname=""
|
|
||||||
xbmkpwd=""
|
|
||||||
xbtmp=""
|
|
||||||
python=""
|
python=""
|
||||||
pyver=""
|
pyver=""
|
||||||
|
reinstall=""
|
||||||
|
relname=""
|
||||||
|
version=""
|
||||||
|
versiondate=""
|
||||||
xbmklock=""
|
xbmklock=""
|
||||||
checkvarsxbmk=""
|
xbmkpath=""
|
||||||
checkvarschk=""
|
xbmkpwd=""
|
||||||
is_child=""
|
xbmkpwd=""
|
||||||
basetmp=""
|
xbtmp=""
|
||||||
|
|
||||||
sha512sum="util/sbase/sha512sum"
|
|
||||||
|
|
||||||
xbmk_init()
|
xbmk_init()
|
||||||
{
|
{
|
||||||
@@ -184,8 +184,8 @@ xbmk_child_set_env()
|
|||||||
xbmk_child_set_tmp()
|
xbmk_child_set_tmp()
|
||||||
{
|
{
|
||||||
badtmp=""
|
badtmp=""
|
||||||
xbtmpchk=""
|
|
||||||
locktmp=""
|
locktmp=""
|
||||||
|
xbtmpchk=""
|
||||||
|
|
||||||
xbtmpchk="`findpath "$TMPDIR" || err "!findpath $TMPDIR"`" || \
|
xbtmpchk="`findpath "$TMPDIR" || err "!findpath $TMPDIR"`" || \
|
||||||
err "!findpath '$TMPDIR'" "xbmk_child_set_tmp" "$@"
|
err "!findpath '$TMPDIR'" "xbmk_child_set_tmp" "$@"
|
||||||
@@ -323,9 +323,9 @@ xbmk_set_version()
|
|||||||
|
|
||||||
xbmk_set_pyver()
|
xbmk_set_pyver()
|
||||||
{
|
{
|
||||||
pyv="import sys; print(sys.version_info[:])"
|
|
||||||
python="python3"
|
python="python3"
|
||||||
pyver="2"
|
pyver="2"
|
||||||
|
pyv="import sys; print(sys.version_info[:])"
|
||||||
|
|
||||||
if ! pybin python3 1>/dev/null; then
|
if ! pybin python3 1>/dev/null; then
|
||||||
python="python"
|
python="python"
|
||||||
|
|||||||
+6
-6
@@ -18,13 +18,13 @@ if [ -n "$checkvarschk" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
archive=""
|
archive=""
|
||||||
|
board=""
|
||||||
boarddir=""
|
boarddir=""
|
||||||
IFD_platform=""
|
IFD_platform=""
|
||||||
ifdprefix=""
|
ifdprefix=""
|
||||||
tree=""
|
|
||||||
new_mac=""
|
new_mac=""
|
||||||
tmpromdir=""
|
tmpromdir=""
|
||||||
board=""
|
tree=""
|
||||||
xchanged=""
|
xchanged=""
|
||||||
|
|
||||||
eval "`setvars "" $checkvars`"
|
eval "`setvars "" $checkvars`"
|
||||||
@@ -37,13 +37,13 @@ inject()
|
|||||||
err "No options specified" "inject" "$@"
|
err "No options specified" "inject" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
nuke=""
|
|
||||||
new_mac=""
|
|
||||||
xchanged=""
|
|
||||||
|
|
||||||
archive="$1";
|
archive="$1";
|
||||||
new_mac="xx:xx:xx:xx:xx:xx"
|
new_mac="xx:xx:xx:xx:xx:xx"
|
||||||
|
|
||||||
|
new_mac=""
|
||||||
|
nuke=""
|
||||||
|
xchanged=""
|
||||||
|
|
||||||
[ $# -gt 1 ] && case "$2" in
|
[ $# -gt 1 ] && case "$2" in
|
||||||
nuke)
|
nuke)
|
||||||
new_mac=""
|
new_mac=""
|
||||||
|
|||||||
+2
-2
@@ -4,10 +4,10 @@
|
|||||||
# Modifications in this version are Copyright 2021,2023-2025 Leah Rowe.
|
# Modifications in this version are Copyright 2021,2023-2025 Leah Rowe.
|
||||||
# Original copyright detailed in repo: https://review.coreboot.org/coreboot/
|
# Original copyright detailed in repo: https://review.coreboot.org/coreboot/
|
||||||
|
|
||||||
|
MRC_board=""
|
||||||
|
MRC_hash=""
|
||||||
MRC_url=""
|
MRC_url=""
|
||||||
MRC_url_bkup=""
|
MRC_url_bkup=""
|
||||||
MRC_hash=""
|
|
||||||
MRC_board=""
|
|
||||||
SHELLBALL=""
|
SHELLBALL=""
|
||||||
|
|
||||||
extract_refcode()
|
extract_refcode()
|
||||||
|
|||||||
+3
-3
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
|
# Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org>
|
||||||
|
|
||||||
reldir=""
|
|
||||||
reldest=""
|
reldest=""
|
||||||
vdir=""
|
reldir=""
|
||||||
rsrc=""
|
|
||||||
relmode=""
|
relmode=""
|
||||||
|
rsrc=""
|
||||||
|
vdir=""
|
||||||
|
|
||||||
release()
|
release()
|
||||||
{
|
{
|
||||||
|
|||||||
+56
-54
@@ -7,48 +7,50 @@
|
|||||||
# flag e.g. ./mk -b <-- mkflag would be "b"
|
# flag e.g. ./mk -b <-- mkflag would be "b"
|
||||||
flag=""
|
flag=""
|
||||||
|
|
||||||
xarch=""
|
# macros, overridden depending on the flag
|
||||||
srcdir=""
|
if_dry_build=":"
|
||||||
premake=""
|
if_not_dry_build=""
|
||||||
gnatdir=""
|
|
||||||
xlang=""
|
autoconfargs=""
|
||||||
mode=""
|
autogenargs=""
|
||||||
makeargs=""
|
badhash=""
|
||||||
elfdir=""
|
badtghash=""
|
||||||
|
bootstrapargs=""
|
||||||
|
build_depend=""
|
||||||
|
buildtype=""
|
||||||
|
cleanargs=""
|
||||||
|
cmakedir=""
|
||||||
cmd=""
|
cmd=""
|
||||||
|
defconfig=""
|
||||||
|
dest_dir=""
|
||||||
|
do_make=""
|
||||||
|
elfdir=""
|
||||||
|
forcepull=""
|
||||||
|
gccdir=""
|
||||||
|
gccfull=""
|
||||||
|
gccver=""
|
||||||
|
gnatdir=""
|
||||||
|
gnatfull=""
|
||||||
|
gnatver=""
|
||||||
|
listfile=""
|
||||||
|
makeargs=""
|
||||||
|
mdir=""
|
||||||
|
mkhelper=""
|
||||||
|
mkhelpercfg=""
|
||||||
|
mode=""
|
||||||
|
postmake=""
|
||||||
|
premake=""
|
||||||
project=""
|
project=""
|
||||||
|
release=""
|
||||||
|
rev=""
|
||||||
|
srcdir=""
|
||||||
target=""
|
target=""
|
||||||
target_dir=""
|
target_dir=""
|
||||||
targets=""
|
targets=""
|
||||||
xgcctree=""
|
|
||||||
release=""
|
|
||||||
bootstrapargs=""
|
|
||||||
mkhelper=""
|
|
||||||
autoconfargs=""
|
|
||||||
listfile=""
|
|
||||||
autogenargs=""
|
|
||||||
buildtype=""
|
|
||||||
rev=""
|
|
||||||
build_depend=""
|
|
||||||
gccdir=""
|
|
||||||
cmakedir=""
|
|
||||||
defconfig=""
|
|
||||||
postmake=""
|
|
||||||
mkhelpercfg=""
|
|
||||||
if_dry_build=":"
|
|
||||||
if_not_dry_build=""
|
|
||||||
dest_dir=""
|
|
||||||
mdir=""
|
|
||||||
cleanargs=""
|
|
||||||
gccver=""
|
|
||||||
gccfull=""
|
|
||||||
gnatver=""
|
|
||||||
gnatfull=""
|
|
||||||
do_make=""
|
|
||||||
badhash=""
|
|
||||||
badtghash=""
|
|
||||||
tree=""
|
tree=""
|
||||||
forcepull=""
|
xarch=""
|
||||||
|
xgcctree=""
|
||||||
|
xlang=""
|
||||||
|
|
||||||
trees()
|
trees()
|
||||||
{
|
{
|
||||||
@@ -259,23 +261,23 @@ handle_defconfig()
|
|||||||
|
|
||||||
configure_project()
|
configure_project()
|
||||||
{
|
{
|
||||||
cleanargs=""
|
_tcfg="$1/target.cfg"
|
||||||
build_depend=""
|
|
||||||
autoconfargs=""
|
autoconfargs=""
|
||||||
xgcctree=""
|
|
||||||
postmake=""
|
|
||||||
makeargs=""
|
|
||||||
buildtype=""
|
|
||||||
mkhelper=""
|
|
||||||
bootstrapargs=""
|
|
||||||
premake=""
|
|
||||||
release=""
|
|
||||||
xlang=""
|
|
||||||
xarch=""
|
|
||||||
badhash=""
|
badhash=""
|
||||||
badtghash=""
|
badtghash=""
|
||||||
|
bootstrapargs=""
|
||||||
_tcfg="$1/target.cfg"
|
build_depend=""
|
||||||
|
buildtype=""
|
||||||
|
cleanargs=""
|
||||||
|
makeargs=""
|
||||||
|
mkhelper=""
|
||||||
|
postmake=""
|
||||||
|
premake=""
|
||||||
|
release=""
|
||||||
|
xarch=""
|
||||||
|
xgcctree=""
|
||||||
|
xlang=""
|
||||||
|
|
||||||
if [ ! -f "$_tcfg" ]; then
|
if [ ! -f "$_tcfg" ]; then
|
||||||
buildtype="auto"
|
buildtype="auto"
|
||||||
@@ -526,12 +528,12 @@ check_gnu_path()
|
|||||||
err "Host '$1' unavailable" "check_gnu_path" "$@"
|
err "Host '$1' unavailable" "check_gnu_path" "$@"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
gccver=""
|
|
||||||
gccfull=""
|
|
||||||
gnatver=""
|
|
||||||
gnatfull=""
|
|
||||||
gccdir=""
|
gccdir=""
|
||||||
|
gccfull=""
|
||||||
|
gccver=""
|
||||||
gnatdir=""
|
gnatdir=""
|
||||||
|
gnatfull=""
|
||||||
|
gnatver=""
|
||||||
|
|
||||||
if host_gcc_gnat_match "$@"; then
|
if host_gcc_gnat_match "$@"; then
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
+43
-41
@@ -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"
|
CONFIG_FSP_FD_PATH CONFIG_IFD_BIN_PATH CONFIG_MRC_FILE CONFIG_FSP_M_CBFS"
|
||||||
|
|
||||||
# lbmk-specific extensions; general variables
|
# lbmk-specific extensions; general variables
|
||||||
_dest=""
|
|
||||||
has_hashes=""
|
|
||||||
vcfg=""
|
|
||||||
mecleaner=""
|
|
||||||
kbc1126_ec_dump=""
|
|
||||||
_dl=""
|
|
||||||
rom=""
|
|
||||||
nuke=""
|
|
||||||
_7ztest=""
|
|
||||||
cbfstoolref=""
|
|
||||||
_me=""
|
|
||||||
_metmp=""
|
|
||||||
mfs=""
|
|
||||||
cbdir=""
|
cbdir=""
|
||||||
|
cbfstoolref=""
|
||||||
|
has_hashes=""
|
||||||
hashfile=""
|
hashfile=""
|
||||||
_dl_bin=""
|
kbc1126_ec_dump=""
|
||||||
_pre_dest=""
|
mecleaner=""
|
||||||
|
mfs=""
|
||||||
|
nuke=""
|
||||||
|
rom=""
|
||||||
|
vcfg=""
|
||||||
xromsize=""
|
xromsize=""
|
||||||
|
|
||||||
|
_7ztest=""
|
||||||
|
_dest=""
|
||||||
|
_dl=""
|
||||||
|
_dl_bin=""
|
||||||
|
_me=""
|
||||||
|
_metmp=""
|
||||||
|
_pre_dest=""
|
||||||
|
|
||||||
# lbmk-specific extensions; declared in pkg.cfg files in config/vendor/
|
# lbmk-specific extensions; declared in pkg.cfg files in config/vendor/
|
||||||
EC_hash=""
|
|
||||||
DL_hash=""
|
DL_hash=""
|
||||||
|
DL_url=""
|
||||||
DL_url_bkup=""
|
DL_url_bkup=""
|
||||||
MRC_refcode_gbe=""
|
E6400_VGA_bin_hash=""
|
||||||
E6400_VGA_DL_hash=""
|
E6400_VGA_DL_hash=""
|
||||||
E6400_VGA_DL_url=""
|
E6400_VGA_DL_url=""
|
||||||
E6400_VGA_DL_url_bkup=""
|
E6400_VGA_DL_url_bkup=""
|
||||||
E6400_VGA_offset=""
|
E6400_VGA_offset=""
|
||||||
E6400_VGA_romname=""
|
E6400_VGA_romname=""
|
||||||
SCH5545EC_DL_url_bkup=""
|
|
||||||
SCH5545EC_DL_hash=""
|
|
||||||
MRC_refcode_cbtree=""
|
|
||||||
SCH5545EC_DL_url=""
|
|
||||||
EC_url=""
|
|
||||||
DL_url=""
|
|
||||||
FSPFD_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_FW1_hash=""
|
||||||
EC_FW2_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=""
|
ME_bin_hash=""
|
||||||
|
MEclean=""
|
||||||
MRC_bin_hash=""
|
MRC_bin_hash=""
|
||||||
|
MRC_refcode_cbtree=""
|
||||||
|
MRC_refcode_gbe=""
|
||||||
REF_bin_hash=""
|
REF_bin_hash=""
|
||||||
SCH5545EC_bin_hash=""
|
SCH5545EC_bin_hash=""
|
||||||
|
SCH5545EC_DL_hash=""
|
||||||
|
SCH5545EC_DL_url=""
|
||||||
|
SCH5545EC_DL_url_bkup=""
|
||||||
TBFW_bin_hash=""
|
TBFW_bin_hash=""
|
||||||
E6400_VGA_bin_hash=""
|
TBFW_hash=""
|
||||||
|
TBFW_size=""
|
||||||
|
TBFW_url=""
|
||||||
|
TBFW_url_bkup=""
|
||||||
XBMKmecleaner=""
|
XBMKmecleaner=""
|
||||||
MEclean=""
|
|
||||||
|
|
||||||
download()
|
download()
|
||||||
{
|
{
|
||||||
@@ -316,10 +317,11 @@ find_me()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
_7ztest="${_7ztest}a"
|
_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
|
_keep="" # -k: keep fptr modules even if they can be removed
|
||||||
_pass="" # -p: skip fptr check
|
_pass="" # -p: skip fptr check
|
||||||
|
_r="-r" # re-locate modules
|
||||||
|
_trunc="-t" # -t: truncate the ME size
|
||||||
|
|
||||||
if [ -n "$mfs" ] || [ "$MEclean" = "n" ]; then
|
if [ -n "$mfs" ] || [ "$MEclean" = "n" ]; then
|
||||||
_r=""
|
_r=""
|
||||||
@@ -327,8 +329,8 @@ find_me()
|
|||||||
|
|
||||||
if [ "$MEclean" = "n" ]; then
|
if [ "$MEclean" = "n" ]; then
|
||||||
_keep="-k"
|
_keep="-k"
|
||||||
_trunc=""
|
|
||||||
_pass="-p"
|
_pass="-p"
|
||||||
|
_trunc=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if "$mecleaner" $mfs $_r $_keep $_pass $_trunc -O "$xbtmp/a" \
|
if "$mecleaner" $mfs $_r $_keep $_pass $_trunc -O "$xbtmp/a" \
|
||||||
|
|||||||
Reference in New Issue
Block a user