diff options
author | Leah Rowe <leah@libreboot.org> | 2025-05-05 06:00:23 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-05-05 06:04:37 +0100 |
commit | 4cbc950c01fadd09b408de873cbb7a221b64bea9 (patch) | |
tree | a79fb398be2e2c55618497e7918ca8d358c3adf1 /include | |
parent | eb882de94cbe78e575b97ced611a06553f94dbc7 (diff) |
inject.sh: Move FSP extraction only to extract_fsp
Don't do FSP-specific extraction in extract_archive, as
that is not what the latter is for.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/inject.sh | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/include/inject.sh b/include/inject.sh index c6c8c2d2..bdccb881 100644 --- a/include/inject.sh +++ b/include/inject.sh @@ -1,4 +1,4 @@ -# SPDX-License-Identifier: GPL-3.0-only +# SPD-License-Identifier: GPL-3.0-only # Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com> # Copyright (c) 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com> # Copyright (c) 2023-2025 Leah Rowe <leah@libreboot.org> @@ -121,10 +121,10 @@ fetch() x_ mkdir -p "${_dest%/*}" remkdir "$appdir" - extract_archive "$_dl" "$appdir" "$dl_type" || \ + [ "$dl_type" = "fsp" ] || extract_archive "$_dl" "$appdir" || \ [ "$dl_type" = "e6400vga" ] || err "$_dest $dl_type: !extract" - eval "extract_$dl_type" + x_ extract_$dl_type "$_dl" "$appdir" set -u -e e "$_dest" f missing && err "!extract_$dl_type. $dontflash"; : } @@ -191,10 +191,6 @@ extract_intel_me_bruteforce() extract_archive() { - [ $# -gt 2 ] && [ "$3" = "fsp" ] && x_ python \ - "$cbdir/3rdparty/fsp/Tools/SplitFspBin.py" split -f "$1" -o "$2" \ - -n "Fsp.fd" && return 0 - innoextract "$1" -d "$2" || python "$pfs_extract" "$1" -e || 7z x \ "$1" -o"$2" || unar "$1" -o "$2" || unzip "$1" -d "$2" || return 1 @@ -261,7 +257,8 @@ copy_tbfw() extract_fsp() { - x_ cp "$appdir/"Fsp_*.fd "${_dest%/*}" + x_ python "$cbdir/3rdparty/fsp/Tools/SplitFspBin.py" split -f "$1" \ + -o "$2" -n "Fsp.fd" && x_ cp "$appdir/"Fsp_*.fd "${_dest%/*}" } fail_inject() |