From b3ee2020ee152e6571d8e1ad576baa29dd0dd32d Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Tue, 5 Dec 2023 15:05:18 +0000 Subject: [PATCH] g12-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 49e8b24..08c7ade 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 ;; @@ -70,7 +74,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 [ -f "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt" ]; then extract_firmware "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt" "${SRC}" -- 2.20.1