commit 4df7bca08238866e9eca3bcd5c2b982737749630 Author: Alexander Winkowski Date: Thu Aug 13 18:02:57 2020 +0300 miatoll: Initial commit Co-authored-by: Demon000 Change-Id: Ia0d3ae0deb9ac8549065f2ae25d8f28ce9b5dd02 diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..877406e --- /dev/null +++ b/Android.mk @@ -0,0 +1,20 @@ +# +# Copyright (C) 2021 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# This contains the module build definitions for the hardware-specific +# components for this device. +# +# As much as possible, those components should be built unconditionally, +# with device-specific names to avoid collisions, to avoid device-specific +# bitrot and build breakages. Building a component unconditionally does +# *not* include it on all devices, so it is safe even with hardware-specific +# components. + +LOCAL_PATH := $(call my-dir) + +ifeq ($(TARGET_DEVICE),miatoll) +include $(call all-makefiles-under,$(LOCAL_PATH)) +endif diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 0000000..de5c9fb --- /dev/null +++ b/AndroidProducts.mk @@ -0,0 +1,13 @@ +# +# Copyright (C) 2021 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +PRODUCT_MAKEFILES := \ + $(LOCAL_DIR)/lineage_miatoll.mk + +COMMON_LUNCH_CHOICES := \ + lineage_miatoll-user \ + lineage_miatoll-userdebug \ + lineage_miatoll-eng diff --git a/BoardConfig.mk b/BoardConfig.mk new file mode 100644 index 0000000..b8c4a44 --- /dev/null +++ b/BoardConfig.mk @@ -0,0 +1,19 @@ +# +# Copyright (C) 2021 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Inherit from sm6250-common +include device/xiaomi/sm6250-common/BoardConfigCommon.mk + +DEVICE_PATH := device/xiaomi/miatoll + +# Display +TARGET_SCREEN_DENSITY := 440 + +# OTA assert +TARGET_OTA_ASSERT_DEVICE := curtana,excalibur,gram,joyeuse,miatoll + +# Inherit proprietary blobs +include vendor/xiaomi/miatoll/BoardConfigVendor.mk diff --git a/device.mk b/device.mk new file mode 100644 index 0000000..0cf0c48 --- /dev/null +++ b/device.mk @@ -0,0 +1,29 @@ +# +# Copyright (C) 2021 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Overlays +DEVICE_PACKAGE_OVERLAYS += \ + $(LOCAL_PATH)/overlay + +# Device uses high-density artwork where available +PRODUCT_AAPT_CONFIG := normal +PRODUCT_AAPT_PREF_CONFIG := xhdpi + +# Boot animation +TARGET_SCREEN_HEIGHT := 2400 +TARGET_SCREEN_WIDTH := 1080 + +PRODUCT_SHIPPING_API_LEVEL := 29 + +# Soong namespaces +PRODUCT_SOONG_NAMESPACES += \ + $(LOCAL_PATH) + +# Inherit from sm6250-common +$(call inherit-product, device/xiaomi/sm6250-common/atoll.mk) + +# Inherit proprietary targets +$(call inherit-product, vendor/xiaomi/miatoll/miatoll-vendor.mk) diff --git a/extract-files.sh b/extract-files.sh new file mode 100755 index 0000000..77764a0 --- /dev/null +++ b/extract-files.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Copyright (C) 2021 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# 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=miatoll +export DEVICE_COMMON=sm6250-common +export VENDOR=xiaomi + +"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@" diff --git a/lineage.dependencies b/lineage.dependencies new file mode 100644 index 0000000..b58db2e --- /dev/null +++ b/lineage.dependencies @@ -0,0 +1,6 @@ +[ + { + "repository": "android_device_xiaomi_sm6250-common", + "target_path": "device/xiaomi/sm6250-common" + } +] diff --git a/lineage_miatoll.mk b/lineage_miatoll.mk new file mode 100644 index 0000000..b61897d --- /dev/null +++ b/lineage_miatoll.mk @@ -0,0 +1,28 @@ +# +# Copyright (C) 2021 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 some common Lineage stuff. +$(call inherit-product, vendor/lineage/config/common_full_phone.mk) + +# Inherit from miatoll device +$(call inherit-product, device/xiaomi/miatoll/device.mk) + +PRODUCT_NAME := lineage_miatoll +PRODUCT_DEVICE := miatoll +PRODUCT_MANUFACTURER := Xiaomi +PRODUCT_BRAND := Redmi +PRODUCT_MODEL := SM6250 + +PRODUCT_GMS_CLIENTID_BASE := android-xiaomi + +PRODUCT_BUILD_PROP_OVERRIDES += \ + PRIVATE_BUILD_DESC="miatoll-user 11 RKQ1.200826.002 V12.0.4.0.RJWMIXM release-keys" + +BUILD_FINGERPRINT := Redmi/miatoll_global/miatoll:11/RKQ1.200826.002/V12.0.4.0.RJWMIXM:user/release-keys diff --git a/setup-makefiles.sh b/setup-makefiles.sh new file mode 100755 index 0000000..46e4cac --- /dev/null +++ b/setup-makefiles.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# +# Copyright (C) 2021 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +set -e + +export DEVICE=miatoll +export DEVICE_COMMON=sm6250-common +export VENDOR=xiaomi + +"./../../${VENDOR}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"