blob: b04e553b18808e745eed49288c9ea72c7f093e6b [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
28# Initialize the helper
29setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}"
30
31# Warning headers and guards
32write_headers
33
34write_makefiles "${MY_DIR}/proprietary-files.txt" true
35
Michael Bestasbfccf732022-02-22 19:22:26 +020036append_firmware_calls_to_makefiles "${MY_DIR}/proprietary-firmware.txt"
37
Michael Bestas411537b2020-12-28 00:58:46 +020038# Finish
39write_footers