mirror of
https://github.com/Evolution-X-Devices/device_xiaomi_sm6150-common
synced 2026-01-27 07:38:17 +00:00
sm6150-common: Transform davinci into common tree
* The following things are left in devices, because they're device specific - voip compress properties - HVDCP properties - audio configs - power profile - rounded corner configuration - partition configuration - FOD - camera motor - NFC - board-info - fstab - ipa and graphics firmware - shipping and manifest target level Co-authored-by: Adithya R <gh0strider.2k18.reborn@gmail.com> Co-authored-by: Arian <arian.kulmer@web.de> Change-Id: I8bef29041f8f239361b999fc8ab1a43cc2ebb86b
This commit is contained in:
@@ -8,9 +8,6 @@
|
||||
|
||||
set -e
|
||||
|
||||
DEVICE=davinci
|
||||
VENDOR=xiaomi
|
||||
|
||||
# Load extract_utils and do some sanity checks
|
||||
MY_DIR="${BASH_SOURCE%/*}"
|
||||
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
||||
@@ -27,11 +24,19 @@ source "${HELPER}"
|
||||
# Default to sanitizing the vendor folder before extraction
|
||||
CLEAN_VENDOR=true
|
||||
|
||||
ONLY_COMMON=
|
||||
ONLY_TARGET=
|
||||
KANG=
|
||||
SECTION=
|
||||
|
||||
while [ "${#}" -gt 0 ]; do
|
||||
case "${1}" in
|
||||
--only-common )
|
||||
ONLY_COMMON=true
|
||||
;;
|
||||
--only-target )
|
||||
ONLY_TARGET=true
|
||||
;;
|
||||
-n | --no-cleanup )
|
||||
CLEAN_VENDOR=false
|
||||
;;
|
||||
@@ -58,17 +63,22 @@ function blob_fixup() {
|
||||
system_ext/lib64/libwfdnative.so)
|
||||
"${PATCHELF}" --remove-needed "android.hidl.base@1.0.so" "${2}"
|
||||
;;
|
||||
vendor/lib64/hw/camera.qcom.so)
|
||||
"${PATCHELF}" --remove-needed "libMegviiFacepp-0.5.2.so" "${2}"
|
||||
"${PATCHELF}" --remove-needed "libmegface.so" "${2}"
|
||||
"${PATCHELF}" --add-needed "libshim_megvii.so" "${2}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Initialize the helper
|
||||
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
|
||||
if [ -z "${ONLY_TARGET}" ]; then
|
||||
# Initialize the helper for common device
|
||||
setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}"
|
||||
|
||||
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
|
||||
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
|
||||
fi
|
||||
|
||||
if [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then
|
||||
# Reinitialize the helper for device
|
||||
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}"
|
||||
fi
|
||||
|
||||
"${MY_DIR}/setup-makefiles.sh"
|
||||
|
||||
Reference in New Issue
Block a user