taimen: Allow extracting only firmware images

Change-Id: Icab3f013661304e3a9ec89b0816a8139f6b8e8e5
This commit is contained in:
Bruno Martins
2024-01-17 13:56:08 +00:00
committed by Asriadi Rahim
parent 1634a5144d
commit b44cdfc779

View File

@@ -27,11 +27,15 @@ source "${HELPER}"
# Default to sanitizing the vendor folder before extraction
CLEAN_VENDOR=true
ONLY_FIRMWARE=
KANG=
SECTION=
while [ "${#}" -gt 0 ]; do
case "${1}" in
--only-firmware )
ONLY_FIRMWARE=true
;;
-n | --no-cleanup )
CLEAN_VENDOR=false
;;
@@ -78,8 +82,10 @@ function blob_fixup() {
# Initialize the helper
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
extract "${MY_DIR}/proprietary-files-vendor.txt" "${SRC}" "${KANG}" --section "${SECTION}"
if [ -z "${ONLY_FIRMWARE}" ]; then
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
extract "${MY_DIR}/proprietary-files-vendor.txt" "${SRC}" "${KANG}" --section "${SECTION}"
fi
if [ -z "${SECTION}" ]; then
extract_firmware "${MY_DIR}/proprietary-firmware.txt" "${SRC}"