sm8350-common: remove miatoll specific hacks

This commit is contained in:
Cosmin Tanislav 2021-08-29 17:02:56 +03:00
parent d478fd5202
commit 6973392b5b
5 changed files with 0 additions and 155 deletions

View File

@ -108,10 +108,6 @@ BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
DEVICE_MANIFEST_FILE := $(COMMON_PATH)/manifest.xml
DEVICE_MATRIX_FILE := $(COMMON_PATH)/compatibility_matrix.xml
# Init
TARGET_INIT_VENDOR_LIB := //$(COMMON_PATH):libinit_xiaomi_sm8350
TARGET_RECOVERY_DEVICE_MODULES := libinit_xiaomi_sm8350
# Media
TARGET_USES_ION := true
TARGET_DISABLED_UBWC := true

View File

@ -1,44 +0,0 @@
//
// Copyright (C) 2020 The LineageOS Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
cc_library_static {
name: "libinit_xiaomi_sm8350_common",
recovery_available: true,
srcs: [
"init_common.cpp"
],
include_dirs: [
"system/core/base/include",
"system/core/init"
],
export_include_dirs: [
"include"
],
shared_libs: [
"libbase",
]
}
cc_library_static {
name: "libinit_xiaomi_sm8350",
recovery_available: true,
srcs: [
"init.cpp"
],
whole_static_libs: [
"libinit_xiaomi_sm8350_common"
]
}

View File

@ -1,7 +0,0 @@
#ifndef __INIT_COMMON__H__
#define __INIT_COMMON__H__
void load_common_properties();
void property_override(char const prop[], char const value[], bool add = true);
#endif

View File

@ -1,22 +0,0 @@
/*
* Copyright (C) 2020 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "init_common.h"
#include "vendor_init.h"
void vendor_load_properties() {
load_common_properties();
}

View File

@ -1,78 +0,0 @@
/*
* Copyright (C) 2020 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <cstring>
#include <sys/sysinfo.h>
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
#include <sys/_system_properties.h>
#include "init_common.h"
#include "property_service.h"
void property_override(char const prop[], char const value[], bool add)
{
auto pi = (prop_info *) __system_property_find(prop);
if (pi != nullptr) {
__system_property_update(pi, value, strlen(value));
} else if (add) {
__system_property_add(prop, strlen(prop), value, strlen(value));
}
}
void load_dalvik_properties() {
char const *heapstartsize;
char const *heapgrowthlimit;
char const *heapsize;
char const *heapminfree;
char const *heapmaxfree;
char const *heaptargetutilization;
struct sysinfo sys;
sysinfo(&sys);
if (sys.totalram >= 5ull * 1024 * 1024 * 1024) {
// from - phone-xhdpi-6144-dalvik-heap.mk
heapstartsize = "16m";
heapgrowthlimit = "256m";
heapsize = "512m";
heaptargetutilization = "0.5";
heapminfree = "8m";
heapmaxfree = "32m";
} else if (sys.totalram >= 3ull * 1024 * 1024 * 1024) {
// from - phone-xhdpi-4096-dalvik-heap.mk
heapstartsize = "8m";
heapgrowthlimit = "192m";
heapsize = "512m";
heaptargetutilization = "0.6";
heapminfree = "8m";
heapmaxfree = "16m";
} else {
return;
}
property_override("dalvik.vm.heapstartsize", heapstartsize);
property_override("dalvik.vm.heapgrowthlimit", heapgrowthlimit);
property_override("dalvik.vm.heapsize", heapsize);
property_override("dalvik.vm.heaptargetutilization", heaptargetutilization);
property_override("dalvik.vm.heapminfree", heapminfree);
property_override("dalvik.vm.heapmaxfree", heapmaxfree);
}
void load_common_properties() {
load_dalvik_properties();
}