From cd95b56ed25da91f2790a4b7cad9c9778d2e1e81 Mon Sep 17 00:00:00 2001 From: Sebastiano Barezzi Date: Wed, 9 Feb 2022 18:58:11 +0100 Subject: [PATCH] grus: Inherit from common tree Change-Id: I220ee1325e07700386f1a436fca0004df3ad193a --- Android.bp | 8 ++++++++ Android.mk | 11 +++++++++++ AndroidProducts.mk | 13 +++++++++++++ BoardConfig.mk | 19 +++++++++++++++++++ device.mk | 26 ++++++++++++++++++++++++++ extract-files.sh | 21 +++++++++++++++++++++ lineage_grus.mk | 28 ++++++++++++++++++++++++++++ setup-makefiles.sh | 15 +++++++++++++++ 8 files changed, 141 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_grus.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..295d4b0 --- /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),grus) +include $(call all-makefiles-under,$(LOCAL_PATH)) +endif diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 0000000..6c54f4e --- /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_grus.mk + +COMMON_LUNCH_CHOICES := \ + lineage_grus-user \ + lineage_grus-userdebug \ + lineage_grus-eng diff --git a/BoardConfig.mk b/BoardConfig.mk new file mode 100644 index 0000000..0114e73 --- /dev/null +++ b/BoardConfig.mk @@ -0,0 +1,19 @@ +# +# Copyright (C) 2022 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Inherit from sdm710-common +include device/xiaomi/sdm710-common/BoardConfigCommon.mk + +DEVICE_PATH := device/xiaomi/grus + +# Display +TARGET_SCREEN_DENSITY := 440 + +# Kernel +TARGET_KERNEL_CONFIG += xiaomi/grus.config + +# Inherit from the proprietary version +include vendor/xiaomi/grus/BoardConfigVendor.mk diff --git a/device.mk b/device.mk new file mode 100644 index 0000000..aaaf03c --- /dev/null +++ b/device.mk @@ -0,0 +1,26 @@ +# +# Copyright (C) 2022 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Inherit from sdm710-common +$(call inherit-product, device/xiaomi/sdm710-common/sdm710.mk) + +# AAPT +PRODUCT_AAPT_CONFIG := normal +PRODUCT_AAPT_PREF_CONFIG := xhdpi + +# Boot animation +TARGET_SCREEN_HEIGHT := 2340 +TARGET_SCREEN_WIDTH := 1080 + +# Shipping API level +PRODUCT_SHIPPING_API_LEVEL := 28 + +# Soong namespaces +PRODUCT_SOONG_NAMESPACES += \ + $(LOCAL_PATH) + +# Inherit from the proprietary version +$(call inherit-product, vendor/xiaomi/grus/grus-vendor.mk) diff --git a/extract-files.sh b/extract-files.sh new file mode 100755 index 0000000..36d49f9 --- /dev/null +++ b/extract-files.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Copyright (C) 2016 The CyanogenMod Project +# Copyright (C) 2017-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 + +export DEVICE=grus +export DEVICE_COMMON=sdm710-common +export VENDOR=xiaomi + +"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@" diff --git a/lineage_grus.mk b/lineage_grus.mk new file mode 100644 index 0000000..54abf27 --- /dev/null +++ b/lineage_grus.mk @@ -0,0 +1,28 @@ +# +# 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 some common Lineage stuff. +$(call inherit-product, vendor/lineage/config/common_full_phone.mk) + +# Inherit from grus device +$(call inherit-product, device/xiaomi/grus/device.mk) + +PRODUCT_NAME := lineage_grus +PRODUCT_DEVICE := grus +PRODUCT_MANUFACTURER := Xiaomi +PRODUCT_BRAND := Xiaomi +PRODUCT_MODEL := Mi 9 SE + +PRODUCT_GMS_CLIENTID_BASE := android-xiaomi + +PRODUCT_BUILD_PROP_OVERRIDES += \ + PRIVATE_BUILD_DESC="grus-user 11 RKQ1.200826.002 V12.5.1.0.RFBMIXM release-keys" + +BUILD_FINGERPRINT := Xiaomi/grus/grus:11/RKQ1.200826.002/V12.5.1.0.RFBMIXM:user/release-keys diff --git a/setup-makefiles.sh b/setup-makefiles.sh new file mode 100755 index 0000000..2a68bf1 --- /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=grus +export DEVICE_COMMON=sdm710-common +export VENDOR=xiaomi + +"./../../${VENDOR}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"