From 6384d7ffbd0f1271d8f69901d7f16de8457864a6 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Thu, 7 Jun 2018 09:55:21 +0100 Subject: [PATCH] polaris: Add initial device tree files Change-Id: Ie2b132330e73d382a4a57970266a633a5ace4739 --- Android.mk | 20 ++++++++++++++++++++ BoardConfig.mk | 19 +++++++++++++++++++ README.md | 26 ++++++++++++++++++++++++++ device.mk | 25 +++++++++++++++++++++++++ extract-files.sh | 16 ++++++++++++++++ lineage.dependencies | 6 ++++++ lineage.mk | 26 ++++++++++++++++++++++++++ setup-makefiles.sh | 16 ++++++++++++++++ 8 files changed, 154 insertions(+) create mode 100644 Android.mk create mode 100644 BoardConfig.mk create mode 100644 README.md create mode 100644 device.mk create mode 100755 extract-files.sh create mode 100644 lineage.dependencies create mode 100644 lineage.mk create mode 100755 setup-makefiles.sh diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..e62d3e8 --- /dev/null +++ b/Android.mk @@ -0,0 +1,20 @@ +# +# Copyright (C) 2018 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),polaris) +include $(call all-makefiles-under,$(LOCAL_PATH)) +endif diff --git a/BoardConfig.mk b/BoardConfig.mk new file mode 100644 index 0000000..e517512 --- /dev/null +++ b/BoardConfig.mk @@ -0,0 +1,19 @@ +# +# Copyright (C) 2018 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Inherit from sdm845-common +-include device/xiaomi/sdm845-common/BoardConfigCommon.mk + +DEVICE_PATH := device/xiaomi/polaris + +# Assert +TARGET_OTA_ASSERT_DEVICE := polaris + +# Kernel +TARGET_KERNEL_CONFIG := polaris_defconfig + +# Inherit from the proprietary version +-include vendor/xiaomi/polaris/BoardConfigVendor.mk diff --git a/README.md b/README.md new file mode 100644 index 0000000..85e7c74 --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +Copyright (C) 2018 The LineageOS Project + +Device configuration for Xiaomi MIX 2S +========================================= + +The Xiaomi MIX 2S (codenamed _"polaris"_) is a high-end smartphone from Xiaomi. + +It was announced in March 2018. Release date was April 2018. + +## Device specifications + +Basic | Spec Sheet +-------:|:------------------------- +SoC | Qualcomm SDM845 Snapdragon 845 +CPU | Octa-core (4x2.8 GHz Kryo 385 Gold & 4x1.8 GHz Kryo 385 Silver) +GPU | Adreno 630 +Memory | 6/8 GB RAM +Shipped Android Version | 8.0 with MIUI 9.5 +Storage | 64/128/256 GB +Battery | Non-removable Li-Ion 3400 mAh battery +Display | 1080 x 2160 pixels, 18:9 ratio, 5.99 inches, IPS LCD (~403 ppi density) +Camera | Dual 12 MP, 4-axis OIS, 2x optical zoom, dual PDAF, dual-LED (dual tone) flash + +## Device picture + +![Xiaomi MIX 2S](https://xiaomi-mi.com/uploads/CatalogueImage/xiaomi-mi-mix-2s-6gb64gb-dual-sim-ceramic-black-01_16852_1522169412.jpg "Xiaomi MIX 2S in ceramic black") diff --git a/device.mk b/device.mk new file mode 100644 index 0000000..bcd3379 --- /dev/null +++ b/device.mk @@ -0,0 +1,25 @@ +# +# Copyright (C) 2018 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +$(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_o.mk) + +# Get non-open-source specific aspects +$(call inherit-product-if-exists, vendor/xiaomi/polaris/polaris-vendor.mk) + +# Boot animation +TARGET_SCREEN_HEIGHT := 2160 +TARGET_SCREEN_WIDTH := 1080 + +# Overlays +DEVICE_PACKAGE_OVERLAYS += \ + $(LOCAL_PATH)/overlay + +# Screen density +PRODUCT_AAPT_CONFIG := normal +PRODUCT_AAPT_PREF_CONFIG := xxhdpi + +# Inherit from sdm845-common +$(call inherit-product, device/xiaomi/sdm845-common/sdm845.mk) diff --git a/extract-files.sh b/extract-files.sh new file mode 100755 index 0000000..62fc613 --- /dev/null +++ b/extract-files.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# +# Copyright (C) 2018 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +set -e + +export DEVICE=polaris +export DEVICE_COMMON=sdm845-common +export VENDOR=xiaomi + +export DEVICE_BRINGUP_YEAR=2018 + +./../../$VENDOR/$DEVICE_COMMON/extract-files.sh $@ diff --git a/lineage.dependencies b/lineage.dependencies new file mode 100644 index 0000000..262bcc3 --- /dev/null +++ b/lineage.dependencies @@ -0,0 +1,6 @@ +[ + { + "repository": "android_device_xiaomi_sdm845-common", + "target_path": "device/xiaomi/sdm845-common" + } +] diff --git a/lineage.mk b/lineage.mk new file mode 100644 index 0000000..71212fa --- /dev/null +++ b/lineage.mk @@ -0,0 +1,26 @@ +# +# Copyright (C) 2018 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +$(call inherit-product, device/xiaomi/polaris/device.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_NAME := lineage_polaris +PRODUCT_DEVICE := polaris +PRODUCT_BRAND := Xiaomi +PRODUCT_MODEL := Mi MIX 2S +PRODUCT_MANUFACTURER := Xiaomi + +BUILD_FINGERPRINT := "Xiaomi/polaris/polaris:8.0.0/OPR1.170623.032/V9.5.19.0.ODGMIFA:user/release-keys" + +PRODUCT_BUILD_PROP_OVERRIDES += \ + PRIVATE_BUILD_DESC="polaris-user 8.0.0 OPR1.170623.032 V9.5.19.0.ODGMIFA release-keys" \ + PRODUCT_NAME="polaris" \ + TARGET_DEVICE="polaris" + +PRODUCT_GMS_CLIENTID_BASE := android-xiaomi diff --git a/setup-makefiles.sh b/setup-makefiles.sh new file mode 100755 index 0000000..0a77e19 --- /dev/null +++ b/setup-makefiles.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# +# Copyright (C) 2018 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +set -e + +export DEVICE=polaris +export DEVICE_COMMON=sdm845-common +export VENDOR=xiaomi + +export DEVICE_BRINGUP_YEAR=2018 + +./../../$VENDOR/$DEVICE_COMMON/setup-makefiles.sh $@