From 918fa12d9617454cdec6db0d2c792d98d3253325 Mon Sep 17 00:00:00 2001 From: Arian Date: Sun, 3 Apr 2022 18:42:06 +0200 Subject: [PATCH] cupid: Initial device tree Change-Id: Id01117ad481165bb7a87cf3d2b43c7d9a5fa6d45 --- Android.bp | 8 ++++++++ Android.mk | 11 +++++++++++ AndroidProducts.mk | 13 +++++++++++++ BoardConfig.mk | 13 +++++++++++++ device.mk | 15 +++++++++++++++ extract-files.sh | 26 ++++++++++++++++++++++++++ lineage_cupid.mk | 23 +++++++++++++++++++++++ setup-makefiles.sh | 15 +++++++++++++++ 8 files changed, 124 insertions(+) create mode 100644 Android.bp create mode 100644 Android.mk create mode 100644 AndroidProducts.mk create mode 100644 BoardConfig.mk create mode 100644 device.mk create mode 100755 extract-files.sh create mode 100644 lineage_cupid.mk create mode 100755 setup-makefiles.sh diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..bb6ecd0 --- /dev/null +++ b/Android.bp @@ -0,0 +1,8 @@ +// +// Copyright (C) 2022 The LineageOS Project +// +// SPDX-License-Identifier: Apache-2.0 +// + +soong_namespace { +} diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..2b71ea7 --- /dev/null +++ b/Android.mk @@ -0,0 +1,11 @@ +# +# Copyright (C) 2022 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +LOCAL_PATH := $(call my-dir) + +ifeq ($(TARGET_DEVICE),cupid) +include $(call all-makefiles-under,$(LOCAL_PATH)) +endif diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 0000000..b248f16 --- /dev/null +++ b/AndroidProducts.mk @@ -0,0 +1,13 @@ +# +# Copyright (C) 2022 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +PRODUCT_MAKEFILES := \ + $(LOCAL_DIR)/lineage_cupid.mk + +COMMON_LUNCH_CHOICES := \ + lineage_cupid-user \ + lineage_cupid-userdebug \ + lineage_cupid-eng diff --git a/BoardConfig.mk b/BoardConfig.mk new file mode 100644 index 0000000..335fb57 --- /dev/null +++ b/BoardConfig.mk @@ -0,0 +1,13 @@ +# +# Copyright (C) 2022 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Inherit from xiaomi sm8450-common +include device/xiaomi/sm8450-common/BoardConfigCommon.mk + +# Inherit from the proprietary version +include vendor/xiaomi/cupid/BoardConfigVendor.mk + +DEVICE_PATH := device/xiaomi/cupid diff --git a/device.mk b/device.mk new file mode 100644 index 0000000..a624f78 --- /dev/null +++ b/device.mk @@ -0,0 +1,15 @@ +# +# Copyright (C) 2022 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Inherit from xiaomi sm8450-common +$(call inherit-product, device/xiaomi/sm8450-common/common.mk) + +# Inherit from the proprietary version +$(call inherit-product, vendor/xiaomi/cupid/cupid-vendor.mk) + +# Soong namespaces +PRODUCT_SOONG_NAMESPACES += \ + $(LOCAL_PATH) diff --git a/extract-files.sh b/extract-files.sh new file mode 100755 index 0000000..6ca874a --- /dev/null +++ b/extract-files.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# +# Copyright (C) 2016 The CyanogenMod Project +# Copyright (C) 2017-2020 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +function blob_fixup() { + case "${1}" in + esac +} + +# If we're being sourced by the common script that we called, +# stop right here. No need to go down the rabbit hole. +if [ "${BASH_SOURCE[0]}" != "${0}" ]; then + return +fi + +set -e + +export DEVICE=cupid +export DEVICE_COMMON=sm8450-common +export VENDOR=xiaomi + +"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@" diff --git a/lineage_cupid.mk b/lineage_cupid.mk new file mode 100644 index 0000000..300562a --- /dev/null +++ b/lineage_cupid.mk @@ -0,0 +1,23 @@ +# +# Copyright (C) 2022 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# 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_telephony.mk) + +# Inherit from cupid device +$(call inherit-product, device/xiaomi/cupid/device.mk) + +# Inherit from common lineage configuration +$(call inherit-product, vendor/lineage/config/common_full_phone.mk) + +PRODUCT_NAME := lineage_cupid +PRODUCT_DEVICE := cupid +PRODUCT_MANUFACTURER := Xiaomi +PRODUCT_BRAND := Xiaomi +PRODUCT_MODEL := 2201123G + +PRODUCT_GMS_CLIENTID_BASE := android-xiaomi diff --git a/setup-makefiles.sh b/setup-makefiles.sh new file mode 100755 index 0000000..cd6a2cf --- /dev/null +++ b/setup-makefiles.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# Copyright (C) 2016 The CyanogenMod Project +# Copyright (C) 2017-2020 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +set -e + +export DEVICE=cupid +export DEVICE_COMMON=sm8450-common +export VENDOR=xiaomi + +"./../../${VENDOR}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"