2019-05-14 00:36:02 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
#
|
2024-08-28 10:36:32 +03:00
|
|
|
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
|
|
|
|
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
|
2019-05-14 00:36:02 -07:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
DEVICE=redfin
|
|
|
|
|
VENDOR=google
|
|
|
|
|
|
|
|
|
|
# Load extract_utils and do some sanity checks
|
|
|
|
|
MY_DIR="${BASH_SOURCE%/*}"
|
|
|
|
|
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
|
|
|
|
|
|
|
|
|
ANDROID_ROOT="${MY_DIR}/../../.."
|
|
|
|
|
|
2024-08-14 01:44:45 -05:00
|
|
|
export TARGET_ENABLE_CHECKELF=true
|
|
|
|
|
|
2019-05-14 00:36:02 -07:00
|
|
|
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
|
|
|
|
|
if [ ! -f "${HELPER}" ]; then
|
|
|
|
|
echo "Unable to find helper script at ${HELPER}"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
source "${HELPER}"
|
|
|
|
|
|
2023-08-29 15:58:31 -05:00
|
|
|
function vendor_imports() {
|
|
|
|
|
cat <<EOF >>"$1"
|
|
|
|
|
"device/google/redfin",
|
|
|
|
|
"hardware/google/interfaces",
|
|
|
|
|
"hardware/google/pixel",
|
|
|
|
|
"hardware/qcom/sm7250/display",
|
|
|
|
|
"hardware/qcom/sm7250/gps",
|
|
|
|
|
"hardware/qcom/wlan/legacy",
|
|
|
|
|
"vendor/qcom/opensource/display"
|
|
|
|
|
EOF
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-14 00:36:02 -07:00
|
|
|
# Initialize the helper
|
|
|
|
|
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}"
|
|
|
|
|
|
|
|
|
|
# Warning headers and guards
|
|
|
|
|
write_headers
|
|
|
|
|
|
|
|
|
|
write_makefiles "${MY_DIR}/proprietary-files.txt" true
|
|
|
|
|
write_makefiles "${MY_DIR}/proprietary-files-carriersettings.txt" true
|
|
|
|
|
write_makefiles "${MY_DIR}/proprietary-files-vendor.txt" true
|
|
|
|
|
|
2023-11-30 20:44:20 +02:00
|
|
|
append_firmware_calls_to_makefiles "${MY_DIR}/proprietary-firmware.txt"
|
|
|
|
|
|
2019-05-14 00:36:02 -07:00
|
|
|
# Finish
|
|
|
|
|
write_footers
|