lmi: Add libinit for variants handling
Change-Id: Ia990f08d046192a42c0d951a2ce8d06b8794f6f0
This commit is contained in:
@@ -25,6 +25,10 @@ SOONG_CONFIG_XIAOMI_KONA_FOD_SIZE = 202
|
||||
# HIDL
|
||||
DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/manifest.xml
|
||||
|
||||
# Init
|
||||
TARGET_INIT_VENDOR_LIB := //$(DEVICE_PATH):libinit_lmi
|
||||
TARGET_RECOVERY_DEVICE_MODULES := libinit_lmi
|
||||
|
||||
# Kernel
|
||||
TARGET_KERNEL_CONFIG := vendor/lmi_defconfig
|
||||
|
||||
|
||||
12
libinit/Android.bp
Normal file
12
libinit/Android.bp
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// Copyright (C) 2021 The LineageOS Project
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
cc_library_static {
|
||||
name: "libinit_lmi",
|
||||
defaults: ["//device/xiaomi/sm8250-common:libinit_kona_defaults"],
|
||||
srcs: ["init_lmi.cpp"],
|
||||
whole_static_libs: ["//device/xiaomi/sm8250-common:libinit_kona"],
|
||||
}
|
||||
40
libinit/init_lmi.cpp
Normal file
40
libinit/init_lmi.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (C) 2021 The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <libinit_kona.h>
|
||||
|
||||
static const variant_info_t lmi_info = {
|
||||
.prop_key = "ro.boot.product.hardware.sku",
|
||||
.prop_value = "std",
|
||||
|
||||
.brand = "POCO",
|
||||
.device = "lmi",
|
||||
.marketname = "",
|
||||
.model = "POCO F2 Pro",
|
||||
.build_description = "lmi-user 11 RKQ1.200826.002 V12.2.6.0.RJKMIXM release-keys",
|
||||
.build_fingerprint = "POCO/lmi_global/lmi:11/RKQ1.200826.002/V12.2.6.0.RJKMIXM:user/release-keys",
|
||||
};
|
||||
|
||||
static const variant_info_t lmipro_info = {
|
||||
.prop_key = "ro.boot.product.hardware.sku",
|
||||
.prop_value = "pro",
|
||||
|
||||
.brand = "Redmi",
|
||||
.device = "lmipro",
|
||||
.marketname = "",
|
||||
.model = "Redmi K30 Pro Zoom Edition",
|
||||
.build_description = "lmipro-user 11 RKQ1.200826.002 V12.2.6.0.RJKMIXM release-keys",
|
||||
.build_fingerprint = "Redmi/lmipro/lmipro:11/RKQ1.200826.002/V12.2.6.0.RJKMIXM:user/release-keys",
|
||||
};
|
||||
|
||||
static const std::vector<variant_info_t> variants = {
|
||||
lmi_info,
|
||||
lmipro_info,
|
||||
};
|
||||
|
||||
void vendor_load_properties() {
|
||||
search_variant(variants);
|
||||
}
|
||||
Reference in New Issue
Block a user