blob: 7392a10359f5d2c793361c96f84dd34fe493740f [file] [log] [blame]
Michael Bestas411537b2020-12-28 00:58:46 +02001#!/bin/bash
2#
Michael Bestas7830bc12024-08-27 22:51:30 +03003# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
4# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
Michael Bestas411537b2020-12-28 00:58:46 +02005# SPDX-License-Identifier: Apache-2.0
6#
7
8set -e
9
Michael Bestas10374532023-08-29 19:41:38 +030010DEVICE=FP5
merothhfb168c82022-01-02 18:18:04 +053011VENDOR=fairphone
Michael Bestas411537b2020-12-28 00:58:46 +020012
13# Load extract_utils and do some sanity checks
14MY_DIR="${BASH_SOURCE%/*}"
15if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
16
17ANDROID_ROOT="${MY_DIR}/../../.."
18
Aaron Kling6411f242024-08-14 01:44:45 -050019export TARGET_ENABLE_CHECKELF=true
20
Michael Bestas411537b2020-12-28 00:58:46 +020021HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
22if [ ! -f "${HELPER}" ]; then
23 echo "Unable to find helper script at ${HELPER}"
24 exit 1
25fi
26source "${HELPER}"
27
Aaron Kling7f92c8f2023-08-29 15:58:31 -050028function vendor_imports() {
29 cat <<EOF >>"$1"
30 "device/fairphone/FP5",
31 "hardware/qcom-caf/sm8350",
32 "hardware/qcom-caf/wlan",
33 "vendor/qcom/opensource/commonsys/display",
34 "vendor/qcom/opensource/commonsys-intf/display",
35 "vendor/qcom/opensource/dataservices",
36 "vendor/qcom/opensource/display",
37EOF
38}
39
Michael Bestas411537b2020-12-28 00:58:46 +020040# Initialize the helper
41setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}"
42
43# Warning headers and guards
44write_headers
45
46write_makefiles "${MY_DIR}/proprietary-files.txt" true
47
Michael Bestasbfccf732022-02-22 19:22:26 +020048append_firmware_calls_to_makefiles "${MY_DIR}/proprietary-firmware.txt"
49
Michael Bestas411537b2020-12-28 00:58:46 +020050# Finish
51write_footers