raphael: Initial libinit for regional variants
Change-Id: Ica795909dfda11fe63bf386551e2e76a8386c1f3
This commit is contained in:
@@ -9,9 +9,16 @@ include device/xiaomi/sm8150-common/BoardConfigCommon.mk
|
||||
|
||||
DEVICE_PATH := device/xiaomi/raphael
|
||||
|
||||
# Assert
|
||||
TARGET_OTA_ASSERT_DEVICE := raphael,raphaelin
|
||||
|
||||
# Display
|
||||
TARGET_SCREEN_DENSITY := 440
|
||||
|
||||
# Init
|
||||
TARGET_INIT_VENDOR_LIB := //$(DEVICE_PATH):init_xiaomi_raphael
|
||||
TARGET_RECOVERY_DEVICE_MODULES := init_xiaomi_raphael
|
||||
|
||||
# Kernel
|
||||
TARGET_KERNEL_CONFIG := vendor/raphael_defconfig
|
||||
|
||||
|
||||
13
libinit/Android.bp
Normal file
13
libinit/Android.bp
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// Copyright (C) 2021-2022 The LineageOS Project
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
cc_library_static {
|
||||
name: "init_xiaomi_raphael",
|
||||
srcs: ["init_xiaomi_raphael.cpp"],
|
||||
whole_static_libs: ["//device/xiaomi/sm8150-common:libinit_xiaomi_msmnile"],
|
||||
include_dirs: ["system/core/init"],
|
||||
recovery_available: true,
|
||||
}
|
||||
62
libinit/init_xiaomi_raphael.cpp
Normal file
62
libinit/init_xiaomi_raphael.cpp
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 The LineageOS Project
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <libinit_dalvik_heap.h>
|
||||
#include <libinit_variant.h>
|
||||
|
||||
#include "vendor_init.h"
|
||||
|
||||
#define FINGERPRINT "Xiaomi/raphael/raphael:11/RKQ1.200826.002/V12.5.2.0.RFKMIXM:user/release-keys"
|
||||
|
||||
static const variant_info_t raphael_global_info = {
|
||||
.hwc_value = "GLOBAL",
|
||||
.sku_value = "",
|
||||
|
||||
.brand = "Xiaomi",
|
||||
.device = "raphael",
|
||||
.marketname = "",
|
||||
.model = "Mi 9T Pro",
|
||||
.build_fingerprint = FINGERPRINT,
|
||||
|
||||
.nfc = true,
|
||||
};
|
||||
|
||||
static const variant_info_t raphaelin_info = {
|
||||
.hwc_value = "INDIA",
|
||||
.sku_value = "",
|
||||
|
||||
.brand = "Xiaomi",
|
||||
.device = "raphaelin",
|
||||
.marketname = "",
|
||||
.model = "Redmi K20 Pro",
|
||||
.build_fingerprint = FINGERPRINT,
|
||||
|
||||
.nfc = false,
|
||||
};
|
||||
|
||||
static const variant_info_t raphael_info = {
|
||||
.hwc_value = "",
|
||||
.sku_value = "",
|
||||
|
||||
.brand = "Xiaomi",
|
||||
.device = "raphael",
|
||||
.marketname = "",
|
||||
.model = "Redmi K20 Pro",
|
||||
.build_fingerprint = FINGERPRINT,
|
||||
|
||||
.nfc = true,
|
||||
};
|
||||
|
||||
static const std::vector<variant_info_t> variants = {
|
||||
raphael_global_info,
|
||||
raphaelin_info,
|
||||
raphael_info,
|
||||
};
|
||||
|
||||
void vendor_load_properties() {
|
||||
set_dalvik_heap();
|
||||
search_variant(variants);
|
||||
}
|
||||
Reference in New Issue
Block a user