From bcbe0364096d9d7880c3ef2a11f0ea68df106686 Mon Sep 17 00:00:00 2001 From: Giovanni Ricca Date: Fri, 16 Sep 2022 17:39:23 +0200 Subject: [PATCH] lisa: Inherit from sm8350-common Change-Id: I9d866d2b9144b08212573fa8a0810d9f29e2e7a6 --- Android.bp | 5 +++++ Android.mk | 13 +++++++++++++ AndroidProducts.mk | 13 +++++++++++++ BoardConfig.mk | 13 +++++++++++++ README.md | 26 ++++++++++++++++++++++++++ device.mk | 15 +++++++++++++++ extract-files.sh | 21 +++++++++++++++++++++ lineage_lisa.mk | 29 +++++++++++++++++++++++++++++ setup-makefiles.sh | 15 +++++++++++++++ 9 files changed, 150 insertions(+) create mode 100644 Android.bp create mode 100644 Android.mk create mode 100644 AndroidProducts.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_lisa.mk create mode 100755 setup-makefiles.sh diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..548f4a6 --- /dev/null +++ b/Android.bp @@ -0,0 +1,5 @@ +soong_namespace { + imports: [ + "device/xiaomi/sm8350-common", + ], +} diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..db05c0e --- /dev/null +++ b/Android.mk @@ -0,0 +1,13 @@ +# +# Copyright (C) 2022 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +LOCAL_PATH := $(call my-dir) + +ifeq ($(TARGET_DEVICE),lisa) + +include $(call all-makefiles-under,$(LOCAL_PATH)) + +endif diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 0000000..f703d7d --- /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_lisa.mk + +COMMON_LUNCH_CHOICES := \ + lineage_lisa-user \ + lineage_lisa-userdebug \ + lineage_lisa-eng diff --git a/BoardConfig.mk b/BoardConfig.mk new file mode 100644 index 0000000..e24259d --- /dev/null +++ b/BoardConfig.mk @@ -0,0 +1,13 @@ +# +# Copyright (C) 2022 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +DEVICE_PATH := device/xiaomi/lisa + +# Inherit from sm8350-common +include device/xiaomi/sm8350-common/BoardConfigCommon.mk + +# Include proprietary files +include vendor/xiaomi/lisa/BoardConfigVendor.mk diff --git a/README.md b/README.md new file mode 100644 index 0000000..5e06351 --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +Copyright (C) 2022 The LineageOS Project + +Device configuration for Xiaomi 11 Lite 5G NE +========================================= + +The Xiaomi 11 Lite 5G NE (codenamed _"lisa"_) is a mid-range smartphone from Xiaomi. + +It was released in September 2021. + +## Device specifications + +Basic | Spec Sheet +-------:|:------------------------- +CPU | Kryo 670, Up to 2.4 GHz, Octa-core CPU +Chipset | Qualcomm Snapdragon 778G 5G (SM7325-2-AB) +GPU | Adreno 642L +Memory | 6/8 GB, LPDDR4X +Storage | 128/256 GB, UFS 2.2 +Shipped Android Version | 11 +Battery | Non-removable 4250 mAh +Display | 2400 x 1080 pixels, 6.55 inches +Camera | 64 MP main, 8 MP ultra-wide angle, 5 MP telemacro, 20 MP front + +## Device picture + +![Xiaomi 11 Lite 5G NE](https://i01.appmifile.com/webfile/globalimg/products/pc/xiaomi-11-lite-5g-ne/specs_01-fix.png "Xiaomi 11 Lite 5G NE") diff --git a/device.mk b/device.mk new file mode 100644 index 0000000..5e47bbe --- /dev/null +++ b/device.mk @@ -0,0 +1,15 @@ +# +# Copyright (C) 2022 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Inherit from sm8350-common +$(call inherit-product, device/xiaomi/sm8350-common/common.mk) + +# Soong namespaces +PRODUCT_SOONG_NAMESPACES += \ + $(LOCAL_PATH) + +# Call the proprietary setup +$(call inherit-product, vendor/xiaomi/lisa/lisa-vendor.mk) diff --git a/extract-files.sh b/extract-files.sh new file mode 100755 index 0000000..83461a5 --- /dev/null +++ b/extract-files.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Copyright (C) 2020 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 + +# Required! +export DEVICE=lisa +export DEVICE_COMMON=sm8350-common +export VENDOR=xiaomi + +"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@" diff --git a/lineage_lisa.mk b/lineage_lisa.mk new file mode 100644 index 0000000..6ec4fad --- /dev/null +++ b/lineage_lisa.mk @@ -0,0 +1,29 @@ +# +# 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 lisa device +$(call inherit-product, device/xiaomi/lisa/device.mk) + +# Inherit some common Lineage stuff. +$(call inherit-product, vendor/lineage/config/common_full_phone.mk) + +PRODUCT_BRAND := Xiaomi +PRODUCT_DEVICE := lisa +PRODUCT_MANUFACTURER := Xiaomi +PRODUCT_MODEL := 2109119DG +PRODUCT_NAME := lineage_lisa + +PRODUCT_GMS_CLIENTID_BASE := android-xiaomi + +PRODUCT_BUILD_PROP_OVERRIDES += \ + PRIVATE_BUILD_DESC="lisa_global-user 12 SKQ1.211006.001 V13.0.6.0.SKOMIXM release-keys" + +# Set BUILD_FINGERPRINT variable to be picked up by both system and vendor build.prop +BUILD_FINGERPRINT := Xiaomi/lisa_global/lisa:12/SKQ1.211006.001/V13.0.6.0.SKOMIXM:user/release-keys diff --git a/setup-makefiles.sh b/setup-makefiles.sh new file mode 100755 index 0000000..c3af1f7 --- /dev/null +++ b/setup-makefiles.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# Copyright (C) 2020 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +set -e + +# Required! +export DEVICE=lisa +export DEVICE_COMMON=sm8350-common +export VENDOR=xiaomi + +"./../../${VENDOR}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"