3 # Copyright (C) 2016 The CyanogenMod Project
4 # Copyright (C) 2017-2023 The LineageOS Project
6 # SPDX-License-Identifier: Apache-2.0
11 # Load extract_utils and do some sanity checks
12 MY_DIR
="${BASH_SOURCE%/*}"
13 if [[ ! -d "${MY_DIR}" ]]; then MY_DIR
="${PWD}"; fi
15 ANDROID_ROOT
="${MY_DIR}/../../.."
17 HELPER
="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
18 if [ ! -f "${HELPER}" ]; then
19 echo "Unable to find helper script at ${HELPER}"
24 # Initialize the helper for common
25 setup_vendor
"${DEVICE_COMMON}" "${VENDOR_COMMON:-$VENDOR}" "${ANDROID_ROOT}" true
27 # Warning headers and guards
28 write_headers
"kane troika"
30 # The standard common blobs
31 write_makefiles
"${MY_DIR}/proprietary-files.txt" true
32 write_makefiles
"${MY_DIR}/proprietary-files-vendor.txt" true
37 if [ -s "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" ]; then
38 # Reinitialize the helper for device
39 setup_vendor
"${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false
41 # Warning headers and guards
44 # The standard device blobs
45 write_makefiles
"${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-files.txt" true
47 if [ -f "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt" ]; then
48 append_firmware_calls_to_makefiles
"${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt"