diff options
author | Ramii Ahmed <ramy@ahmedramy.com> | 2022-04-01 14:03:56 +0000 |
---|---|---|
committer | Ramii Ahmed <ramy@ahmedramy.com> | 2022-05-23 17:19:26 +0000 |
commit | 68d8f93c9eaaa90c769fd0426c7cf39c89ba5f4f (patch) | |
tree | 6e2c4cca5184b51efedc3132b7f672744a49a580 | |
parent | dffde4f940ee2e63921435eb838b9cbfe946163f (diff) |
veux: add libinit for variant handling
Change-Id: I89280df82431980c40f415ff2e2862f7fe9eb8a6
-rw-r--r-- | BoardConfig.mk | 4 | ||||
-rw-r--r-- | libinit/Android.bp | 13 | ||||
-rw-r--r-- | libinit/init_xiaomi_veux.cpp | 104 |
3 files changed, 121 insertions, 0 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk index a262b1a..0c1d161 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -15,6 +15,10 @@ BUILD_BROKEN_DUP_RULES := true # Display TARGET_SCREEN_DENSITY := 440 +# Init +TARGET_INIT_VENDOR_LIB := //$(DEVICE_PATH):init_xiaomi_veux +TARGET_RECOVERY_DEVICE_MODULES := init_xiaomi_veux + # OTA assert TARGET_OTA_ASSERT_DEVICE := peux,veux diff --git a/libinit/Android.bp b/libinit/Android.bp new file mode 100644 index 0000000..59a0fa8 --- /dev/null +++ b/libinit/Android.bp @@ -0,0 +1,13 @@ +// +// Copyright (C) 2021 The LineageOS Project +// +// SPDX-License-Identifier: Apache-2.0 +// + +cc_library_static { + name: "init_xiaomi_veux", + srcs: ["init_xiaomi_veux.cpp"], + whole_static_libs: ["//device/xiaomi/sm6375-common:libinit_xiaomi_holi"], + include_dirs: ["system/core/init"], + recovery_available: true, +} diff --git a/libinit/init_xiaomi_veux.cpp b/libinit/init_xiaomi_veux.cpp new file mode 100644 index 0000000..2324f05 --- /dev/null +++ b/libinit/init_xiaomi_veux.cpp @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2021 The LineageOS Project + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include <libinit_dalvik_heap.h> +#include <libinit_variant.h> + +#include "vendor_init.h" + +static const variant_info_t veux_global_info = { + .model_value = "S88006AA1", + .sku_value = "", + + .brand = "Redmi", + .device = "veux", + .marketname = "Redmi Note 11 Pro 5G", + .model = "2201116SG", + .name = "veux_global", + .build_fingerprint = "Redmi/veux_global/veux:11/RKQ1.211001.001/V13.0.10.0.RKCMIXM:user/release-keys", + + .nfc = true, +}; + +static const variant_info_t veux_info = { + .model_value = "S88007AA1", + .sku_value = "", + + .brand = "Redmi", + .device = "veux", + .marketname = "Redmi Note 11E Pro", + .model = "2201116SC", + .name = "veux", + .build_fingerprint = "Redmi/veux/veux:11/RKQ1.211001.001/V13.0.10.0.RKCMIXM:user/release-keys", + + .nfc = true, +}; + +static const variant_info_t peux_in_info = { + .model_value = "S88007EA1", + .sku_value = "", + + .brand = "Redmi", + .device = "peux", + .marketname = "Redmi Note 11 Pro+ 5G", + .model = "2201116SI", + .name = "peux_in", + .build_fingerprint = "Redmi/peux_in/peux:11/RKQ1.211001.001/V13.0.10.0.RKCMIXM:user/release-keys", +}; + +static const variant_info_t veux_jp_info = { + .model_value = "S88008BA1", + .sku_value = "", + + .brand = "Redmi", + .device = "veux", + .marketname = "Redmi Note 11 Pro 5G", + .model = "2201116SR", + .name = "veux_jp", + .build_fingerprint = "Redmi/veux_jp/veux:11/RKQ1.211001.001/V13.0.10.0.RKCMIXM:user/release-keys", + + .nfc = true, +}; + +static const variant_info_t veux_p_global_info = { + .model_value = "S88106BA1", + .sku_value = "", + + .brand = "POCO", + .device = "veux", + .marketname = "POCO X4 Pro 5G", + .model = "2201116PG", + .name = "veux_p_global", + .build_fingerprint = "POCO/veux_p_global/veux:11/RKQ1.211001.001/V13.0.10.0.RKCMIXM:user/release-keys", + + .nfc = true, +}; + +static const variant_info_t peux_p_in_info = { + .model_value = "S88107BA1", + .sku_value = "", + + .brand = "POCO", + .device = "veux", + .marketname = "POCO X4 Pro 5G", + .model = "2201116PI", + .name = "peux_p_in", + .build_fingerprint = "POCO/peux_p_in/peux:11/RKQ1.211001.001/V13.0.10.0.RKCMIXM:user/release-keys", +}; + +static const std::vector<variant_info_t> variants = { + veux_global_info, + veux_info, + peux_in_info, + veux_jp_info, + veux_p_global_info, + peux_p_in_info, +}; + +void vendor_load_properties() { + search_variant(variants); + set_dalvik_heap(); +} |