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>
btrfsvols
Leah Rowe 2023-08-05 20:53:49 +01:00
parent f0efaf7913
commit f18b1859db
1 changed files with 5 additions and 1 deletions

View File

@ -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