sm7325-common: Sync extract scripts with templates
Change-Id: I98a36854c5a0c0390592911bb2558b34eff77efc
This commit is contained in:
parent
0f492139bb
commit
0e3807a51b
@ -2,7 +2,6 @@
|
|||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
||||||
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
|
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -14,7 +13,9 @@ if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
|||||||
|
|
||||||
ANDROID_ROOT="${MY_DIR}/../../.."
|
ANDROID_ROOT="${MY_DIR}/../../.."
|
||||||
|
|
||||||
export TARGET_ENABLE_CHECKELF=true
|
# If XML files don't have comments before the XML header, use this flag
|
||||||
|
# Can still be used with broken XML files by using blob_fixup
|
||||||
|
export TARGET_DISABLE_XML_FIXING=true
|
||||||
|
|
||||||
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
|
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
|
||||||
if [ ! -f "${HELPER}" ]; then
|
if [ ! -f "${HELPER}" ]; then
|
||||||
@ -34,29 +35,29 @@ SECTION=
|
|||||||
|
|
||||||
while [ "${#}" -gt 0 ]; do
|
while [ "${#}" -gt 0 ]; do
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
--only-common )
|
--only-common)
|
||||||
ONLY_COMMON=true
|
ONLY_COMMON=true
|
||||||
;;
|
;;
|
||||||
--only-firmware )
|
--only-firmware)
|
||||||
ONLY_FIRMWARE=true
|
ONLY_FIRMWARE=true
|
||||||
;;
|
;;
|
||||||
--only-target )
|
--only-target)
|
||||||
ONLY_TARGET=true
|
ONLY_TARGET=true
|
||||||
;;
|
;;
|
||||||
-n | --no-cleanup )
|
-n | --no-cleanup)
|
||||||
CLEAN_VENDOR=false
|
CLEAN_VENDOR=false
|
||||||
;;
|
;;
|
||||||
-k | --kang )
|
-k | --kang)
|
||||||
KANG="--kang"
|
KANG="--kang"
|
||||||
;;
|
;;
|
||||||
-s | --section )
|
-s | --section)
|
||||||
SECTION="${2}"
|
SECTION="${2}"
|
||||||
shift
|
shift
|
||||||
CLEAN_VENDOR=false
|
CLEAN_VENDOR=false
|
||||||
;;
|
;;
|
||||||
* )
|
*)
|
||||||
SRC="${1}"
|
SRC="${1}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
@ -81,6 +82,7 @@ function blob_fixup() {
|
|||||||
sed -i "s#/system/#/system_ext/#" "${2}"
|
sed -i "s#/system/#/system_ext/#" "${2}"
|
||||||
;;
|
;;
|
||||||
system_ext/priv-app/ims/ims.apk)
|
system_ext/priv-app/ims/ims.apk)
|
||||||
|
[ "$2" = "" ] && return 0
|
||||||
apktool_patch "${2}" "$MY_DIR/ims-patches"
|
apktool_patch "${2}" "$MY_DIR/ims-patches"
|
||||||
;;
|
;;
|
||||||
vendor/etc/vintf/manifest/vendor.dolby.media.c2@1.0-service.xml)
|
vendor/etc/vintf/manifest/vendor.dolby.media.c2@1.0-service.xml)
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
||||||
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
|
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -14,8 +13,6 @@ if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
|||||||
|
|
||||||
ANDROID_ROOT="${MY_DIR}/../../.."
|
ANDROID_ROOT="${MY_DIR}/../../.."
|
||||||
|
|
||||||
export TARGET_ENABLE_CHECKELF=true
|
|
||||||
|
|
||||||
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
|
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
|
||||||
if [ ! -f "${HELPER}" ]; then
|
if [ ! -f "${HELPER}" ]; then
|
||||||
echo "Unable to find helper script at ${HELPER}"
|
echo "Unable to find helper script at ${HELPER}"
|
||||||
@ -75,14 +72,13 @@ write_footers
|
|||||||
|
|
||||||
if [ -s "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" ]; then
|
if [ -s "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" ]; then
|
||||||
# Reinitialize the helper for device
|
# Reinitialize the helper for device
|
||||||
source "${MY_DIR}/../../${VENDOR}/${DEVICE}/setup-makefiles.sh"
|
|
||||||
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false
|
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false
|
||||||
|
|
||||||
# Warning headers and guards
|
# Warning headers and guards
|
||||||
write_headers
|
write_headers
|
||||||
|
|
||||||
# The standard device blobs
|
# The standard device blobs
|
||||||
write_makefiles "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt"
|
write_makefiles "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" true
|
||||||
|
|
||||||
if [ -f "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt" ]; then
|
if [ -f "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt" ]; then
|
||||||
append_firmware_calls_to_makefiles "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt"
|
append_firmware_calls_to_makefiles "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user