rosemary: Allow extracting only firmware images

Change-Id: Icab3f013661304e3a9ec89b0816a8139f6b8e8e5
This commit is contained in:
Bruno Martins
2024-01-16 22:12:49 +00:00
committed by Matsvei Niaverau
parent 0db5d75294
commit 75c9a0567a

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
;;
@@ -109,7 +113,9 @@ 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}"
if [ -z "${ONLY_FIRMWARE}" ]; then
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
fi
if [ -z "${SECTION}" ]; then
extract_firmware "${MY_DIR}/proprietary-firmware.txt" "${SRC}"