mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-09-20 05:30:25 +02:00
more build system cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+17
-33
@@ -57,9 +57,8 @@ download()
|
|||||||
export PATH="$PATH:/sbin"
|
export PATH="$PATH:/sbin"
|
||||||
board="$1"
|
board="$1"
|
||||||
|
|
||||||
if check_target; then
|
check_target || return 0
|
||||||
readkconfig download
|
readkconfig download
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getfiles()
|
getfiles()
|
||||||
@@ -251,22 +250,19 @@ find_me()
|
|||||||
|
|
||||||
_7ztest="${_7ztest}a"
|
_7ztest="${_7ztest}a"
|
||||||
|
|
||||||
_keep="" # -k: keep fptr modules even if they can be removed
|
|
||||||
_pass="" # -p: skip fptr check
|
|
||||||
_r="-r" # re-locate modules
|
_r="-r" # re-locate modules
|
||||||
_trunc="-t" # -t: truncate the ME size
|
_trunc="-t" # -t: truncate the ME size
|
||||||
|
eval "`newvar _keep _pass`" # -k (keep fptr modules), -p (skip checks)
|
||||||
|
|
||||||
[ "$ME11bootguard" = "y" ] && \
|
[ "$ME11bootguard" = "y" ] && \
|
||||||
mfs="--whitelist MFS"
|
mfs="--whitelist MFS"
|
||||||
if [ "$MEclean" = "n" ]; then
|
if [ "$MEclean" = "n" ]; then
|
||||||
MEshrink="n"
|
MEshrink="n"
|
||||||
|
|
||||||
_keep="-k" # keep ME modules, don't delete anything
|
_keep="-k" # keep ME modules, don't delete anything
|
||||||
mfs="" # no MFS whitelist needed, due to -r:
|
mfs="" # no MFS whitelist needed, due to -r:
|
||||||
fi
|
fi
|
||||||
if [ "$MEclean" = "n" ] || [ "$MEshrink" != "y" ]; then
|
if [ "$MEclean" = "n" ] || [ "$MEshrink" != "y" ]; then
|
||||||
_r="" # don't re-locate ME modules
|
eval "`newvar _r _trunc`"
|
||||||
_trunc="" # don't shrink the me.bin file size
|
|
||||||
fi
|
fi
|
||||||
[ "$MEcheck" = "n" ] && \
|
[ "$MEcheck" = "n" ] && \
|
||||||
_pass="-p" # skip fptr check
|
_pass="-p" # skip fptr check
|
||||||
@@ -304,19 +300,12 @@ apply_deguard_hack()
|
|||||||
|
|
||||||
extract_archive()
|
extract_archive()
|
||||||
{
|
{
|
||||||
if innoextract "$1" -d "$2"; then
|
innoextract "$1" -d "$2" || \
|
||||||
:
|
python "$pfs_extract" "$1" -e || \
|
||||||
elif python "$pfs_extract" "$1" -e; then
|
7z x "$1" -o"$2" || \
|
||||||
:
|
"$bsdtar" -C "$2" -xf "$1" || \
|
||||||
elif 7z x "$1" -o"$2"; then
|
"$bsdunzip" "$1" -d "$2" || \
|
||||||
:
|
|
||||||
elif "$bsdtar" -C "$2" -xf "$1"; then
|
|
||||||
:
|
|
||||||
elif "$bsdunzip" "$1" -d "$2"; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
|
||||||
|
|
||||||
[ -d "${_dl}_extracted" ] && \
|
[ -d "${_dl}_extracted" ] && \
|
||||||
x_ cp -R "${_dl}_extracted" "$2"; :
|
x_ cp -R "${_dl}_extracted" "$2"; :
|
||||||
@@ -338,24 +327,17 @@ extract_kbc1126ec_dump()
|
|||||||
{
|
{
|
||||||
x_ cd "$appdir/"
|
x_ cd "$appdir/"
|
||||||
|
|
||||||
if mv Rompaq/68*.BIN ec.bin; then
|
mv Rompaq/68*.BIN ec.bin || \
|
||||||
:
|
unar -D ROM.CAB Rom.bin || \
|
||||||
elif unar -D ROM.CAB Rom.bin; then
|
unar -D Rom.CAB Rom.bin || \
|
||||||
:
|
unar -D 68*.CAB Rom.bin || \
|
||||||
elif unar -D Rom.CAB Rom.bin; then
|
|
||||||
:
|
|
||||||
elif unar -D 68*.CAB Rom.bin; then
|
|
||||||
:
|
|
||||||
else
|
|
||||||
err "!kbc1126 unar" "extract_kbc1126ec" "$@"
|
err "!kbc1126 unar" "extract_kbc1126ec" "$@"
|
||||||
fi
|
|
||||||
|
|
||||||
[ ! -f "ec.bin" ] && \
|
[ ! -f "ec.bin" ] && \
|
||||||
x_ mv Rom.bin ec.bin
|
x_ mv Rom.bin ec.bin
|
||||||
|
|
||||||
if x_ e ec.bin f; then
|
x_ e ec.bin f
|
||||||
x_ "$kbc1126_ec_dump" ec.bin
|
x_ "$kbc1126_ec_dump" ec.bin
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extract_e6400vga()
|
extract_e6400vga()
|
||||||
@@ -376,6 +358,8 @@ extract_e6400vga()
|
|||||||
) || err "can't extract e6400 vga rom" "extract_e6400vga" "$@"
|
) || err "can't extract e6400 vga rom" "extract_e6400vga" "$@"
|
||||||
|
|
||||||
x_ cp "$appdir/$E6400_VGA_romname" "$_pre_dest"
|
x_ cp "$appdir/$E6400_VGA_romname" "$_pre_dest"
|
||||||
|
|
||||||
|
set -u -e
|
||||||
}
|
}
|
||||||
|
|
||||||
extract_sch5545ec()
|
extract_sch5545ec()
|
||||||
|
|||||||
Reference in New Issue
Block a user