summaryrefslogtreecommitdiff
path: root/resources/scripts
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-08-05 20:53:49 +0100
committerLeah Rowe <leah@libreboot.org>2023-08-05 20:53:49 +0100
commitf18b1859dbc9c8dad8911b16f76585189b68a266 (patch)
tree7315a0e23ce3b77388705a68848380ca822febd5 /resources/scripts
parentf0efaf79138512637a4a42ffd45f48401fc445ad (diff)
blobs/download: support more formats on ME extract
ME extraction didn't support unar (RAR format), for regular extraction, after downloading a vendor file. For bruteforce ME extraction, after extracting a vendor archive, unar(RAR) and inno(innoextract) was not supported. This patch fixes both issues. It should be noted that as of now, the unar method has only been tested with certain HP vendor updates, and it's currently not used on any of those. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'resources/scripts')
-rwxr-xr-xresources/scripts/update/blobs/download6
1 files changed, 5 insertions, 1 deletions
diff --git a/resources/scripts/update/blobs/download b/resources/scripts/update/blobs/download
index 6c8457bd..fc197665 100755
--- a/resources/scripts/update/blobs/download
+++ b/resources/scripts/update/blobs/download
@@ -239,6 +239,7 @@ extract_blob_intel_me()
innoextract ${dl_path} -d ${blobdir} \
|| 7z x ${dl_path} -o${appdir} \
+ || unar "${dl_path}" -o "${appdir}" \
|| fail 'Could not extract vendor update'
bruteforce_extract_blob_intel_me "$(pwd)/${_me_destination}" \
@@ -280,7 +281,10 @@ bruteforce_extract_blob_intel_me()
"${me7updateparser}" -O ${_me_destination} "${i}" \
&& break # (we found me.bin)
_7ztest="${_7ztest}a"
- 7z x "${i}" -o${_7ztest} || continue
+ 7z x "${i}" -o${_7ztest} \
+ || innoextract "${i}" -d "${_7ztest}" \
+ || unar "${i}" -o "${_7ztest}" \
+ || continue
bruteforce_extract_blob_intel_me "${_me_destination}" \
"${cdir}/${_7ztest}"
elif [ -d "$i" ]; then