2017-12-31 16:43:59 +01:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
2021-02-08 12:55:55 +01:00
|
|
|
# Copyright (C) 2017-2021 The LineageOS Project
|
2017-12-31 16:43:59 +01:00
|
|
|
#
|
2021-02-08 12:55:55 +01:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2017-12-31 16:43:59 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2021-02-08 12:55:55 +01:00
|
|
|
if [ -z "${BOARD_COMMON}" ]; then
|
|
|
|
echo ""
|
|
|
|
echo "error: This is a script in a common tree. Please execute" $(basename $0) "from a device tree."
|
|
|
|
echo ""
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Override anything that may come from the calling environment
|
|
|
|
BOARD=msm8974
|
|
|
|
DEVICE_COMMON="${BOARD_COMMON}"
|
2017-12-31 16:43:59 +01:00
|
|
|
|
|
|
|
# Load extract_utils and do some sanity checks
|
|
|
|
MY_DIR="${BASH_SOURCE%/*}"
|
2021-02-08 12:55:55 +01:00
|
|
|
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
2017-12-31 16:43:59 +01:00
|
|
|
|
2021-02-08 12:55:55 +01:00
|
|
|
ANDROID_ROOT="${MY_DIR}/../../.."
|
2017-12-31 16:43:59 +01:00
|
|
|
|
2021-02-08 12:55:55 +01:00
|
|
|
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
|
|
|
|
if [ ! -f "${HELPER}" ]; then
|
|
|
|
echo "Unable to find helper script at ${HELPER}"
|
2017-12-31 16:43:59 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
2021-02-08 12:55:55 +01:00
|
|
|
source "${HELPER}"
|
2017-12-31 16:43:59 +01:00
|
|
|
|
2021-02-08 12:55:55 +01:00
|
|
|
# Initialize the helper for common
|
|
|
|
setup_vendor "${BOARD_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true
|
2017-12-31 16:43:59 +01:00
|
|
|
|
2021-02-08 12:55:55 +01:00
|
|
|
# Warning headers and guards
|
|
|
|
write_headers "${BOARD}" "TARGET_BOARD_PLATFORM"
|
2017-12-31 16:43:59 +01:00
|
|
|
|
2021-02-08 12:55:55 +01:00
|
|
|
# The standard common blobs
|
|
|
|
write_makefiles "${MY_DIR}/common-proprietary-files.txt" true
|
2017-12-31 16:43:59 +01:00
|
|
|
|
2021-02-08 12:55:55 +01:00
|
|
|
# Finish
|
2017-12-31 16:43:59 +01:00
|
|
|
write_footers
|