perseus: Add initial device tree files

Change-Id: If89de998ce276d0b136175365065db8793540073
This commit is contained in:
Bruno Martins
2019-01-11 23:15:34 +00:00
commit 6e3f78b5ee
10 changed files with 186 additions and 0 deletions

20
Android.mk Normal file
View File

@@ -0,0 +1,20 @@
#
# Copyright (C) 2019 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),perseus)
include $(call all-makefiles-under,$(LOCAL_PATH))
endif

8
AndroidProducts.mk Normal file
View File

@@ -0,0 +1,8 @@
#
# Copyright (C) 2019 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/lineage_perseus.mk

26
BoardConfig.mk Normal file
View File

@@ -0,0 +1,26 @@
#
# Copyright (C) 2019 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
# Inherit from sdm845-common
-include device/xiaomi/sdm845-common/BoardConfigCommon.mk
DEVICE_PATH := device/xiaomi/perseus
# Assert
TARGET_OTA_ASSERT_DEVICE := perseus
# Kernel
TARGET_KERNEL_CONFIG := perseus_defconfig
# Partitions
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
# Recovery
TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/rootdir/etc/fstab.qcom
# Inherit from the proprietary version
-include vendor/xiaomi/perseus/BoardConfigVendor.mk

22
README.md Normal file
View File

@@ -0,0 +1,22 @@
Copyright (C) 2019 The LineageOS Project
Device configuration for Xiaomi MIX 3
=========================================
The Xiaomi MIX 3 (codenamed _"perseus"_) is a high-end smartphone from Xiaomi.
It was announced in October 2018. Release date was November 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/10 GB RAM
Shipped Android Version | 9 with MIUI 10
Storage | 128/256 GB
Battery | Non-removable Li-Ion 3200 mAh battery
Display | 1080 x 2340 pixels, 18:9 ratio, 6.39 inches, Super AMOLED (~403 ppi density)
Camera | Dual 12 MP, 4-axis OIS, dual PDAF, LED flash

25
device.mk Normal file
View File

@@ -0,0 +1,25 @@
#
# Copyright (C) 2019 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
$(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_p.mk)
# Get non-open-source specific aspects
$(call inherit-product-if-exists, vendor/xiaomi/perseus/perseus-vendor.mk)
# Boot animation
TARGET_SCREEN_HEIGHT := 2340
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)

16
extract-files.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
#
# Copyright (C) 2019 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
set -e
export DEVICE=perseus
export DEVICE_COMMON=sdm845-common
export VENDOR=xiaomi
export DEVICE_BRINGUP_YEAR=2019
./../../$VENDOR/$DEVICE_COMMON/extract-files.sh $@

6
lineage.dependencies Normal file
View File

@@ -0,0 +1,6 @@
[
{
"repository": "android_device_xiaomi_sdm845-common",
"target_path": "device/xiaomi/sdm845-common"
}
]

26
lineage_perseus.mk Normal file
View File

@@ -0,0 +1,26 @@
#
# Copyright (C) 2019 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
$(call inherit-product, device/xiaomi/perseus/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_perseus
PRODUCT_DEVICE := perseus
PRODUCT_BRAND := Xiaomi
PRODUCT_MODEL := Mi MIX 3
PRODUCT_MANUFACTURER := Xiaomi
BUILD_FINGERPRINT := "Xiaomi/perseus/perseus:9/PKQ1.180729.001/V10.2.1.0.PEECNXM:user/release-keys"
PRODUCT_BUILD_PROP_OVERRIDES += \
PRIVATE_BUILD_DESC="perseus-user 9 PKQ1.180729.001 V10.2.1.0.PEECNXM release-keys" \
PRODUCT_NAME="perseus" \
TARGET_DEVICE="perseus"
PRODUCT_GMS_CLIENTID_BASE := android-xiaomi

21
rootdir/etc/fstab.qcom Normal file
View File

@@ -0,0 +1,21 @@
# Android fstab file.
# The filesystem that contains the filesystem e2fsck binary (typically /system) cannot
# specify 'check', and must come before any filesystems that do specify 'check'
# NOTE: /vendor partition is early-mounted and the fstab entry is specified in device tree (duplicated below for recovery image purposes only):
# /proc/device-tree/firmware/android/fstab/vendor
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=0,noauto_da_alloc latemount,wait,check,fileencryption=ice,quota
/dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=0,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait
/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1 wait
/dev/block/bootdevice/by-name/bluetooth /vendor/bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait
/dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1 wait
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
/dev/block/bootdevice/by-name/boot /boot emmc defaults recoveryonly
/dev/block/bootdevice/by-name/recovery /recovery emmc defaults recoveryonly
/dev/block/bootdevice/by-name/system / ext4 ro,barrier=1,discard wait,avb
/dev/block/bootdevice/by-name/vendor /vendor ext4 ro,barrier=1 wait,recoveryonly
/devices/platform/soc/a600000.ssusb/a600000.dwc3/xhci-hcd.0.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto

16
setup-makefiles.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
#
# Copyright (C) 2019 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
set -e
export DEVICE=perseus
export DEVICE_COMMON=sdm845-common
export VENDOR=xiaomi
export DEVICE_BRINGUP_YEAR=2019
./../../$VENDOR/$DEVICE_COMMON/setup-makefiles.sh $@