initial troika tree
authorJan Altensen <info@stricted.net>
Wed, 22 Apr 2020 14:15:44 +0000 (16:15 +0200)
committerJan Altensen <info@stricted.net>
Tue, 17 Nov 2020 13:23:33 +0000 (14:23 +0100)
Change-Id: Ie710294a9c06915fc67d9f27557481356cc1749b

Android.mk [new file with mode: 0644]
AndroidProducts.mk [new file with mode: 0644]
BoardConfig.mk [new file with mode: 0644]
device.mk [new file with mode: 0644]
extract-files.sh [new file with mode: 0755]
lineage.dependencies [new file with mode: 0644]
lineage_troika.mk [new file with mode: 0644]
proprietary-files.txt [new file with mode: 0644]
setup-makefiles.sh [new file with mode: 0755]

diff --git a/Android.mk b/Android.mk
new file mode 100644 (file)
index 0000000..0112ef7
--- /dev/null
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2020 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# WARNING: Everything listed here will be built on ALL platforms,
+# including x86, the emulator, and the SDK.  Modules must be uniquely
+# named (liblights.tuna), and must build everywhere, or limit themselves
+# to only building on ARM if they include assembly. Individual makefiles
+# are responsible for having their own logic, for fine-grained control.
+
+LOCAL_PATH := $(call my-dir)
+
+ifeq ($(TARGET_DEVICE),troika)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
+
+endif
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
new file mode 100644 (file)
index 0000000..9d5e759
--- /dev/null
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2020 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+PRODUCT_MAKEFILES := \
+    $(LOCAL_DIR)/lineage_troika.mk
diff --git a/BoardConfig.mk b/BoardConfig.mk
new file mode 100644 (file)
index 0000000..00baa82
--- /dev/null
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2020 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# inherit from common
+-include device/motorola/exynos9610-common/BoardConfigCommon.mk
+
+DEVICE_PATH := device/motorola/troika
+
+# Assert
+TARGET_OTA_ASSERT_DEVICE := troika,one_action
+
+# Kernel
+TARGET_KERNEL_CONFIG := troika_defconfig
+
+# inherit from the proprietary version
+-include vendor/motorola/troika/BoardConfigVendor.mk
diff --git a/device.mk b/device.mk
new file mode 100644 (file)
index 0000000..6c9f91c
--- /dev/null
+++ b/device.mk
@@ -0,0 +1,20 @@
+#
+# Copyright (C) 2020 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Inherit from common
+$(call inherit-product, device/motorola/exynos9610-common/common.mk)
+
+$(call inherit-product-if-exists, vendor/motorola/troika/troika-vendor.mk)
diff --git a/extract-files.sh b/extract-files.sh
new file mode 100755 (executable)
index 0000000..1a8810d
--- /dev/null
@@ -0,0 +1,68 @@
+#!/bin/bash
+#
+# Copyright (C) 2018-2020 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -e
+
+VENDOR=motorola
+DEVICE=troika
+
+# Load extract_utils and do some sanity checks
+MY_DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
+
+LINEAGE_ROOT="${MY_DIR}"/../../..
+
+HELPER="${LINEAGE_ROOT}/vendor/lineage/build/tools/extract_utils.sh"
+if [ ! -f "${HELPER}" ]; then
+    echo "Unable to find helper script at ${HELPER}"
+    exit 1
+fi
+source "${HELPER}"
+
+SECTION=
+KANG=
+
+while [ "${#}" -gt 0 ]; do
+    case "${1}" in
+        -n | --no-cleanup )
+                CLEAN_VENDOR=false
+                ;;
+        -k | --kang )
+                KANG="--kang"
+                ;;
+        -s | --section )
+                SECTION="${2}"; shift
+                CLEAN_VENDOR=false
+                ;;
+        * )
+                SRC="${1}"
+                ;;
+    esac
+    shift
+done
+
+if [ -z "${SRC}" ]; then
+    SRC="adb"
+fi
+
+# Initialize the helper
+setup_vendor "${DEVICE}" "${VENDOR}" "${LINEAGE_ROOT}" true "${CLEAN_VENDOR}"
+
+extract "${MY_DIR}/proprietary-files.txt" "${SRC}" \
+        "${KANG}" --section "${SECTION}"
+
+"${MY_DIR}/setup-makefiles.sh"
diff --git a/lineage.dependencies b/lineage.dependencies
new file mode 100644 (file)
index 0000000..280ffaa
--- /dev/null
@@ -0,0 +1,6 @@
+[
+    {
+        "repository": "android_device_motorola_exynos9610-common",
+        "target_path": "device/motorola/exynos9610-common"
+    }
+]
diff --git a/lineage_troika.mk b/lineage_troika.mk
new file mode 100644 (file)
index 0000000..53626c2
--- /dev/null
@@ -0,0 +1,42 @@
+#
+# Copyright (C) 2020 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Inherit from those products. Most specific first.
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
+
+# Inherit from troika device
+$(call inherit-product, device/motorola/troika/device.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
+
+# Inherit some common Lineage stuff.
+$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
+
+# Device identifier. This must come after all inclusions
+PRODUCT_DEVICE := troika
+PRODUCT_NAME := lineage_troika
+PRODUCT_BRAND := Motorola
+PRODUCT_MODEL := One Action
+PRODUCT_MANUFACTURER := Motorola
+
+PRODUCT_GMS_CLIENTID_BASE := android-motorola
+
+# Use the latest approved GMS identifiers
+PRODUCT_BUILD_PROP_OVERRIDES += \
+    PRODUCT_NAME=troika_sprout \
+    PRIVATE_BUILD_DESC="10/QSBS30.62-17-7/415cd:user/release-keys"
+
+BUILD_FINGERPRINT := motorola/troika_retail/troika_sprout:10/QSBS30.62-17-7/415cd:user/release-keys
diff --git a/proprietary-files.txt b/proprietary-files.txt
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/setup-makefiles.sh b/setup-makefiles.sh
new file mode 100755 (executable)
index 0000000..2d958ec
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/bash
+#
+# Copyright (C) 2017-2020 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -e
+
+VENDOR=motorola
+DEVICE=troika
+
+export INITIAL_COPYRIGHT_YEAR=2020
+
+# Load extract_utils and do some sanity checks
+MY_DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
+
+LINEAGE_ROOT="${MY_DIR}/../../.."
+
+HELPER="${LINEAGE_ROOT}/vendor/lineage/build/tools/extract_utils.sh"
+if [ ! -f "${HELPER}" ]; then
+    echo "Unable to find helper script at ${HELPER}"
+    exit 1
+fi
+source "${HELPER}"
+
+# Initialize the helper
+setup_vendor "${DEVICE}" "${VENDOR}" "${LINEAGE_ROOT}"
+
+# Copyright headers and guards
+write_headers "troika"
+
+# The standard blobs
+write_makefiles "${MY_DIR}/proprietary-files.txt" true
+
+# Finish
+write_footers