From bbce01c4e54b5d98c4df26b2eb461299b9e3f2bd Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Tue, 5 Dec 2023 15:05:18 +0000 Subject: [PATCH] sm8450-common: Allow extracting only firmware images Change-Id: Icab3f013661304e3a9ec89b0816a8139f6b8e8e5 --- extract-files.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/extract-files.sh b/extract-files.sh index 31fcebb..b420ba5 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -25,6 +25,7 @@ source "${HELPER}" CLEAN_VENDOR=true ONLY_COMMON= +ONLY_FIRMWARE= ONLY_TARGET= KANG= SECTION= @@ -34,6 +35,9 @@ while [ "${#}" -gt 0 ]; do --only-common ) ONLY_COMMON=true ;; + --only-firmware ) + ONLY_FIRMWARE=true + ;; --only-target ) ONLY_TARGET=true ;; @@ -72,7 +76,7 @@ function blob_fixup() { esac } -if [ -z "${ONLY_TARGET}" ]; then +if [ -z "${ONLY_FIRMWARE}" ] && [ -z "${ONLY_TARGET}" ]; then # Initialize the helper for common device setup_vendor "${DEVICE_COMMON}" "${VENDOR_COMMON:-$VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}" @@ -84,7 +88,9 @@ if [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../../${VENDOR}/${DEVICE}/propriet source "${MY_DIR}/../../${VENDOR}/${DEVICE}/extract-files.sh" setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}" - extract "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" + if [ -z "${ONLY_FIRMWARE}" ]; then + extract "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}" + fi if [ -z "${SECTION}" ] && [ -f "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt" ]; then extract_firmware "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt" "${SRC}"