sm8350-common: Allow extracting only firmware images

Change-Id: Icab3f013661304e3a9ec89b0816a8139f6b8e8e5
This commit is contained in:
Bruno Martins 2023-12-05 15:05:18 +00:00 committed by Giovanni Ricca
parent d10c89e7a2
commit 5abee74873
No known key found for this signature in database

View File

@ -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
;;
@ -78,7 +82,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}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}"
@ -90,7 +94,9 @@ if [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt
source "${MY_DIR}/../${DEVICE}/extract-files.sh"
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
extract "${MY_DIR}/../${DEVICE}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
if [ -z "${ONLY_FIRMWARE}" ]; then
extract "${MY_DIR}/../${DEVICE}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
fi
if [ -f "${MY_DIR}/../${DEVICE}/proprietary-firmware.txt" ]; then
extract_firmware "${MY_DIR}/../${DEVICE}/proprietary-firmware.txt" "${SRC}"