unicorn: Initial device tree

Change-Id: I6d195d295b5f94b71c3ff32b21aa33d3af7bf588
This commit is contained in:
Arian
2023-05-11 17:53:50 +02:00
parent 6ef5e11850
commit e1b378edec
8 changed files with 120 additions and 0 deletions

8
Android.bp Normal file
View File

@@ -0,0 +1,8 @@
//
// Copyright (C) 2022-2024 The LineageOS Project
//
// SPDX-License-Identifier: Apache-2.0
//
soong_namespace {
}

11
Android.mk Normal file
View File

@@ -0,0 +1,11 @@
#
# Copyright (C) 2022-2024 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
LOCAL_PATH := $(call my-dir)
ifeq ($(TARGET_DEVICE),unicorn)
include $(call all-makefiles-under,$(LOCAL_PATH))
endif

13
AndroidProducts.mk Normal file
View File

@@ -0,0 +1,13 @@
#
# Copyright (C) 2022-2024 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/lineage_unicorn.mk
COMMON_LUNCH_CHOICES := \
lineage_unicorn-user \
lineage_unicorn-userdebug \
lineage_unicorn-eng

13
BoardConfig.mk Normal file
View File

@@ -0,0 +1,13 @@
#
# Copyright (C) 2022-2024 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
# Inherit from xiaomi sm8450-common
include device/xiaomi/sm8450-common/BoardConfigCommon.mk
# Inherit from the proprietary version
include vendor/xiaomi/unicorn/BoardConfigVendor.mk
DEVICE_PATH := device/xiaomi/unicorn

15
device.mk Normal file
View File

@@ -0,0 +1,15 @@
#
# Copyright (C) 2022-2024 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
# Inherit from xiaomi sm8450-common
$(call inherit-product, device/xiaomi/sm8450-common/common.mk)
# Inherit from the proprietary version
$(call inherit-product, vendor/xiaomi/unicorn/unicorn-vendor.mk)
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH)

26
extract-files.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
#
# Copyright (C) 2016 The CyanogenMod Project
# Copyright (C) 2017-2020 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
function blob_fixup() {
case "${1}" in
esac
}
# 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=unicorn
export DEVICE_COMMON=sm8450-common
export VENDOR=xiaomi
"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@"

19
lineage_unicorn.mk Normal file
View File

@@ -0,0 +1,19 @@
#
# Copyright (C) 2022-2024 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
# Inherit from unicorn device
$(call inherit-product, device/xiaomi/unicorn/device.mk)
# Inherit from common lineage configuration
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
PRODUCT_NAME := lineage_unicorn
PRODUCT_DEVICE := unicorn
PRODUCT_MANUFACTURER := Xiaomi
PRODUCT_BRAND := Xiaomi
PRODUCT_MODEL := 2206122SC
PRODUCT_GMS_CLIENTID_BASE := android-xiaomi

15
setup-makefiles.sh Normal file
View File

@@ -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=unicorn
export DEVICE_COMMON=sm8450-common
export VENDOR=xiaomi
"./../../${VENDOR}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"