summaryrefslogtreecommitdiff
path: root/rootdir
diff options
context:
space:
mode:
Diffstat (limited to 'rootdir')
-rw-r--r--rootdir/Android.mk30
-rw-r--r--rootdir/etc/init.class_main.sh (renamed from rootdir/bin/init.class_main.sh)19
-rw-r--r--rootdir/etc/init.msm.usb.configfs.rc186
-rw-r--r--rootdir/etc/init.qcom.early_boot.sh466
-rw-r--r--rootdir/etc/init.qcom.post_boot.sh (renamed from rootdir/bin/init.qcom.post_boot.sh)1385
-rw-r--r--rootdir/etc/init.qcom.rc309
-rw-r--r--rootdir/etc/init.qcom.sensors.sh (renamed from rootdir/bin/init.qcom.sensors.sh)0
-rw-r--r--rootdir/etc/init.qcom.sh (renamed from rootdir/bin/init.qcom.sh)42
-rw-r--r--rootdir/etc/init.qcom.usb.rc10
-rw-r--r--rootdir/etc/init.qcom.usb.sh (renamed from rootdir/bin/init.qcom.usb.sh)33
-rw-r--r--rootdir/etc/init.recovery.qcom.rc60
-rw-r--r--[-rwxr-xr-x]rootdir/etc/init.target.rc82
-rw-r--r--rootdir/etc/ueventd.qcom.rc56
13 files changed, 2051 insertions, 627 deletions
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index ddffd59..499275d 100644
--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -4,18 +4,18 @@ include $(CLEAR_VARS)
# files that live under device/qcom/common/rootdir/etc/
include $(CLEAR_VARS)
-LOCAL_MODULE := init.qcom.post_boot.sh
+LOCAL_MODULE := init.qcom.early_boot.sh
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
-LOCAL_SRC_FILES := bin/init.qcom.post_boot.sh
+LOCAL_SRC_FILES := etc/init.qcom.early_boot.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
-LOCAL_MODULE := init.qcom.sensors.sh
+LOCAL_MODULE := init.qcom.post_boot.sh
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
-LOCAL_SRC_FILES := bin/init.qcom.sensors.sh
+LOCAL_SRC_FILES := etc/init.qcom.post_boot.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
include $(BUILD_PREBUILT)
@@ -28,10 +28,18 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
+LOCAL_MODULE := init.recovery.qcom.rc
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/init.recovery.qcom.rc
+LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.sh
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
-LOCAL_SRC_FILES := bin/init.qcom.sh
+LOCAL_SRC_FILES := etc/init.qcom.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
include $(BUILD_PREBUILT)
@@ -39,7 +47,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := init.class_main.sh
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
-LOCAL_SRC_FILES := bin/init.class_main.sh
+LOCAL_SRC_FILES := etc/init.class_main.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
include $(BUILD_PREBUILT)
@@ -63,7 +71,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.usb.sh
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
-LOCAL_SRC_FILES := bin/init.qcom.usb.sh
+LOCAL_SRC_FILES := etc/init.qcom.usb.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
include $(BUILD_PREBUILT)
@@ -77,6 +85,14 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.sensors.sh
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/init.qcom.sensors.sh
+LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
LOCAL_MODULE := init.target.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
diff --git a/rootdir/bin/init.class_main.sh b/rootdir/etc/init.class_main.sh
index cee656e..35e72ef 100644
--- a/rootdir/bin/init.class_main.sh
+++ b/rootdir/etc/init.class_main.sh
@@ -1,6 +1,6 @@
#! /vendor/bin/sh
-# Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
+# Copyright (c) 2013-2014, 2019 The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -41,17 +41,6 @@ case "$baseband" in
stop ril-daemon
stop vendor.ril-daemon
stop vendor.qcrild
- start vendor.ipacm
-esac
-
-case "$baseband" in
- "sa8")
- start vendor.ipacm
-esac
-
-case "$baseband" in
- "msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3")
- start vendor.qmuxd
esac
case "$baseband" in
@@ -106,8 +95,6 @@ case "$baseband" in
start vendor.ril-daemon
fi
- start vendor.ipacm-diag
- start vendor.ipacm
case "$baseband" in
"svlte2a" | "csfb")
start qmiproxy
@@ -143,16 +130,12 @@ case "$baseband" in
"tethered")
start vendor.dataqti
start vendor.dataadpl
- start vendor.port-bridge
;;
"concurrent")
start vendor.dataqti
start vendor.dataadpl
- start vendor.netmgrd
- start vendor.port-bridge
;;
*)
- start vendor.netmgrd
;;
esac
esac
diff --git a/rootdir/etc/init.msm.usb.configfs.rc b/rootdir/etc/init.msm.usb.configfs.rc
index 2936a14..4b49ccd 100644
--- a/rootdir/etc/init.msm.usb.configfs.rc
+++ b/rootdir/etc/init.msm.usb.configfs.rc
@@ -205,24 +205,12 @@ on property:sys.usb.config=rndis,none && property:sys.usb.configfs=1
on property:sys.usb.config=rndis,sec && property:sys.usb.configfs=1
write /config/usb_gadget/g2/configs/b.1/strings/0x409/configuration "rndis"
rm /config/usb_gadget/g2/configs/b.1/f1
- rm /config/usb_gadget/g2/configs/b.1/f2
write /config/usb_gadget/g2/idVendor 0x05C6
write /config/usb_gadget/g2/idProduct 0xF00E
symlink /config/usb_gadget/g2/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g2/configs/b.1/f1
write /config/usb_gadget/g2/UDC ${persist.vendor.usb.controller.secondary}
setprop sys.usb.state rndis
-on property:sys.usb.config=rndis,rmnet,sec && property:sys.usb.configfs=1
- write /config/usb_gadget/g2/configs/b.1/strings/0x409/configuration "rndis_rmnet"
- rm /config/usb_gadget/g2/configs/b.1/f1
- rm /config/usb_gadget/g2/configs/b.1/f2
- write /config/usb_gadget/g2/idVendor 0x05C6
- write /config/usb_gadget/g2/idProduct 0x90F1
- symlink /config/usb_gadget/g2/functions/rndis.rndis /config/usb_gadget/g2/configs/b.1/f1
- symlink /config/usb_gadget/g2/functions/${vendor.usb.rmnet.func.name}.rmnet /config/usb_gadget/g2/configs/b.1/f2
- write /config/usb_gadget/g2/UDC ${persist.vendor.usb.controller.secondary}
- setprop sys.usb.state rndis
-
on property:sys.usb.config=rndis,adb
setprop sys.usb.config rndis,${persist.vendor.usb.config.extra},adb
@@ -422,9 +410,9 @@ on property:sys.usb.config=diag,qdss && property:sys.usb.configfs=1
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x05C6
write /config/usb_gadget/g1/idProduct 0x904A
- write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ write /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name}/enable_debug_inface 1
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
- symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name} /config/usb_gadget/g1/configs/b.1/f2
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@@ -444,9 +432,9 @@ on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,qdss,adb && prop
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x05C6
write /config/usb_gadget/g1/idProduct 0x9060
- write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ write /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name}/enable_debug_inface 1
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
- symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name} /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@@ -464,9 +452,9 @@ on property:sys.usb.config=diag,qdss,rmnet && property:sys.usb.configfs=1
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x05C6
write /config/usb_gadget/g1/idProduct 0x9083
- write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ write /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name}/enable_debug_inface 1
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
- symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name} /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@@ -487,9 +475,9 @@ on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,qdss,rmnet,adb &
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x05C6
write /config/usb_gadget/g1/idProduct 0x9084
- write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ write /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name}/enable_debug_inface 1
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
- symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name} /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f4
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
@@ -508,10 +496,10 @@ on property:sys.usb.config=rndis,diag,qdss && property:sys.usb.configfs=1
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x05C6
write /config/usb_gadget/g1/idProduct 0x9081
- write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ write /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name}/enable_debug_inface 1
symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
- symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name} /config/usb_gadget/g1/configs/b.1/f3
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@@ -531,10 +519,10 @@ on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,qdss,adb &
rm /config/usb_gadget/g1/configs/b.1/f9
write /config/usb_gadget/g1/idVendor 0x05C6
write /config/usb_gadget/g1/idProduct 0x9082
- write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1
+ write /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name}/enable_debug_inface 1
symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
- symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name} /config/usb_gadget/g1/configs/b.1/f3
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@@ -944,7 +932,7 @@ on property:sys.usb.config=diag,serial_cdev,rmnet,dpl,qdss && property:sys.usb.c
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4
- symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name} /config/usb_gadget/g1/configs/b.1/f5
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@@ -968,7 +956,7 @@ on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmne
symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2
symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3
symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4
- symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/qdss.${vendor.usb.qdss.inst.name} /config/usb_gadget/g1/configs/b.1/f5
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f6
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
@@ -1217,6 +1205,152 @@ on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,adb &&
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
setprop sys.usb.state ${sys.usb.config}
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,diag_mdm2,qdss,qdss_mdm,serial_cdev,dpl,rmnet && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_diag_mdm2_qdss_qdss_mdm_dun_dpl_rmnet"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90F6
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm2 /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f8
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,diag_mdm2,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,diag_mdm2,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_diag_mdm2_qdss_qdss_mdm_dun_dpl_rmnet_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90F7
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm2 /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f8
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,diag_mdm,diag_mdm2,qdss,qdss_mdm,serial_cdev,dpl && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_diag_mdm_diag_mdm2_qdss_qdss_mdm_dun_dpl"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90F8
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm2 /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f7
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f8
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis
+
+on property:sys.usb.config=rndis,diag,diag_mdm,diag_mdm2,qdss,qdss_mdm,serial_cdev,dpl,adb && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,diag_mdm,diag_mdm2,qdss,qdss_mdm,serial_cdev,dpl,adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_diag_mdm_diag_mdm2_qdss_qdss_mdm_dun_dpl_adb"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x90F9
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm2 /config/usb_gadget/g1/configs/b.1/f4
+ symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f5
+ symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f6
+ symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f7
+ symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f8
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state rndis,adb
+
+on property:sys.usb.config=diag,diag_mdm,ccid && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_ccid"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9045
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f3
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=diag,diag_mdm,adb,ccid && property:sys.usb.configfs=1
+ start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,adb,ccid && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_adb_ccid"
+ rm /config/usb_gadget/g1/configs/b.1/f1
+ rm /config/usb_gadget/g1/configs/b.1/f2
+ rm /config/usb_gadget/g1/configs/b.1/f3
+ rm /config/usb_gadget/g1/configs/b.1/f4
+ rm /config/usb_gadget/g1/configs/b.1/f5
+ rm /config/usb_gadget/g1/configs/b.1/f6
+ rm /config/usb_gadget/g1/configs/b.1/f7
+ rm /config/usb_gadget/g1/configs/b.1/f8
+ rm /config/usb_gadget/g1/configs/b.1/f9
+ write /config/usb_gadget/g1/idVendor 0x05C6
+ write /config/usb_gadget/g1/idProduct 0x9044
+ symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1
+ symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
+ symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f4
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
on property:sys.usb.config=adb && property:sys.usb.configfs=1
write /config/usb_gadget/g1/idVendor 0x18d1
write /config/usb_gadget/g1/idProduct 0x4ee7
diff --git a/rootdir/etc/init.qcom.early_boot.sh b/rootdir/etc/init.qcom.early_boot.sh
new file mode 100644
index 0000000..5224b06
--- /dev/null
+++ b/rootdir/etc/init.qcom.early_boot.sh
@@ -0,0 +1,466 @@
+#! /vendor/bin/sh
+
+# Copyright (c) 2012-2013,2016,2018,2019 The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+export PATH=/vendor/bin
+
+# Set platform variables
+if [ -f /sys/devices/soc0/hw_platform ]; then
+ soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null
+else
+ soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null
+fi
+if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null
+else
+ soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null
+fi
+if [ -f /sys/devices/soc0/platform_version ]; then
+ soc_hwver=`cat /sys/devices/soc0/platform_version` 2> /dev/null
+else
+ soc_hwver=`cat /sys/devices/system/soc/soc0/platform_version` 2> /dev/null
+fi
+
+if [ -f /sys/class/drm/card0-DSI-1/modes ]; then
+ echo "detect" > /sys/class/drm/card0-DSI-1/status
+ mode_file=/sys/class/drm/card0-DSI-1/modes
+ while read line; do
+ fb_width=${line%%x*};
+ break;
+ done < $mode_file
+elif [ -f /sys/class/graphics/fb0/virtual_size ]; then
+ res=`cat /sys/class/graphics/fb0/virtual_size` 2> /dev/null
+ fb_width=${res%,*}
+fi
+
+log -t BOOT -p i "MSM target '$1', SoC '$soc_hwplatform', HwID '$soc_hwid', SoC ver '$soc_hwver'"
+
+#For drm based display driver
+vbfile=/sys/module/drm/parameters/vblankoffdelay
+if [ -w $vbfile ]; then
+ echo -1 > $vbfile
+else
+ log -t DRM_BOOT -p w "file: '$vbfile' or perms doesn't exist"
+fi
+
+function set_density_by_fb() {
+ #put default density based on width
+ if [ -z $fb_width ]; then
+ setprop vendor.display.lcd_density 320
+ else
+ if [ $fb_width -ge 1600 ]; then
+ setprop vendor.display.lcd_density 640
+ elif [ $fb_width -ge 1440 ]; then
+ setprop vendor.display.lcd_density 560
+ elif [ $fb_width -ge 1080 ]; then
+ setprop vendor.display.lcd_density 480
+ elif [ $fb_width -ge 720 ]; then
+ setprop vendor.display.lcd_density 320 #for 720X1280 resolution
+ elif [ $fb_width -ge 480 ]; then
+ setprop vendor.display.lcd_density 240 #for 480X854 QRD resolution
+ else
+ setprop vendor.display.lcd_density 160
+ fi
+ fi
+}
+
+target=`getprop ro.board.platform`
+case "$target" in
+ "msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
+ case "$soc_hwplatform" in
+ "FFA" | "SVLTE_FFA")
+ # linking to surf_keypad_qwerty.kcm.bin instead of surf_keypad_numeric.kcm.bin so that
+ # the UI keyboard works fine.
+ ln -s /system/usr/keychars/surf_keypad_qwerty.kcm.bin /system/usr/keychars/surf_keypad.kcm.bin
+ ;;
+ "Fluid")
+ setprop vendor.display.lcd_density 240
+ setprop qcom.bt.dev_power_class 2
+ ;;
+ *)
+ ln -s /system/usr/keychars/surf_keypad_qwerty.kcm.bin /system/usr/keychars/surf_keypad.kcm.bin
+ ;;
+ esac
+ ;;
+ "sm6150")
+ case "$soc_hwplatform" in
+ "ADP")
+ setprop vendor.display.lcd_density 160
+ ;;
+ esac
+ case "$soc_hwid" in
+ 365|366)
+ sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc1/sku_version` 2> /dev/null
+ setprop vendor.media.target.version 1
+ if [ $sku_ver -eq 1 ]; then
+ setprop vendor.media.target.version 2
+ fi
+ ;;
+ 355|369|377|384)
+ setprop vendor.chre.enabled 0
+ ;;
+ *)
+ esac
+ ;;
+ "msm8660")
+ case "$soc_hwplatform" in
+ "Fluid")
+ setprop vendor.display.lcd_density 240
+ ;;
+ "Dragon")
+ setprop ro.sound.alsa "WM8903"
+ ;;
+ esac
+ ;;
+
+ "msm8960")
+ # lcd density is write-once. Hence the separate switch case
+ case "$soc_hwplatform" in
+ "Liquid")
+ if [ "$soc_hwver" == "196608" ]; then # version 0x30000 is 3D sku
+ setprop ro.sf.hwrotation 90
+ fi
+
+ setprop vendor.display.lcd_density 160
+ ;;
+ "MTP")
+ setprop vendor.display.lcd_density 240
+ ;;
+ *)
+ case "$soc_hwid" in
+ "109")
+ setprop vendor.display.lcd_density 160
+ ;;
+ *)
+ setprop vendor.display.lcd_density 240
+ ;;
+ esac
+ ;;
+ esac
+
+ #Set up composition type based on the target
+ case "$soc_hwid" in
+ 87)
+ #8960
+ setprop debug.composition.type dyn
+ ;;
+ 153|154|155|156|157|138)
+ #8064 V2 PRIME | 8930AB | 8630AB | 8230AB | 8030AB | 8960AB
+ setprop debug.composition.type c2d
+ ;;
+ *)
+ esac
+ ;;
+
+ "msm8974")
+ case "$soc_hwplatform" in
+ "Liquid")
+ setprop vendor.display.lcd_density 160
+ # Liquid do not have hardware navigation keys, so enable
+ # Android sw navigation bar
+ setprop ro.hw.nav_keys 0
+ ;;
+ "Dragon")
+ setprop vendor.display.lcd_density 240
+ ;;
+ *)
+ setprop vendor.display.lcd_density 320
+ ;;
+ esac
+ ;;
+
+ "msm8226")
+ case "$soc_hwplatform" in
+ *)
+ setprop vendor.display.lcd_density 320
+ ;;
+ esac
+ ;;
+
+ "msm8610" | "apq8084" | "mpq8092")
+ case "$soc_hwplatform" in
+ *)
+ setprop vendor.display.lcd_density 240
+ ;;
+ esac
+ ;;
+ "apq8084")
+ case "$soc_hwplatform" in
+ "Liquid")
+ setprop vendor.display.lcd_density 320
+ # Liquid do not have hardware navigation keys, so enable
+ # Android sw navigation bar
+ setprop ro.hw.nav_keys 0
+ ;;
+ "SBC")
+ setprop vendor.display.lcd_density 200
+ # SBC do not have hardware navigation keys, so enable
+ # Android sw navigation bar
+ setprop qemu.hw.mainkeys 0
+ ;;
+ *)
+ setprop vendor.display.lcd_density 480
+ ;;
+ esac
+ ;;
+ "msm8996")
+ case "$soc_hwplatform" in
+ "Dragon")
+ setprop vendor.display.lcd_density 240
+ setprop qemu.hw.mainkeys 0
+ ;;
+ "ADP")
+ setprop vendor.display.lcd_density 160
+ setprop qemu.hw.mainkeys 0
+ ;;
+ "SBC")
+ setprop vendor.display.lcd_density 240
+ setprop qemu.hw.mainkeys 0
+ ;;
+ *)
+ setprop vendor.display.lcd_density 560
+ ;;
+ esac
+ ;;
+ "msm8937" | "msm8940")
+ # Set vendor.opengles.version based on chip id.
+ # MSM8937 and MSM8940 variants supports OpenGLES 3.1
+ # 196608 is decimal for 0x30000 to report version 3.0
+ # 196609 is decimal for 0x30001 to report version 3.1
+ # 196610 is decimal for 0x30002 to report version 3.2
+ case "$soc_hwid" in
+ 294|295|296|297|298|313|353|354|363|364)
+ setprop vendor.opengles.version 196610
+ if [ $soc_hwid = 354 ]
+ then
+ setprop vendor.media.target.version 1
+ log -t BOOT -p i "SDM429 early_boot prop set for: HwID '$soc_hwid'"
+ fi
+ ;;
+ 303|307|308|309|320)
+ # Vulkan is not supported for 8917 variants
+ setprop vendor.opengles.version 196608
+ setprop persist.graphics.vulkan.disable true
+ ;;
+ *)
+ setprop vendor.opengles.version 196608
+ ;;
+ esac
+ ;;
+ "msm8909")
+ case "$soc_hwplatform" in
+ *)
+ setprop persist.graphics.vulkan.disable true
+ ;;
+ esac
+ ;;
+ "msm8998" | "apq8098_latv")
+ case "$soc_hwplatform" in
+ *)
+ setprop vendor.display.lcd_density 560
+ ;;
+ esac
+ ;;
+ "sdm845")
+ case "$soc_hwplatform" in
+ *)
+ if [ $fb_width -le 1600 ]; then
+ setprop vendor.display.lcd_density 560
+ else
+ setprop vendor.display.lcd_density 640
+ fi
+ ;;
+ esac
+ ;;
+ "msmnile")
+ case "$soc_hwplatform" in
+ *)
+ if [ $fb_width -le 1600 ]; then
+ setprop vendor.display.lcd_density 560
+ else
+ setprop vendor.display.lcd_density 640
+ fi
+ ;;
+ esac
+ ;;
+ "kona")
+ case "$soc_hwplatform" in
+ *)
+ if [ $fb_width -le 1600 ]; then
+ setprop vendor.display.lcd_density 560
+ else
+ setprop vendor.display.lcd_density 640
+ fi
+ ;;
+ esac
+ ;;
+ "lito")
+ case "$soc_hwplatform" in
+ *)
+ sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc1/sku_version` 2> /dev/null
+ if [ $sku_ver -eq 1 ]; then
+ setprop vendor.media.target.version 1
+ fi
+ ;;
+ esac
+ ;;
+ "sdm710" | "msmpeafowl")
+ case "$soc_hwplatform" in
+ *)
+ sku_ver=`cat /sys/devices/platform/soc/aa00000.qcom,vidc1/sku_version` 2> /dev/null
+ if [ $sku_ver -eq 1 ]; then
+ setprop vendor.media.target.version 1
+ fi
+ ;;
+ esac
+ ;;
+ "msm8953")
+ cap_ver = 1
+ if [ -e "/sys/devices/platform/soc/1d00000.qcom,vidc/capability_version" ]; then
+ cap_ver=`cat /sys/devices/platform/soc/1d00000.qcom,vidc/capability_version` 2> /dev/null
+ else
+ cap_ver=`cat /sys/devices/soc/1d00000.qcom,vidc/capability_version` 2> /dev/null
+ fi
+
+ if [ $cap_ver -eq 1 ]; then
+ setprop vendor.media.target.version 1
+ fi
+ ;;
+ #Set property to differentiate SDM660 & SDM455
+ #SOC ID for SDM455 is 385
+ "sdm660")
+ case "$soc_hwid" in
+ 385)
+ setprop vendor.media.target.version 1
+ esac
+ ;;
+esac
+
+baseband=`getprop ro.baseband`
+#enable atfwd daemon all targets except sda, apq, qcs
+case "$baseband" in
+ "apq" | "sda" | "qcs" )
+ setprop persist.vendor.radio.atfwd.start false;;
+ *)
+ setprop persist.vendor.radio.atfwd.start true;;
+esac
+
+#set default lcd density
+#Since lcd density has read only
+#property, it will not overwrite previous set
+#property if any target is setting forcefully.
+set_density_by_fb
+
+
+# set Lilliput LCD density for ADP
+product=`getprop ro.build.product`
+
+case "$product" in
+ "msmnile_au")
+ setprop vendor.display.lcd_density 160
+ echo 902400000 > /sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/min_freq
+ echo 1612800000 > /sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/max_freq
+ echo 902400000 > /sys/class/devfreq/soc:qcom,cpu4-cpu-l3-lat/min_freq
+ echo 1612800000 > /sys/class/devfreq/soc:qcom,cpu4-cpu-l3-lat/max_freq
+ ;;
+ *)
+ ;;
+esac
+case "$product" in
+ "sm6150_au")
+ setprop vendor.display.lcd_density 160
+ ;;
+ *)
+ ;;
+esac
+case "$product" in
+ "sdmshrike_au")
+ setprop vendor.display.lcd_density 160
+ echo 940800000 > /sys/class/devfreq/soc:qcom,cpu0-cpu-l3-lat/min_freq
+ echo 940800000 > /sys/class/devfreq/soc:qcom,cpu4-cpu-l3-lat/min_freq
+ ;;
+ *)
+ ;;
+esac
+
+case "$product" in
+ "msmnile_gvmq")
+ setprop vendor.display.lcd_density 160
+ ;;
+ *)
+ ;;
+esac
+# Setup display nodes & permissions
+# HDMI can be fb1 or fb2
+# Loop through the sysfs nodes and determine
+# the HDMI(dtv panel)
+
+function set_perms() {
+ #Usage set_perms <filename> <ownership> <permission>
+ chown -h $2 $1
+ chmod $3 $1
+}
+
+# check for the type of driver FB or DRM
+fb_driver=/sys/class/graphics/fb0
+if [ -e "$fb_driver" ]
+then
+ # check for mdp caps
+ file=/sys/class/graphics/fb0/mdp/caps
+ if [ -f "$file" ]
+ then
+ setprop vendor.gralloc.disable_ubwc 1
+ cat $file | while read line; do
+ case "$line" in
+ *"ubwc"*)
+ setprop vendor.gralloc.enable_fb_ubwc 1
+ setprop vendor.gralloc.disable_ubwc 0
+ esac
+ done
+ fi
+else
+ set_perms /sys/devices/virtual/hdcp/msm_hdcp/min_level_change system.graphics 0660
+fi
+
+# allow system_graphics group to access pmic secure_mode node
+set_perms /sys/class/lcd_bias/secure_mode system.graphics 0660
+set_perms /sys/class/leds/wled/secure_mode system.graphics 0660
+
+boot_reason=`cat /proc/sys/kernel/boot_reason`
+reboot_reason=`getprop ro.boot.alarmboot`
+if [ "$boot_reason" = "3" ] || [ "$reboot_reason" = "true" ]; then
+ setprop ro.vendor.alarm_boot true
+else
+ setprop ro.vendor.alarm_boot false
+fi
+
+# copy GPU frequencies to vendor property
+if [ -f /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies ]; then
+ gpu_freq=`cat /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies` 2> /dev/null
+ setprop vendor.gpu.available_frequencies "$gpu_freq"
+fi
diff --git a/rootdir/bin/init.qcom.post_boot.sh b/rootdir/etc/init.qcom.post_boot.sh
index 992da7f..8dd85a8 100644
--- a/rootdir/bin/init.qcom.post_boot.sh
+++ b/rootdir/etc/init.qcom.post_boot.sh
@@ -1,6 +1,6 @@
#! /vendor/bin/sh
-# Copyright (c) 2012-2013, 2016-2018, The Linux Foundation. All rights reserved.
+# Copyright (c) 2012-2013, 2016-2019, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -340,22 +340,29 @@ function configure_zram_parameters() {
# Zram disk - 75% for Go devices.
# For 512MB Go device, size = 384MB, set same for Non-Go.
# For 1GB Go device, size = 768MB, set same for Non-Go.
- # For >=2GB Non-Go device, size = 1GB
+ # For >=2GB Non-Go devices, size = 50% of RAM size. Limit the size to 4GB.
# And enable lz4 zram compression for Go targets.
+ RamSizeGB=`echo "($MemTotal / 1048576 ) + 1" | bc`
+ zRamSizeBytes=`echo "$RamSizeGB * 1024 * 1024 * 1024 / 2" | bc`
+ if [ $zRamSizeBytes -gt 4294967296 ]; then
+ zRamSizeBytes=4294967296
+ fi
+
if [ "$low_ram" == "true" ]; then
echo lz4 > /sys/block/zram0/comp_algorithm
fi
if [ -f /sys/block/zram0/disksize ]; then
- echo 1 > /sys/block/zram0/use_dedup
+ if [ -f /sys/block/zram0/use_dedup ]; then
+ echo 1 > /sys/block/zram0/use_dedup
+ fi
if [ $MemTotal -le 524288 ]; then
echo 402653184 > /sys/block/zram0/disksize
elif [ $MemTotal -le 1048576 ]; then
echo 805306368 > /sys/block/zram0/disksize
else
- # Set Zram disk size=1GB for >=2GB Non-Go targets.
- echo 1073741824 > /sys/block/zram0/disksize
+ echo $zRamSizeBytes > /sys/block/zram0/disksize
fi
mkswap /dev/block/zram0
swapon /dev/block/zram0 -p 32758
@@ -440,7 +447,7 @@ function configure_memory_parameters() {
ProductName=`getprop ro.product.name`
low_ram=`getprop ro.config.low_ram`
-if [ "$ProductName" == "msmnile" ]; then
+if [ "$ProductName" == "msmnile" ] || [ "$ProductName" == "kona" ] || [ "$ProductName" == "sdmshrike_au" ]; then
# Enable ZRAM
configure_zram_parameters
configure_read_ahead_kb_values
@@ -847,7 +854,6 @@ case "$target" in
echo 100000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
echo 1497600 > /sys/module/cpu_boost/parameters/input_boost_freq
echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
- setprop ro.vendor.perf.cores_online 2
;;
*)
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
@@ -2106,7 +2112,7 @@ case "$target" in
# Socid 386 = Pukeena
case "$soc_id" in
- "303" | "307" | "308" | "309" | "320" | "386" )
+ "303" | "307" | "308" | "309" | "320" | "386" | "436")
# Start Host based Touch processing
case "$hw_platform" in
@@ -2441,7 +2447,7 @@ case "$target" in
esac
case "$soc_id" in
- "386" )
+ "386" | "436")
# Start Host based Touch processing
case "$hw_platform" in
@@ -2618,9 +2624,7 @@ case "$target" in
echo "cpufreq" > /sys/class/devfreq/soc:qcom,mincpubw/governor
# Start cdsprpcd only for sdm660 and disable for sdm630
- if [ "$soc_id" -eq "317" ]; then
- start vendor.cdsprpcd
- fi
+ start vendor.cdsprpcd
# Start Host based Touch processing
case "$hw_platform" in
@@ -2797,132 +2801,6 @@ case "$target" in
esac
case "$target" in
- "trinket")
-
- if [ -f /sys/devices/soc0/soc_id ]; then
- soc_id=`cat /sys/devices/soc0/soc_id`
- else
- soc_id=`cat /sys/devices/system/soc/soc0/id`
- fi
-
- case "$soc_id" in
- "394" )
-
- # Core control parameters on big
- echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
- echo 40 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
- echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
- echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
- echo 1 > /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster
- echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres
-
- # Setting b.L scheduler parameters
- echo 67 > /proc/sys/kernel/sched_downmigrate
- echo 77 > /proc/sys/kernel/sched_upmigrate
- echo 85 > /proc/sys/kernel/sched_group_downmigrate
- echo 100 > /proc/sys/kernel/sched_group_upmigrate
-
- # cpuset settings
- echo 0-3 > /dev/cpuset/background/cpus
- echo 0-3 > /dev/cpuset/system-background/cpus
-
-
- # configure governor settings for little cluster
- echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
- echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
- echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
- echo 1305600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
- echo 614400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
-
- # configure governor settings for big cluster
- echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
- echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
- echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
- echo 1401600 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq
- echo 1056000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
-
- echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
-
- # sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
- echo -6 > /sys/devices/system/cpu/cpu0/sched_load_boost
- echo -6 > /sys/devices/system/cpu/cpu1/sched_load_boost
- echo -6 > /sys/devices/system/cpu/cpu2/sched_load_boost
- echo -6 > /sys/devices/system/cpu/cpu3/sched_load_boost
- echo -6 > /sys/devices/system/cpu/cpu4/sched_load_boost
- echo -6 > /sys/devices/system/cpu/cpu5/sched_load_boost
- echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
- echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
- echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load
- echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load
-
- # Set Memory parameters
- configure_memory_parameters
-
- # Enable bus-dcvs
- ddr_type=`od -An -tx /proc/device-tree/memory/ddr_device_type`
- ddr_type4="07"
- ddr_type3="05"
-
- for device in /sys/devices/platform/soc
- do
- for cpubw in $device/*cpu-cpu-ddr-bw/devfreq/*cpu-cpu-ddr-bw
- do
- echo "bw_hwmon" > $cpubw/governor
- echo 50 > $cpubw/polling_interval
- echo 762 > $cpubw/min_freq
- if [ ${ddr_type:4:2} == $ddr_type4 ]; then
- # LPDDR4
- echo "2288 3440 4173 5195 5859 7759 10322 11863 13763" > $cpubw/bw_hwmon/mbps_zones
- echo 85 > $cpubw/bw_hwmon/io_percent
- fi
- if [ ${ddr_type:4:2} == $ddr_type3 ]; then
- # LPDDR3
- echo "1525 3440 5195 5859 7102" > $cpubw/bw_hwmon/mbps_zones
- echo 34 > $cpubw/bw_hwmon/io_percent
- fi
- echo 4 > $cpubw/bw_hwmon/sample_ms
- echo 90 > $cpubw/bw_hwmon/decay_rate
- echo 190 > $cpubw/bw_hwmon/bw_step
- echo 20 > $cpubw/bw_hwmon/hist_memory
- echo 0 > $cpubw/bw_hwmon/hyst_length
- echo 80 > $cpubw/bw_hwmon/down_thres
- echo 0 > $cpubw/bw_hwmon/guard_band_mbps
- echo 250 > $cpubw/bw_hwmon/up_scale
- echo 1600 > $cpubw/bw_hwmon/idle_mbps
- done
-
- for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
- do
- echo "mem_latency" > $memlat/governor
- echo 10 > $memlat/polling_interval
- echo 400 > $memlat/mem_latency/ratio_ceil
- done
-
- for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
- do
- echo "compute" > $latfloor/governor
- echo 10 > $latfloor/polling_interval
- done
-
- done
-
- # colcoation v3 disabled
- echo 0 > /proc/sys/kernel/sched_min_task_util_for_boost
- echo 0 > /proc/sys/kernel/sched_min_task_util_for_colocation
- echo 0 > /proc/sys/kernel/sched_little_cluster_coloc_fmin_khz
-
- # Turn off scheduler boost at the end
- echo 0 > /proc/sys/kernel/sched_boost
-
- # Turn on sleep modes.
- echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
-
- ;;
- esac
- ;;
-esac
-
-case "$target" in
"sdm710")
#Apply settings for sdm710
@@ -2944,11 +2822,11 @@ case "$target" in
fi
case "$soc_id" in
- "336" | "337" | "347" | "360" | "393" | "370" | "371" )
+ "336" | "337" | "347" | "360" | "393" )
# Start Host based Touch processing
case "$hw_platform" in
- "MTP" | "Surf" | "RCM" | "QRD" | "HDK" )
+ "MTP" | "Surf" | "RCM" | "QRD" )
start_hbtp
;;
esac
@@ -3058,6 +2936,132 @@ case "$target" in
esac
case "$target" in
+ "trinket")
+
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ case "$soc_id" in
+ "394" )
+
+ # Core control parameters on big
+ echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
+ echo 40 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
+ echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
+ echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster
+ echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres
+
+ # Setting b.L scheduler parameters
+ echo 67 > /proc/sys/kernel/sched_downmigrate
+ echo 77 > /proc/sys/kernel/sched_upmigrate
+ echo 85 > /proc/sys/kernel/sched_group_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+
+ # cpuset settings
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+
+
+ # configure governor settings for little cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
+ echo 1305600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 614400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # configure governor settings for big cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
+ echo 1401600 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq
+ echo 1056000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ # sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
+ echo -6 > /sys/devices/system/cpu/cpu0/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu1/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu2/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu3/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu4/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu5/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load
+ echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ # Enable bus-dcvs
+ ddr_type=`od -An -tx /proc/device-tree/memory/ddr_device_type`
+ ddr_type4="07"
+ ddr_type3="05"
+
+ for device in /sys/devices/platform/soc
+ do
+ for cpubw in $device/*cpu-cpu-ddr-bw/devfreq/*cpu-cpu-ddr-bw
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo 762 > $cpubw/min_freq
+ if [ ${ddr_type:4:2} == $ddr_type4 ]; then
+ # LPDDR4
+ echo "2288 3440 4173 5195 5859 7759 10322 11863 13763" > $cpubw/bw_hwmon/mbps_zones
+ echo 85 > $cpubw/bw_hwmon/io_percent
+ fi
+ if [ ${ddr_type:4:2} == $ddr_type3 ]; then
+ # LPDDR3
+ echo "1525 3440 5195 5859 7102" > $cpubw/bw_hwmon/mbps_zones
+ echo 34 > $cpubw/bw_hwmon/io_percent
+ fi
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 90 > $cpubw/bw_hwmon/decay_rate
+ echo 190 > $cpubw/bw_hwmon/bw_step
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
+ do
+ echo "compute" > $latfloor/governor
+ echo 10 > $latfloor/polling_interval
+ done
+
+ done
+
+ # colcoation v3 disabled
+ echo 0 > /proc/sys/kernel/sched_min_task_util_for_boost
+ echo 0 > /proc/sys/kernel/sched_min_task_util_for_colocation
+ echo 0 > /proc/sys/kernel/sched_little_cluster_coloc_fmin_khz
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Turn on sleep modes.
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ ;;
+ esac
+ ;;
+esac
+
+case "$target" in
"sm6150")
#Apply settings for sm6150
@@ -3136,7 +3140,6 @@ case "$target" in
# Set Memory parameters
configure_memory_parameters
-
# Enable bus-dcvs
for device in /sys/devices/platform/soc
do
@@ -3178,14 +3181,14 @@ case "$target" in
echo 400 > $memlat/mem_latency/ratio_ceil
done
- #Gold L3 ratio ceil
+ #Gold L3 ratio ceil
echo 4000 > /sys/class/devfreq/soc:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil
- #Enable cdspl3 governor for L3 cdsp nodes
- for l3cdsp in $device/*cdsp-cdsp-l3-lat/devfreq/*cdsp-cdsp-l3-lat
- do
- echo "cdspl3" > $l3cdsp/governor
- done
+ #Enable cdspl3 governor for L3 cdsp nodes
+ for l3cdsp in $device/*cdsp-cdsp-l3-lat/devfreq/*cdsp-cdsp-l3-lat
+ do
+ echo "cdspl3" > $l3cdsp/governor
+ done
#Enable compute governor for gold latfloor
for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
@@ -3195,8 +3198,6 @@ case "$target" in
done
done
-
-
# cpuset parameters
echo 0-5 > /dev/cpuset/background/cpus
echo 0-5 > /dev/cpuset/system-background/cpus
@@ -3223,7 +3224,6 @@ case "$target" in
echo 8 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres
echo 0 > /sys/devices/system/cpu/cpu6/core_ctl/enable
-
# Setting b.L scheduler parameters
# default sched up and down migrate values are 71 and 65
echo 65 > /proc/sys/kernel/sched_downmigrate
@@ -3266,57 +3266,57 @@ case "$target" in
do
for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
do
- echo "bw_hwmon" > $cpubw/governor
- echo 50 > $cpubw/polling_interval
- echo "2288 4577 7110 9155 12298 14236" > $cpubw/bw_hwmon/mbps_zones
- echo 4 > $cpubw/bw_hwmon/sample_ms
- echo 68 > $cpubw/bw_hwmon/io_percent
- echo 20 > $cpubw/bw_hwmon/hist_memory
- echo 0 > $cpubw/bw_hwmon/hyst_length
- echo 80 > $cpubw/bw_hwmon/down_thres
- echo 0 > $cpubw/bw_hwmon/guard_band_mbps
- echo 250 > $cpubw/bw_hwmon/up_scale
- echo 1600 > $cpubw/bw_hwmon/idle_mbps
- done
-
- for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
- do
- echo "bw_hwmon" > $llccbw/governor
- echo 40 > $llccbw/polling_interval
- echo "1144 1720 2086 2929 3879 5931 6881" > $llccbw/bw_hwmon/mbps_zones
- echo 4 > $llccbw/bw_hwmon/sample_ms
- echo 68 > $llccbw/bw_hwmon/io_percent
- echo 20 > $llccbw/bw_hwmon/hist_memory
- echo 0 > $llccbw/bw_hwmon/hyst_length
- echo 80 > $llccbw/bw_hwmon/down_thres
- echo 0 > $llccbw/bw_hwmon/guard_band_mbps
- echo 250 > $llccbw/bw_hwmon/up_scale
- echo 1600 > $llccbw/bw_hwmon/idle_mbps
- done
-
- for npubw in $device/*npu-npu-ddr-bw/devfreq/*npu-npu-ddr-bw
- do
- echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
- echo "bw_hwmon" > $npubw/governor
- echo 40 > $npubw/polling_interval
- echo "1144 1720 2086 2929 3879 5931 6881" > $npubw/bw_hwmon/mbps_zones
- echo 4 > $npubw/bw_hwmon/sample_ms
- echo 80 > $npubw/bw_hwmon/io_percent
- echo 20 > $npubw/bw_hwmon/hist_memory
- echo 10 > $npubw/bw_hwmon/hyst_length
- echo 30 > $npubw/bw_hwmon/down_thres
- echo 0 > $npubw/bw_hwmon/guard_band_mbps
- echo 250 > $npubw/bw_hwmon/up_scale
- echo 0 > $npubw/bw_hwmon/idle_mbps
- echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
- done
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo "2288 4577 7110 9155 12298 14236" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 68 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
+ do
+ echo "bw_hwmon" > $llccbw/governor
+ echo 40 > $llccbw/polling_interval
+ echo "1144 1720 2086 2929 3879 5931 6881" > $llccbw/bw_hwmon/mbps_zones
+ echo 4 > $llccbw/bw_hwmon/sample_ms
+ echo 68 > $llccbw/bw_hwmon/io_percent
+ echo 20 > $llccbw/bw_hwmon/hist_memory
+ echo 0 > $llccbw/bw_hwmon/hyst_length
+ echo 80 > $llccbw/bw_hwmon/down_thres
+ echo 0 > $llccbw/bw_hwmon/guard_band_mbps
+ echo 250 > $llccbw/bw_hwmon/up_scale
+ echo 1600 > $llccbw/bw_hwmon/idle_mbps
+ done
- #Enable mem_latency governor for L3, LLCC, and DDR scaling
- for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
- do
- echo "mem_latency" > $memlat/governor
- echo 10 > $memlat/polling_interval
- echo 400 > $memlat/mem_latency/ratio_ceil
+ for npubw in $device/*npu-npu-ddr-bw/devfreq/*npu-npu-ddr-bw
+ do
+ echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
+ echo "bw_hwmon" > $npubw/governor
+ echo 40 > $npubw/polling_interval
+ echo "1144 1720 2086 2929 3879 5931 6881" > $npubw/bw_hwmon/mbps_zones
+ echo 4 > $npubw/bw_hwmon/sample_ms
+ echo 80 > $npubw/bw_hwmon/io_percent
+ echo 20 > $npubw/bw_hwmon/hist_memory
+ echo 10 > $npubw/bw_hwmon/hyst_length
+ echo 30 > $npubw/bw_hwmon/down_thres
+ echo 0 > $npubw/bw_hwmon/guard_band_mbps
+ echo 250 > $npubw/bw_hwmon/up_scale
+ echo 0 > $npubw/bw_hwmon/idle_mbps
+ echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
+ done
+
+ #Enable mem_latency governor for L3, LLCC, and DDR scaling
+ for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
done
#Gold L3 ratio ceil
@@ -3328,12 +3328,12 @@ case "$target" in
echo "cdspl3" > $l3cdsp/governor
done
- #Enable compute governor for gold latfloor
- for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
- do
- echo "compute" > $latfloor/governor
- echo 10 > $latfloor/polling_interval
- done
+ #Enable compute governor for gold latfloor
+ for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
+ do
+ echo "compute" > $latfloor/governor
+ echo 10 > $latfloor/polling_interval
+ done
done
@@ -3348,6 +3348,484 @@ case "$target" in
echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
;;
esac
+
+ ;;
+esac
+
+
+case "$target" in
+ "lito")
+
+ # Core control parameters on silver
+ echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 8 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+
+ # Disable Core control on gold, prime
+ echo 0 > /sys/devices/system/cpu/cpu6/core_ctl/enable
+ echo 0 > /sys/devices/system/cpu/cpu7/core_ctl/enable
+
+ # Setting b.L scheduler parameters
+ echo 65 85 > /proc/sys/kernel/sched_downmigrate
+ echo 71 95 > /proc/sys/kernel/sched_upmigrate
+ echo 85 > /proc/sys/kernel/sched_group_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+ echo 0 > /proc/sys/kernel/sched_coloc_busy_hyst_ns
+ echo 0 > /proc/sys/kernel/sched_coloc_busy_hysteresis_enable_cpus
+ echo 0 > /proc/sys/kernel/sched_coloc_busy_hyst_max_ms
+
+ # disable unfiltering
+ echo 1 > /proc/sys/kernel/sched_task_unfilter_nr_windows
+
+ # configure governor settings for silver cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/down_rate_limit_us
+ echo 1228800 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/pl
+ echo 576000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
+ echo 650000 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/rtg_boost_freq
+
+ # configure governor settings for gold cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy6/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy6/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy6/schedutil/down_rate_limit_us
+ echo 1228800 > /sys/devices/system/cpu/cpufreq/policy6/schedutil/hispeed_freq
+ echo 85 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_load
+ echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy6/schedutil/pl
+ echo 672000 > /sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy6/schedutil/rtg_boost_freq
+
+ # configure governor settings for gold+ cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy7/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/down_rate_limit_us
+ echo 1228800 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq
+ echo 85 > /sys/devices/system/cpu/cpu7/cpufreq/schedutil/hispeed_load
+ echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/pl
+ echo 672000 > /sys/devices/system/cpu/cpufreq/policy7/scaling_min_freq
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/rtg_boost_freq
+
+ # colocation v3 settings
+ echo 51 > /proc/sys/kernel/sched_min_task_util_for_boost
+ echo 35 > /proc/sys/kernel/sched_min_task_util_for_colocation
+
+ # Enable conservative pl
+ echo 1 > /proc/sys/kernel/sched_conservative_pl
+
+ echo "0:1228800" > /sys/devices/system/cpu/cpu_boost/input_boost_freq
+ echo 40 > /sys/devices/system/cpu/cpu_boost/input_boost_ms
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ if [ `cat /sys/devices/soc0/revision` == "2.0" ]; then
+ # r2.0 related changes
+ echo "0:1075200" > /sys/devices/system/cpu/cpu_boost/input_boost_freq
+ echo 610000 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/rtg_boost_freq
+ echo 1075200 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq
+ echo 1152000 > /sys/devices/system/cpu/cpufreq/policy6/schedutil/hispeed_freq
+ echo 1401600 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq
+ echo 614400 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
+ echo 652800 > /sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq
+ echo 806400 > /sys/devices/system/cpu/cpufreq/policy7/scaling_min_freq
+ echo 83 > /proc/sys/kernel/sched_asym_cap_sibling_freq_match_pct
+ fi
+
+ # Enable bus-dcvs
+ for device in /sys/devices/platform/soc
+ do
+ for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo "2288 4577 7110 9155 12298 14236 16265" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 68 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
+ do
+ echo "bw_hwmon" > $llccbw/governor
+ echo 50 > $llccbw/polling_interval
+ echo "1144 1720 2086 2929 3879 5931 6881 7980" > $llccbw/bw_hwmon/mbps_zones
+ echo 4 > $llccbw/bw_hwmon/sample_ms
+ echo 68 > $llccbw/bw_hwmon/io_percent
+ echo 20 > $llccbw/bw_hwmon/hist_memory
+ echo 0 > $llccbw/bw_hwmon/hyst_length
+ echo 80 > $llccbw/bw_hwmon/down_thres
+ echo 0 > $llccbw/bw_hwmon/guard_band_mbps
+ echo 250 > $llccbw/bw_hwmon/up_scale
+ echo 1600 > $llccbw/bw_hwmon/idle_mbps
+ done
+
+ for npubw in $device/*npu*-ddr-bw/devfreq/*npu*-ddr-bw
+ do
+ echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
+ echo "bw_hwmon" > $npubw/governor
+ echo 40 > $npubw/polling_interval
+ echo "1144 1720 2086 2929 3879 5931 6881 7980" > $npubw/bw_hwmon/mbps_zones
+ echo 4 > $npubw/bw_hwmon/sample_ms
+ echo 80 > $npubw/bw_hwmon/io_percent
+ echo 20 > $npubw/bw_hwmon/hist_memory
+ echo 10 > $npubw/bw_hwmon/hyst_length
+ echo 30 > $npubw/bw_hwmon/down_thres
+ echo 0 > $npubw/bw_hwmon/guard_band_mbps
+ echo 250 > $npubw/bw_hwmon/up_scale
+ echo 0 > $npubw/bw_hwmon/idle_mbps
+ echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
+ done
+
+ for npullccbw in $device/*npu*-llcc-bw/devfreq/*npu*-llcc-bw
+ do
+ echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
+ echo "bw_hwmon" > $npullccbw/governor
+ echo 40 > $npullccbw/polling_interval
+ echo "2288 4577 7110 9155 12298 14236 16265" > $npullccbw/bw_hwmon/mbps_zones
+ echo 4 > $npullccbw/bw_hwmon/sample_ms
+ echo 100 > $npullccbw/bw_hwmon/io_percent
+ echo 20 > $npullccbw/bw_hwmon/hist_memory
+ echo 10 > $npullccbw/bw_hwmon/hyst_length
+ echo 30 > $npullccbw/bw_hwmon/down_thres
+ echo 0 > $npullccbw/bw_hwmon/guard_band_mbps
+ echo 250 > $npullccbw/bw_hwmon/up_scale
+ echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
+ done
+
+ #Enable mem_latency governor for L3, LLCC, and DDR scaling
+ for memlat in $device/*qcom,devfreq-l3/*cpu*-lat/devfreq/*cpu*-lat
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable cdspl3 governor for L3 cdsp nodes
+ for l3cdsp in $device/*qcom,devfreq-l3/*cdsp-l3-lat/devfreq/*cdsp-l3-lat
+ do
+ echo "cdspl3" > $l3cdsp/governor
+ done
+
+ #Enable mem_latency governor for LLCC and DDR scaling
+ for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Gold L3 ratio ceil
+ for l3gold in $device/*qcom,devfreq-l3/*cpu6-cpu-l3-lat/devfreq/*cpu6-cpu-l3-lat
+ do
+ echo 4000 > $l3gold/mem_latency/ratio_ceil
+ done
+
+ #Prime L3 ratio ceil
+ for l3prime in $device/*qcom,devfreq-l3/*cpu7-cpu-l3-lat/devfreq/*cpu7-cpu-l3-lat
+ do
+ echo 4000 > $l3prime/mem_latency/ratio_ceil
+ done
+
+ #Enable compute governor for gold latfloor
+ for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
+ do
+ echo "compute" > $latfloor/governor
+ echo 10 > $latfloor/polling_interval
+ done
+ done
+
+ # cpuset parameters
+ echo 0-5 > /dev/cpuset/background/cpus
+ echo 0-5 > /dev/cpuset/system-background/cpus
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Turn on sleep modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ ;;
+esac
+
+#Apply settings for atoll
+case "$target" in
+ "atoll")
+
+ # Core control parameters on silver
+ echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
+ echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
+ echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms
+ echo 8 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres
+ echo 0 > /sys/devices/system/cpu/cpu6/core_ctl/enable
+
+ # Setting b.L scheduler parameters
+ # default sched up and down migrate values are 95 and 85
+ echo 65 > /proc/sys/kernel/sched_downmigrate
+ echo 71 > /proc/sys/kernel/sched_upmigrate
+ # default sched up and down migrate values are 100 and 95
+ echo 85 > /proc/sys/kernel/sched_group_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ #colocation v3 settings
+ echo 740000 > /proc/sys/kernel/sched_little_cluster_coloc_fmin_khz
+
+ # configure governor settings for little cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
+ echo 1248000 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
+ # configure governor settings for big cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us
+ echo 1267200 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq
+ echo 652800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+
+ # sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
+ echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
+ echo 85 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_load
+
+ # Enable conservative pl
+ echo 1 > /proc/sys/kernel/sched_conservative_pl
+
+ echo "0:1248000" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ # Enable bus-dcvs
+ for device in /sys/devices/platform/soc
+ do
+ for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo "2288 4577 7110 9155 12298 14236" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 68 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
+ do
+ echo "bw_hwmon" > $llccbw/governor
+ echo 40 > $llccbw/polling_interval
+ echo "1144 1720 2086 2929 3879 5931 6881 8137" > $llccbw/bw_hwmon/mbps_zones
+ echo 4 > $llccbw/bw_hwmon/sample_ms
+ echo 68 > $llccbw/bw_hwmon/io_percent
+ echo 20 > $llccbw/bw_hwmon/hist_memory
+ echo 0 > $llccbw/bw_hwmon/hyst_length
+ echo 80 > $llccbw/bw_hwmon/down_thres
+ echo 0 > $llccbw/bw_hwmon/guard_band_mbps
+ echo 250 > $llccbw/bw_hwmon/up_scale
+ echo 1600 > $llccbw/bw_hwmon/idle_mbps
+ done
+
+ for npubw in $device/*npu*-npu-ddr-bw/devfreq/*npu*-npu-ddr-bw
+ do
+ echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
+ echo "bw_hwmon" > $npubw/governor
+ echo 40 > $npubw/polling_interval
+ echo "1144 1720 2086 2929 3879 5931 6881 8137" > $npubw/bw_hwmon/mbps_zones
+ echo 4 > $npubw/bw_hwmon/sample_ms
+ echo 80 > $npubw/bw_hwmon/io_percent
+ echo 20 > $npubw/bw_hwmon/hist_memory
+ echo 10 > $npubw/bw_hwmon/hyst_length
+ echo 30 > $npubw/bw_hwmon/down_thres
+ echo 0 > $npubw/bw_hwmon/guard_band_mbps
+ echo 250 > $npubw/bw_hwmon/up_scale
+ echo 0 > $npubw/bw_hwmon/idle_mbps
+ echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
+ done
+
+ #Enable mem_latency governor for L3, LLCC, and DDR scaling
+ for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable cdspl3 governor for L3 cdsp nodes
+ for l3cdsp in $device/*cdsp-cdsp-l3-lat/devfreq/*cdsp-cdsp-l3-lat
+ do
+ echo "cdspl3" > $l3cdsp/governor
+ done
+
+ #Gold L3 ratio ceil
+ echo 4000 > /sys/class/devfreq/soc:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil
+
+ #Enable compute governor for gold latfloor
+ for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
+ do
+ echo "compute" > $latfloor/governor
+ echo 10 > $latfloor/polling_interval
+ done
+
+ done
+
+ # cpuset parameters
+ echo 0-5 > /dev/cpuset/background/cpus
+ echo 0-5 > /dev/cpuset/system-background/cpus
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Turn on sleep modes
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ ;;
+esac
+
+
+case "$target" in
+ "bengal")
+
+ if [ -f /sys/devices/soc0/soc_id ]; then
+ soc_id=`cat /sys/devices/soc0/soc_id`
+ else
+ soc_id=`cat /sys/devices/system/soc/soc0/id`
+ fi
+
+ case "$soc_id" in
+ "417" )
+
+ # Core control is temporarily disabled till bring up
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/enable
+ echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
+ # Core control parameters on big
+ echo 40 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
+ echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
+ echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
+ echo 4 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres
+
+ # Setting b.L scheduler parameters
+ echo 67 > /proc/sys/kernel/sched_downmigrate
+ echo 77 > /proc/sys/kernel/sched_upmigrate
+ echo 85 > /proc/sys/kernel/sched_group_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+
+ # cpuset settings
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+
+
+ # configure governor settings for little cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
+ echo 1305600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
+ echo 614400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rtg_boost_freq
+
+ # configure governor settings for big cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/down_rate_limit_us
+ echo 1401600 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq
+ echo 1056000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/rtg_boost_freq
+
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ # sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
+ echo -6 > /sys/devices/system/cpu/cpu0/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu1/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu2/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu3/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu4/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu5/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
+ echo -6 > /sys/devices/system/cpu/cpu7/sched_load_boost
+ echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load
+ echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load
+
+ # Set Memory parameters
+ configure_memory_parameters
+
+ # Enable bus-dcvs
+ ddr_type=`od -An -tx /proc/device-tree/memory/ddr_device_type`
+ ddr_type4="07"
+ ddr_type3="05"
+
+ for device in /sys/devices/platform/soc
+ do
+ for cpubw in $device/*cpu-cpu-ddr-bw/devfreq/*cpu-cpu-ddr-bw
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 50 > $cpubw/polling_interval
+ echo 762 > $cpubw/min_freq
+ if [ ${ddr_type:4:2} == $ddr_type4 ]; then
+ # LPDDR4
+ echo "2288 3440 4173 5195 5859 7759 10322 11863 13763" > $cpubw/bw_hwmon/mbps_zones
+ echo 85 > $cpubw/bw_hwmon/io_percent
+ fi
+ if [ ${ddr_type:4:2} == $ddr_type3 ]; then
+ # LPDDR3
+ echo "1525 3440 5195 5859 7102" > $cpubw/bw_hwmon/mbps_zones
+ echo 34 > $cpubw/bw_hwmon/io_percent
+ fi
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 90 > $cpubw/bw_hwmon/decay_rate
+ echo 190 > $cpubw/bw_hwmon/bw_step
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 0 > $cpubw/bw_hwmon/hyst_length
+ echo 80 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ done
+
+ for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ for latfloor in $device/*cpu*-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
+ do
+ echo "compute" > $latfloor/governor
+ echo 10 > $latfloor/polling_interval
+ done
+
+ done
+
+ # colcoation v3 disabled
+ echo 0 > /proc/sys/kernel/sched_min_task_util_for_boost
+ echo 0 > /proc/sys/kernel/sched_min_task_util_for_colocation
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # Turn off sleep modes till bring up
+ # sleep modes to be enabled after bring up
+ echo 1 > /sys/module/lpm_levels/parameters/sleep_disabled
+
+ ;;
+ esac
;;
esac
@@ -3392,7 +3870,6 @@ case "$target" in
esac
# Core control parameters on silver
- echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
echo 60 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres
echo 40 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres
@@ -3467,9 +3944,7 @@ case "$target" in
# Turn on sleep modes.
echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
-
- # Set Memory parameters
- configure_memory_parameters
+ echo 100 > /proc/sys/vm/swappiness
;;
esac
;;
@@ -3526,7 +4001,6 @@ case "$target" in
echo 300000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
echo 300000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
echo 1 > /sys/module/msm_thermal/core_control/enabled
- setprop ro.vendor.perf.cores_online 2
chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chown -h root.system /sys/devices/system/cpu/mfreq
@@ -4076,6 +4550,205 @@ case "$target" in
# configure governor settings for silver cluster
echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/down_rate_limit_us
+ echo 1209600 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq
+ echo 576000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
+ echo 1 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/pl
+
+ # configure governor settings for gold cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy4/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/down_rate_limit_us
+ echo 1612800 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/pl
+
+ # configure governor settings for gold+ cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy7/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/up_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/down_rate_limit_us
+ echo 1612800 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/pl
+
+ # configure input boost settings
+ echo "0:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq
+ echo 120 > /sys/module/cpu_boost/parameters/input_boost_ms
+
+ # Disable wsf, beacause we are using efk.
+ # wsf Range : 1..1000 So set to bare minimum value 1.
+ echo 1 > /proc/sys/vm/watermark_scale_factor
+
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+
+ # Enable oom_reaper
+ if [ -f /sys/module/lowmemorykiller/parameters/oom_reaper ]; then
+ echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper
+ else
+ echo 1 > /proc/sys/vm/reap_mem_on_sigkill
+ fi
+
+ # Enable bus-dcvs
+ for device in /sys/devices/platform/soc
+ do
+ for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 40 > $cpubw/polling_interval
+ echo "2288 4577 7110 9155 12298 14236 15258" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 50 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 10 > $cpubw/bw_hwmon/hyst_length
+ echo 30 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ echo 14236 > $cpubw/max_freq
+ done
+
+ for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
+ do
+ echo "bw_hwmon" > $llccbw/governor
+ echo 40 > $llccbw/polling_interval
+ echo "1720 2929 3879 5931 6881 7980" > $llccbw/bw_hwmon/mbps_zones
+ echo 4 > $llccbw/bw_hwmon/sample_ms
+ echo 80 > $llccbw/bw_hwmon/io_percent
+ echo 20 > $llccbw/bw_hwmon/hist_memory
+ echo 10 > $llccbw/bw_hwmon/hyst_length
+ echo 30 > $llccbw/bw_hwmon/down_thres
+ echo 0 > $llccbw/bw_hwmon/guard_band_mbps
+ echo 250 > $llccbw/bw_hwmon/up_scale
+ echo 1600 > $llccbw/bw_hwmon/idle_mbps
+ echo 6881 > $llccbw/max_freq
+ done
+
+ for npubw in $device/*npu-npu-ddr-bw/devfreq/*npu-npu-ddr-bw
+ do
+ echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
+ echo "bw_hwmon" > $npubw/governor
+ echo 40 > $npubw/polling_interval
+ echo "1720 2929 3879 5931 6881 7980" > $npubw/bw_hwmon/mbps_zones
+ echo 4 > $npubw/bw_hwmon/sample_ms
+ echo 80 > $npubw/bw_hwmon/io_percent
+ echo 20 > $npubw/bw_hwmon/hist_memory
+ echo 6 > $npubw/bw_hwmon/hyst_length
+ echo 30 > $npubw/bw_hwmon/down_thres
+ echo 0 > $npubw/bw_hwmon/guard_band_mbps
+ echo 250 > $npubw/bw_hwmon/up_scale
+ echo 0 > $npubw/bw_hwmon/idle_mbps
+ echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
+ done
+
+ #Enable mem_latency governor for L3, LLCC, and DDR scaling
+ for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable userspace governor for L3 cdsp nodes
+ for l3cdsp in $device/*cdsp-cdsp-l3-lat/devfreq/*cdsp-cdsp-l3-lat
+ do
+ echo "cdspl3" > $l3cdsp/governor
+ done
+
+ #Enable compute governor for gold latfloor
+ for latfloor in $device/*cpu-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
+ do
+ echo "compute" > $latfloor/governor
+ echo 10 > $latfloor/polling_interval
+ done
+
+ #Gold L3 ratio ceil
+ for l3gold in $device/*cpu4-cpu-l3-lat/devfreq/*cpu4-cpu-l3-lat
+ do
+ echo 4000 > $l3gold/mem_latency/ratio_ceil
+ done
+
+ #Prime L3 ratio ceil
+ for l3prime in $device/*cpu7-cpu-l3-lat/devfreq/*cpu7-cpu-l3-lat
+ do
+ echo 20000 > $l3prime/mem_latency/ratio_ceil
+ done
+ done
+
+ if [ -f /sys/devices/soc0/hw_platform ]; then
+ hw_platform=`cat /sys/devices/soc0/hw_platform`
+ else
+ hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
+ fi
+
+ if [ -f /sys/devices/soc0/platform_subtype_id ]; then
+ platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
+ fi
+
+ case "$hw_platform" in
+ "MTP" | "Surf" | "RCM" )
+ # Start Host based Touch processing
+ case "$platform_subtype_id" in
+ "0" | "1" | "2" | "4")
+ start_hbtp
+ ;;
+ esac
+ ;;
+ "HDK" )
+ if [ -d /sys/kernel/hbtpsensor ] ; then
+ start_hbtp
+ fi
+ ;;
+ esac
+
+ echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
+ configure_memory_parameters
+ ;;
+esac
+
+case "$target" in
+ "sdmshrike")
+ # Core control parameters for gold
+ echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
+ echo 30 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
+ echo 3 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres
+
+ # Core control parameters for gold+
+ echo 0 > /sys/devices/system/cpu/cpu7/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu7/core_ctl/busy_up_thres
+ echo 30 > /sys/devices/system/cpu/cpu7/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu7/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu7/core_ctl/task_thres
+ # Controls how many more tasks should be eligible to run on gold CPUs
+ # w.r.t number of gold CPUs available to trigger assist (max number of
+ # tasks eligible to run on previous cluster minus number of CPUs in
+ # the previous cluster).
+ #
+ # Setting to 1 by default which means there should be at least
+ # 4 tasks eligible to run on gold cluster (tasks running on gold cores
+ # plus misfit tasks on silver cores) to trigger assitance from gold+.
+ echo 1 > /sys/devices/system/cpu/cpu7/core_ctl/nr_prev_assist_thresh
+
+ # Disable Core control on silver
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/enable
+
+ # Setting b.L scheduler parameters
+ echo 95 95 > /proc/sys/kernel/sched_upmigrate
+ echo 85 85 > /proc/sys/kernel/sched_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+ echo 10 > /proc/sys/kernel/sched_group_downmigrate
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+
+ # cpuset parameters
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # configure governor settings for silver cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/up_rate_limit_us
echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/down_rate_limit_us
echo 1209600 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq
echo 576000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
@@ -4225,12 +4898,255 @@ case "$target" in
;;
esac
+ #Setting the min and max supported frequencies
+ reg_val=`cat /sys/devices/platform/soc/780130.qfprom/qfprom0/nvmem | od -An -t d4`
+ feature_id=$(((reg_val >> 20) & 0xFF))
+
+ #Setting the min supported frequencies
+ echo 1113600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ echo 1113600 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
+ echo 1113600 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
+ echo 1113600 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
+ echo 1171200 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
+ echo 1171200 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq
+ echo 1171200 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
+ echo 1171200 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq
+ #setting min gpu freq to 392 MHz
+ echo 4 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel
+ if [ $feature_id == 0 ]; then
+ echo "feature_id is 0 for SA8185P"
+
+ #setting max gpu freq to 530 MHz
+ echo 3 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel
+ echo {class:ddr, res:fixed, val: 1804} > /sys/kernel/debug/aop_send_message
+ elif [ $feature_id == 1 ]; then
+ echo "feature_id is 1 for SA8195P"
+
+ #setting max gpu freq to 670 MHz
+ echo 0 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel
+ echo {class:ddr, res:fixed, val: 2092} > /sys/kernel/debug/aop_send_message
+ else
+ echo "unknown feature_id value" $feature_id
+ fi
+
echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
configure_memory_parameters
;;
esac
case "$target" in
+ "kona")
+
+ ddr_type=`od -An -tx /proc/device-tree/memory/ddr_device_type`
+ ddr_type4="07"
+ ddr_type5="08"
+
+ # Core control parameters for gold
+ echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres
+ echo 30 > /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms
+ echo 3 > /sys/devices/system/cpu/cpu4/core_ctl/task_thres
+
+ # Core control parameters for gold+
+ echo 0 > /sys/devices/system/cpu/cpu7/core_ctl/min_cpus
+ echo 60 > /sys/devices/system/cpu/cpu7/core_ctl/busy_up_thres
+ echo 30 > /sys/devices/system/cpu/cpu7/core_ctl/busy_down_thres
+ echo 100 > /sys/devices/system/cpu/cpu7/core_ctl/offline_delay_ms
+ echo 1 > /sys/devices/system/cpu/cpu7/core_ctl/task_thres
+ # Controls how many more tasks should be eligible to run on gold CPUs
+ # w.r.t number of gold CPUs available to trigger assist (max number of
+ # tasks eligible to run on previous cluster minus number of CPUs in
+ # the previous cluster).
+ #
+ # Setting to 1 by default which means there should be at least
+ # 4 tasks eligible to run on gold cluster (tasks running on gold cores
+ # plus misfit tasks on silver cores) to trigger assitance from gold+.
+ echo 1 > /sys/devices/system/cpu/cpu7/core_ctl/nr_prev_assist_thresh
+
+ # Disable Core control on silver
+ echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/enable
+
+ # Setting b.L scheduler parameters
+ echo 95 95 > /proc/sys/kernel/sched_upmigrate
+ echo 85 85 > /proc/sys/kernel/sched_downmigrate
+ echo 100 > /proc/sys/kernel/sched_group_upmigrate
+ echo 85 > /proc/sys/kernel/sched_group_downmigrate
+ echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
+ echo 400000000 > /proc/sys/kernel/sched_coloc_downmigrate_ns
+
+ # cpuset parameters
+ echo 0-3 > /dev/cpuset/background/cpus
+ echo 0-3 > /dev/cpuset/system-background/cpus
+
+ # Turn off scheduler boost at the end
+ echo 0 > /proc/sys/kernel/sched_boost
+
+ # configure governor settings for silver cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/down_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/up_rate_limit_us
+ if [ `cat /sys/devices/soc0/revision` == "2.0" ]; then
+ echo 1248000 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq
+ else
+ echo 1228800 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/hispeed_freq
+ fi
+ echo 691200 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
+ echo 1 > /sys/devices/system/cpu/cpufreq/policy0/schedutil/pl
+
+ # configure input boost settings
+ echo "0:1324800" > /sys/devices/system/cpu/cpu_boost/input_boost_freq
+ echo 120 > /sys/devices/system/cpu/cpu_boost/input_boost_ms
+
+ # configure governor settings for gold cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy4/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/down_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/up_rate_limit_us
+ echo 1574400 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/hispeed_freq
+ echo 1 > /sys/devices/system/cpu/cpufreq/policy4/schedutil/pl
+
+ # configure governor settings for gold+ cluster
+ echo "schedutil" > /sys/devices/system/cpu/cpufreq/policy7/scaling_governor
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/down_rate_limit_us
+ echo 0 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/up_rate_limit_us
+ if [ `cat /sys/devices/soc0/revision` == "2.0" ]; then
+ echo 1632000 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq
+ else
+ echo 1612800 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/hispeed_freq
+ fi
+ echo 1 > /sys/devices/system/cpu/cpufreq/policy7/schedutil/pl
+
+ # Enable bus-dcvs
+ for device in /sys/devices/platform/soc
+ do
+ for cpubw in $device/*cpu-cpu-llcc-bw/devfreq/*cpu-cpu-llcc-bw
+ do
+ echo "bw_hwmon" > $cpubw/governor
+ echo 40 > $cpubw/polling_interval
+ echo "4577 7110 9155 12298 14236 15258" > $cpubw/bw_hwmon/mbps_zones
+ echo 4 > $cpubw/bw_hwmon/sample_ms
+ echo 50 > $cpubw/bw_hwmon/io_percent
+ echo 20 > $cpubw/bw_hwmon/hist_memory
+ echo 10 > $cpubw/bw_hwmon/hyst_length
+ echo 30 > $cpubw/bw_hwmon/down_thres
+ echo 0 > $cpubw/bw_hwmon/guard_band_mbps
+ echo 250 > $cpubw/bw_hwmon/up_scale
+ echo 1600 > $cpubw/bw_hwmon/idle_mbps
+ echo 14236 > $cpubw/max_freq
+ done
+
+ for llccbw in $device/*cpu-llcc-ddr-bw/devfreq/*cpu-llcc-ddr-bw
+ do
+ echo "bw_hwmon" > $llccbw/governor
+ echo 40 > $llccbw/polling_interval
+ if [ ${ddr_type:4:2} == $ddr_type4 ]; then
+ echo "1720 2086 2929 3879 5161 5931 6881 7980" > $llccbw/bw_hwmon/mbps_zones
+ elif [ ${ddr_type:4:2} == $ddr_type5 ]; then
+ echo "1720 2086 2929 3879 5931 6881 7980 10437" > $llccbw/bw_hwmon/mbps_zones
+ fi
+ echo 4 > $llccbw/bw_hwmon/sample_ms
+ echo 80 > $llccbw/bw_hwmon/io_percent
+ echo 20 > $llccbw/bw_hwmon/hist_memory
+ echo 10 > $llccbw/bw_hwmon/hyst_length
+ echo 30 > $llccbw/bw_hwmon/down_thres
+ echo 0 > $llccbw/bw_hwmon/guard_band_mbps
+ echo 250 > $llccbw/bw_hwmon/up_scale
+ echo 1600 > $llccbw/bw_hwmon/idle_mbps
+ echo 6881 > $llccbw/max_freq
+ done
+
+ for npubw in $device/*npu*-ddr-bw/devfreq/*npu*-ddr-bw
+ do
+ echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
+ echo "bw_hwmon" > $npubw/governor
+ echo 40 > $npubw/polling_interval
+ if [ ${ddr_type:4:2} == $ddr_type4 ]; then
+ echo "1720 2086 2929 3879 5931 6881 7980" > $npubw/bw_hwmon/mbps_zones
+ elif [ ${ddr_type:4:2} == $ddr_type5 ]; then
+ echo "1720 2086 2929 3879 5931 6881 7980 10437" > $npubw/bw_hwmon/mbps_zones
+ fi
+ echo 4 > $npubw/bw_hwmon/sample_ms
+ echo 160 > $npubw/bw_hwmon/io_percent
+ echo 20 > $npubw/bw_hwmon/hist_memory
+ echo 10 > $npubw/bw_hwmon/hyst_length
+ echo 30 > $npubw/bw_hwmon/down_thres
+ echo 0 > $npubw/bw_hwmon/guard_band_mbps
+ echo 250 > $npubw/bw_hwmon/up_scale
+ echo 1600 > $npubw/bw_hwmon/idle_mbps
+ echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
+ done
+
+ for npullccbw in $device/*npu*-llcc-bw/devfreq/*npu*-llcc-bw
+ do
+ echo 1 > /sys/devices/virtual/npu/msm_npu/pwr
+ echo "bw_hwmon" > $npullccbw/governor
+ echo 40 > $npullccbw/polling_interval
+ echo "4577 7110 9155 12298 14236 15258" > $npullccbw/bw_hwmon/mbps_zones
+ echo 4 > $npullccbw/bw_hwmon/sample_ms
+ echo 160 > $npullccbw/bw_hwmon/io_percent
+ echo 20 > $npullccbw/bw_hwmon/hist_memory
+ echo 10 > $npullccbw/bw_hwmon/hyst_length
+ echo 30 > $npullccbw/bw_hwmon/down_thres
+ echo 0 > $npullccbw/bw_hwmon/guard_band_mbps
+ echo 250 > $npullccbw/bw_hwmon/up_scale
+ echo 1600 > $npullccbw/bw_hwmon/idle_mbps
+ echo 0 > /sys/devices/virtual/npu/msm_npu/pwr
+ done
+ #Enable mem_latency governor for L3 scaling
+ for memlat in $device/*qcom,devfreq-l3/*cpu*-lat/devfreq/*cpu*-lat
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable cdspl3 governor for L3 cdsp nodes
+ for l3cdsp in $device/*qcom,devfreq-l3/*cdsp-l3-lat/devfreq/*cdsp-l3-lat
+ do
+ echo "cdspl3" > $l3cdsp/governor
+ done
+
+ #Enable mem_latency governor for LLCC and DDR scaling
+ for memlat in $device/*cpu*-lat/devfreq/*cpu*-lat
+ do
+ echo "mem_latency" > $memlat/governor
+ echo 10 > $memlat/polling_interval
+ echo 400 > $memlat/mem_latency/ratio_ceil
+ done
+
+ #Enable compute governor for gold latfloor
+ for latfloor in $device/*cpu-ddr-latfloor*/devfreq/*cpu-ddr-latfloor*
+ do
+ echo "compute" > $latfloor/governor
+ echo 10 > $latfloor/polling_interval
+ done
+
+ #Gold L3 ratio ceil
+ for l3gold in $device/*qcom,devfreq-l3/*cpu4-cpu-l3-lat/devfreq/*cpu4-cpu-l3-lat
+ do
+ echo 4000 > $l3gold/mem_latency/ratio_ceil
+ done
+
+ #Prime L3 ratio ceil
+ for l3prime in $device/*qcom,devfreq-l3/*cpu7-cpu-l3-lat/devfreq/*cpu7-cpu-l3-lat
+ do
+ echo 20000 > $l3prime/mem_latency/ratio_ceil
+ done
+
+ #Enable mem_latency governor for qoslat
+ for qoslat in $device/*qoslat/devfreq/*qoslat
+ do
+ echo "mem_latency" > $qoslat/governor
+ echo 10 > $qoslat/polling_interval
+ echo 50 > $qoslat/mem_latency/ratio_ceil
+ done
+ done
+ echo N > /sys/module/lpm_levels/parameters/sleep_disabled
+ configure_memory_parameters
+ ;;
+esac
+
+case "$target" in
"msm8998" | "apq8098_latv")
echo 2 > /sys/devices/system/cpu/cpu4/core_ctl/min_cpus
@@ -4521,44 +5437,11 @@ case "$target" in
"msm8660" | "msm8960" | "msm8226" | "msm8610" | "mpq8092" )
start mpdecision
;;
- "msm8916")
- setprop vendor.post_boot.parsed 1
-
- if [ -f /sys/devices/soc0/soc_id ]; then
- soc_id=`cat /sys/devices/soc0/soc_id`
- else
- soc_id=`cat /sys/devices/system/soc/soc0/id`
- fi
- case $soc_id in
- "239" | "241" | "263" | "268" | "269" | "270" | "271")
- setprop vendor.min_freq_0 960000
- setprop vendor.min_freq_4 800000
- ;;
- "206" | "247" | "248" | "249" | "250" | "233" | "240" | "242")
- setprop vendor.min_freq_0 800000
- ;;
- esac
- ;;
- "msm8909")
- setprop vendor.post_boot.parsed 1
- ;;
- "msm8952")
- setprop vendor.post_boot.parsed 1
- ;;
- "msm8937" | "msm8953")
- setprop vendor.post_boot.parsed 1
-
- low_ram_enable=`getprop ro.config.low_ram`
-
- if [ "$low_ram_enable" != "true" ]; then
- start gamed
- fi
- ;;
"msm8974")
start mpdecision
echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb
;;
- "msm8994" | "msm8992" | "msm8996" | "msm8998" | "sdm660" | "apq8098_latv" | "sdm845" | "sdm710" | "msmnile" | "qcs605" | "sm6150" | "trinket")
+ "msm8909" | "msm8916" | "msm8937" | "msm8952" | "msm8953" | "msm8994" | "msm8992" | "msm8996" | "msm8998" | "sdm660" | "apq8098_latv" | "sdm845" | "sdm710" | "msmnile" | "sdmshrike" |"msmsteppe" | "sm6150" | "kona" | "lito" | "trinket" | "atoll" | "bengal" )
setprop vendor.post_boot.parsed 1
;;
"apq8084")
@@ -4706,6 +5589,18 @@ if [ -f /sys/devices/soc0/select_image ]; then
echo $oem_version > /sys/devices/soc0/image_crm_version
fi
+# Change console log level as per console config property
+console_config=`getprop persist.console.silent.config`
+case "$console_config" in
+ "1")
+ echo "Enable console config to $console_config"
+ echo 0 > /proc/sys/kernel/printk
+ ;;
+ *)
+ echo "Enable console config to $console_config"
+ ;;
+esac
+
# Parse misc partition path and set property
misc_link=$(ls -l /dev/block/bootdevice/by-name/misc)
real_path=${misc_link##*>}
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc
index c039fa2..426ea48 100644
--- a/rootdir/etc/init.qcom.rc
+++ b/rootdir/etc/init.qcom.rc
@@ -66,9 +66,12 @@ on early-boot
# set RLIMIT_MEMLOCK to 64MB
setrlimit 8 67108864 67108864
# Allow subsystem (modem etc) debugging
+ write /sys/kernel/debug/bootkpi/kpi_values "M - Start adsp"
write /sys/kernel/boot_adsp/boot 1
write /sys/kernel/boot_cdsp/boot 1
+ write /sys/devices/virtual/npu/msm_npu/boot 1
write /sys/kernel/boot_slpi/boot 1
+ write /sys/devices/virtual/cvp/cvp/boot 1
exec u:r:qti_init_shell:s0 -- /vendor/bin/init.qcom.early_boot.sh
exec u:r:qti_init_shell:s0 -- /vendor/bin/init.qti.can.sh
@@ -93,6 +96,9 @@ on early-boot
chown system system /mnt/vendor/persist/sensors/registry/config
chmod 0664 /mnt/vendor/persist/sensors/sensors_settings
+ chown system system /mnt/vendor/persist/data/pfm/licenses
+ chmod 0775 /mnt/vendor/persist/data/pfm/licenses
+
on boot
chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
@@ -107,7 +113,6 @@ on boot
chown system system /sys/kernel/debug/msm_core/enable
chown system system /sys/kernel/debug/msm_core/ptable
chown system system /sys/kernel/boot_slpi/ssr
- chown system system /sys/kernel/boot_adsp/ssr
chown system system /sys/module/radio_iris_transport/parameters/fmsmd_set
chmod 0660 /sys/module/bluetooth_power/parameters/power
chmod 0660 /sys/module/hci_smd/parameters/hcismd_set
@@ -127,15 +132,11 @@ on boot
chown bluetooth net_bt /sys/class/rfkill/rfkill0/device/extldo
chmod 0660 /sys/class/rfkill/rfkill0/device/extldo
- #Create QMUX deamon socket area
+ # This location is used by QCRIL to host UNIX domain
+ # socket files used for internal IPC within QCRIL
+ # modules
mkdir /dev/socket/qmux_radio 0770 radio radio
chmod 2770 /dev/socket/qmux_radio
- mkdir /dev/socket/qmux_audio 0770 media audio
- chmod 2770 /dev/socket/qmux_audio
- mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
- chmod 2770 /dev/socket/qmux_bluetooth
- mkdir /dev/socket/qmux_gps 0770 gps gps
- chmod 2770 /dev/socket/qmux_gps
mkdir /persist/drm 0770 system system
mkdir /mnt/vendor/persist/bluetooth 0770 bluetooth bluetooth
@@ -143,24 +144,26 @@ on boot
mkdir /mnt/vendor/persist/alarm 0770 system system
mkdir /mnt/vendor/persist/time 0770 system system
mkdir /mnt/vendor/persist/secnvm 0770 system system
+ mkdir /mnt/vendor/persist/iar_db 0770 system system
+ mkdir /mnt/vendor/spunvm 0770 system system
- #Create NETMGR daemon socket area
- mkdir /dev/socket/netmgr 0750 radio radio
+ #Create WIGIG socket area
+ mkdir /dev/socket/wigig 0770 wifi wifi
setprop wifi.interface wlan0
setprop ro.telephony.call_ring.multiple false
+ #enable camera read sensors data
+ setprop persist.camera.gyro.disable 0
+
#Remove SUID bit for iproute2 ip tool
chmod 0755 /system/bin/ip
chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
- # Assign TCP buffer thresholds to be ceiling value of technology maximums
- # Increased technology maximums should be reflected here.
- write /proc/sys/net/core/rmem_max 16777216
- write /proc/sys/net/core/wmem_max 8388608
+ setprop net.tcp.2g_init_rwnd 10
# To prevent out of order acknowledgements from making
# connection tracking to treat them as not belonging to
@@ -180,13 +183,20 @@ on boot
# bond0 used by FST Manager
chown wifi wifi /sys/class/net/bond0/bonding/queue_id
+ # Allow access to emmc rawdump block partition and dload sysfs node
+ chown root system /dev/block/bootdevice/by-name/rawdump
+ chmod 0660 /dev/block/bootdevice/by-name/rawdump
chown root system /sys/kernel/dload/emmc_dload
chmod 0660 /sys/kernel/dload/emmc_dload
+ chown root system /dev/block/bootdevice/by-name/ramdump
+ chmod 0660 /dev/block/bootdevice/by-name/ramdump
chown root system /sys/kernel/dload/dload_mode
chmod 0660 /sys/kernel/dload/dload_mode
chown system system /sys/class/backlight/panel0-backlight/brightness
chown system system /sys/class/backlight/panel0-backlight/max_brightness
+ chown system system /sys/class/backlight/panel1-backlight/brightness
+ chown system system /sys/class/backlight/panel1-backlight/max_brightness
# Allow access to sensors device attributes
chown system system /sys/class/sensors/MPU6050-accel/enable
@@ -210,6 +220,10 @@ on boot
# Create hvdcp_opti directory
mkdir /mnt/vendor/persist/hvdcp_opti 0770 root system
+ #sensors log dir
+ mkdir /data/vendor/sensors
+ chown system system /data/vendor/sensors
+
# msm specific files that need to be created on /data
on post-fs-data
mkdir /data/vendor/misc 01771 system system
@@ -226,12 +240,6 @@ on post-fs-data
# Create directory used by media clients
mkdir /data/vendor/media 0770 mediacodec media
- # create QDMA dropbox
- mkdir /data/vendor/qdmastats 0700 system system
- mkdir /data/vendor/qdma 0770 system system
- mkdir /dev/socket/qdma 0777 system system
- chmod 2777 /dev/socket/qdma
-
# Create /data/vendor/tzstorage directory for SFS listener
mkdir /data/vendor/tzstorage 0770 system system
@@ -241,8 +249,10 @@ on post-fs-data
#Create folder of camera
mkdir /data/vendor/camera 0770 camera camera
- #Change ownership to system
- chown system system /data/vendor/tombstones
+
+ #Create directory for tftp
+ mkdir /data/vendor/tombstones 0771 system system
+ mkdir /data/vendor/tombstones/rfs 0771 system system
mkdir /data/vendor/ramdump 0771 root system
mkdir /data/vendor/bluetooth 0770 bluetooth bluetooth
@@ -258,21 +268,8 @@ on post-fs-data
mkdir /data/vendor/wifi/wpa 0770 wifi wifi
mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
- #create port-bridge log dir
- mkdir /data/vendor/port_bridge 0770 radio radio
- chmod 0770 /data/vendor/port_bridge
-
- #create netmgr log dir
- mkdir /data/vendor/netmgr 0770 radio radio
- chmod 0770 /data/vendor/netmgr
-
- #create ipacm log dir
- mkdir /data/vendor/ipa 0770 radio radio
- chmod 0770 /data/vendor/ipa
-
- #Create QTI dir for logs
- mkdir /data/vendor/dataqti 0770 radio radio
- chmod 0770 /data/vendor/dataqti
+ # Create the directories used by WiGig Sensing
+ mkdir /data/vendor/sensing 0770 system wifi
# Create the directories used by CnE subsystem
mkdir /data/vendor/connectivity 0771 radio radio
@@ -287,6 +284,7 @@ on post-fs-data
# Create directory for radio
mkdir /data/vendor/radio 0770 system radio
+ rm /data/vendor/radio/shmbus
# Create directory for modem_config
mkdir /data/vendor/modem_config 0570 radio root
@@ -308,6 +306,7 @@ on post-fs-data
chown system system /sys/devices/platform/msm_sdcc.4/polling
#Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
+ mkdir /data/system 0775 system system
#symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
#Create directories for Location services
@@ -317,18 +316,17 @@ on post-fs-data
mkdir /dev/socket/location 0770 gps gps
mkdir /dev/socket/location/mq 0770 gps gps
mkdir /dev/socket/location/xtra 0770 gps gps
- mkdir /data/vendor/location-partner 0770 gps gps
- mkdir /data/vendor/location-partner/dre 0770 gps gps
- mkdir /data/vendor/location-partner/ppe 0770 gps gps
- mkdir /dev/socket/location 0770 gps gps
- mkdir /dev/socket/location/ehub 0770 gps gps
+
+ #Create directories for wifihal services
+ mkdir /dev/socket/wifihal 0770 wifi wifi
+ chmod 2770 /dev/socket/wifihal
# Create /data/time folder for time-services
mkdir /data/vendor/time/ 0700 system system
setprop vold.post_fs_data_done 1
- # Create FM dir for patchdownloader
+ #Create FM dir for patchdownloader
mkdir /data/vendor/fm 0770 system system
chmod 0770 /data/vendor/fm
@@ -380,7 +378,7 @@ on post-fs-data
mkdir /data/vendor/vpp 0770 media media
#Create dir for TUI
- mkdir /data/vendor/tui 0700 system system
+ mkdir /data/vendor/tui 0700 system drmrpc
#Start move time data to /data/vendor once post-fs-data done
start vendor.move_time_data
@@ -432,17 +430,17 @@ on property:ro.vendor.iocgrp.config=1
write /dev/blkio/blkio.weight 1000
write /dev/blkio/bg/blkio.weight 100
-on property:persist.vendor.sys.ssr.enable_debug=*
- write /sys/module/subsystem_restart/parameters/enable_debug ${persist.vendor.sys.ssr.enable_debug}
+on property:persist.sys.ssr.enable_debug=*
+ write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug}
-on property:persist.vendor.sys.mba_boot_timeout=*
- write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.vendor.sys.mba_boot_timeout}
+on property:persist.sys.mba_boot_timeout=*
+ write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout}
-on property:persist.vendor.sys.modem_auth_timeout=*
- write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.vendor.sys.modem_auth_timeout}
+on property:persist.sys.modem_auth_timeout=*
+ write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout}
-on property:persist.vendor.sys.pil_proxy_timeout=*
- write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.vendor.sys.pil_proxy_timeout}
+on property:persist.sys.pil_proxy_timeout=*
+ write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout}
on property:persist.vendor.ssr.restart_level=*
start vendor.ssr_setup
@@ -455,11 +453,18 @@ on property:persist.vendor.ssr.enable_ramdumps=1
on property:persist.vendor.ssr.enable_ramdumps=0
write /sys/module/subsystem_restart/parameters/enable_ramdumps 0
+on property:persist.vendor.sys.rawdump_copy=1
+ write /sys/kernel/dload/emmc_dload 1
+
+on property:persist.vendor.sys.rawdump_copy=0
+ write /sys/kernel/dload/emmc_dload 0
+
on property:sys.boot_completed=1
write /dev/kmsg "Boot completed "
- #Reset read ahead for dm-0 and dm-1 to 512kb
+ #Reset read ahead for dm-0, dm-1 and dm-2 to 512kb
write /sys/block/dm-0/queue/read_ahead_kb 512
write /sys/block/dm-1/queue/read_ahead_kb 512
+ write /sys/block/dm-2/queue/read_ahead_kb 512
#WDSP FW boot sysfs node used by STHAL
chown media audio /sys/kernel/wdsp0/boot
chown media audio /sys/kernel/wcd_cpe0/fw_name
@@ -487,18 +492,15 @@ on property:vendor.bluetooth.dun.status=stopped
on property:ro.bluetooth.ftm_enabled=true
start ftmd
-on property:vendor.bluetooth.startbtsnoop=true
- start vendor.btsnoop
-
-on property:vendor.bluetooth.startbtsnoop=false
- stop vendor.btsnoop
-
on property:vendor.bluetooth.startbtlogger=true
start vendor.bt_logger
on property:vendor.bluetooth.startbtlogger=false
stop vendor.bt_logger
+on property:vendor.media.target.version=*
+ setprop vendor.sys.media.target.version ${vendor.media.target.version}
+
service qcom-c_core-sh /vendor/bin/init.qcom.class_core.sh
class core
user root
@@ -507,17 +509,12 @@ service qcom-c_core-sh /vendor/bin/init.qcom.class_core.sh
service qcom-c_main-sh /vendor/bin/init.class_main.sh
class main
user root
- oneshot
-
-service qcom-c_late-sh /vendor/bin/init.class_late.sh
- class late_start
- user root
+ group root system
oneshot
on property:vold.decrypt=trigger_restart_framework
start qcom-c_main-sh
start wcnss-service
- start qcom-c_late-sh
on property:persist.env.fastdorm.enabled=true
setprop persist.radio.data_no_toggle 1
@@ -533,29 +530,6 @@ service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config"
user root
oneshot
-service vendor.rmt_storage /vendor/bin/rmt_storage
- class core
- user root
- shutdown critical
- ioprio rt 0
-
-service vendor.tftp_server /vendor/bin/tftp_server
- class core
- user root
-
-on property:vendor.wc_transport.start_hci=true
- start vendor.start_hci_filter
-
-on property:vendor.wc_transport.start_hci=false
- stop vendor.start_hci_filter
-
-service vendor.start_hci_filter /system/vendor/bin/wcnss_filter
- class late_start
- user bluetooth
- group bluetooth diag system wakelock
- seclabel u:r:bluetooth:s0
- disabled
-
service vendor.bt-dun /system/bin/dun-server /dev/smd7 /dev/rfcomm0
class late_start
user bluetooth
@@ -563,13 +537,6 @@ service vendor.bt-dun /system/bin/dun-server /dev/smd7 /dev/rfcomm0
disabled
oneshot
-service vendor.btsnoop /system/bin/btsnoop
- user bluetooth
- group bluetooth net_bt_admin sdcard_rw sdcard_r media_rw
- class late_start
- disabled
- oneshot
-
service vendor.bt_logger /system/bin/bt_logger
user bluetooth
group bluetooth net_bt_admin sdcard_rw sdcard_r media_rw
@@ -584,60 +551,17 @@ service ftmd /system/bin/logwrapper /system/bin/ftmdaemon
disabled
oneshot
-service vendor.port-bridge /system/vendor/bin/port-bridge
- class main
- user radio
- group radio system inet
- disabled
- oneshot
-
service qmiproxy /system/bin/qmiproxy
class main
user radio
group radio diag
disabled
-# QMUX must be in multiple groups to support external process connections
-service vendor.qmuxd /system/vendor/bin/qmuxd
- class main
- user root
- group radio audio bluetooth gps nfc diag
- disabled
-
-service vendor.netmgrd /system/vendor/bin/netmgrd
- class main
- disabled
-
-service vendor.ipacm-diag /system/vendor/bin/ipacm-diag
- class main
- user radio
- socket ipacm_log_file dgram 660 radio radio
- group radio diag oem_2901
- disabled
-
-service vendor.ipacm /system/vendor/bin/ipacm
- class main
- user radio
- group radio inet
- disabled
-
-service vendor.dataqti /system/vendor/bin/qti
- class main
- user radio
- group radio oem_2901 diag usb net_admin
- disabled
-
-service vendor.dataadpl /system/vendor/bin/adpl
- class main
- user radio
- group radio oem_2901 diag usb net_admin
- disabled
-
-service vendor.sensors /vendor/bin/sscrpcd
- class core
+service vendor.sensors /vendor/bin/sscrpcd sensorspd
+ class early_hal
user system
- group system
- disabled
+ group system wakelock
+ capabilities BLOCK_SUSPEND
service vendor.sensors.qti /vendor/bin/sensors.qti
class core
@@ -645,10 +569,6 @@ service vendor.sensors.qti /vendor/bin/sensors.qti
group system
disabled
-on property:ro.vendor.use_data_netmgrd=false
- # netmgr not supported on specific target
- stop vendor.netmgrd
-
# Adjust socket buffer to enlarge TCP receive window for high bandwidth
# but only if ro.data.large_tcp_window_size property is set.
on property:ro.data.large_tcp_window_size=true
@@ -666,7 +586,6 @@ service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
# group wifi inet keystore
interface android.hardware.wifi.supplicant@1.0::ISupplicant default
interface android.hardware.wifi.supplicant@1.1::ISupplicant default
- interface android.hardware.wifi.supplicant@1.2::ISupplicant default
class main
socket vendor_wpa_wlan0 dgram 660 wifi wifi
disabled
@@ -676,14 +595,14 @@ service vendor.wigig_supplicant /vendor/bin/hw/wpa_supplicant \
-iwigig0 -Dnl80211 -c/data/vendor/wifi/wigig_supplicant.conf \
-m/data/vendor/wifi/wigig_p2p_supplicant.conf \
-O/data/vendor/wifi/wigig_sockets -dd \
- -e/data/vendor/wifi/wigig_entropy.bin -g@android:wpa_wigig0 \
+ -e/data/vendor/wifi/wigig_entropy.bin -g@android:wigig/wpa_wigig0 \
-S wigigsvc
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
- socket wpa_wigig0 dgram 660 wifi wifi
+ socket wigig/wpa_wigig0 dgram 660 wifi wifi
disabled
oneshot
@@ -695,41 +614,23 @@ service vendor.move_wifi_data /system/bin/move_wifi_data.sh
disabled
oneshot
-# FST Manager with hostapd (softap) - all settings inside ini file
-service fstman /vendor/bin/fstman -B -ddd -c /data/vendor/wifi/fstman.ini -a 1
- user wifi
- group wifi
- capabilities NET_ADMIN NET_RAW
- class main
- disabled
- oneshot
-
-# FST Manager with supplicant - connect to supplicant socket
-service fstman_wlan0 /vendor/bin/fstman -B -ddd -c /data/vendor/wifi/fstman.ini \
- -a 0 @android:vendor_wpa_wlan0
- user wifi
- group wifi
- capabilities NET_ADMIN NET_RAW
- class main
- disabled
- oneshot
-
-service wigighalsvc /vendor/bin/wigighalsvc
- interface vendor.qti.hardware.wigig.supptunnel@1.0::ISuppTunnelProvider default
+service wigignpt /vendor/bin/wigignpt
+ interface vendor.qti.hardware.wigig.netperftuner@1.0::INetPerfTuner default
class hal
+ socket wigig/wigignpt stream 660 system wifi
user system
group wifi
- # needed for on-demand insmod/rmmod of wigig module
- capabilities SYS_MODULE
+ capabilities NET_ADMIN
disabled
-service wigignpt /vendor/bin/wigignpt
- interface vendor.qti.hardware.wigig.netperftuner@1.0::INetPerfTuner default
+on property:persist.vendor.wigig.npt.enable=1
+ start wigignpt
+
+service vendor.sensingdaemon /vendor/bin/sensingdaemon
class hal
- socket wigignpt stream 660 system wifi
+ socket wigig/sensingdaemon stream 660 system wifi
user system
group wifi
- capabilities NET_ADMIN
disabled
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG
@@ -795,18 +696,6 @@ service wifi_ftmd /system/vendor/bin/wifi_ftmd
on property:vendor.wifi.ftmd.load=true
insmod /system/lib/modules/pronto/pronto_wlan.ko con_mode=5
-on property:persist.vendor.data.shs_ko_load=1
- exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules rmnet_shs
-
-on property:persist.vendor.data.shs_ko_load=0
- exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -r -d /vendor/lib/modules rmnet_shs
-
-on property:persist.vendor.data.perf_ko_load=1
- exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -a -d /vendor/lib/modules rmnet_perf
-
-on property:persist.vendor.data.perf_ko_load=0
- exec u:r:vendor_modprobe:s0 -- /vendor/bin/modprobe -r -d /vendor/lib/modules rmnet_perf
-
service cnss-daemon /system/vendor/bin/cnss-daemon -n -l
class late_start
user system
@@ -845,11 +734,6 @@ service mlid /vendor/bin/mlid
group gps
socket mlid stream 0666 gps gps
-service vendor.qdmastatsd /system/vendor/bin/qdmastatsd
- class late_start
- user system
- group readproc system net_bw_stats radio vendor_rfs_shared
-
service loc_launcher /system/vendor/bin/loc_launcher
class late_start
user gps
@@ -929,10 +813,8 @@ service vendor.atfwd /vendor/bin/ATFWD-daemon
class late_start
user system
group system radio
- disabled
service hostapd_fst /vendor/bin/hw/hostapd -dd -g /data/vendor/wifi/hostapd/global
- interface android.hardware.wifi.hostapd@1.0::IHostapd default
class main
capabilities NET_ADMIN NET_RAW
user wifi
@@ -985,10 +867,12 @@ service profiler_daemon /system/bin/profiler_daemon
group root
disabled
-service charger /charger
+service charger /system/bin/charger
class charger
- group system graphics
- seclabel u:r:healthd:s0
+ user system
+ group system graphics input
+ capabilities SYS_BOOT
+ seclabel u:r:charger:s0
service vendor.ssr_diag /system/vendor/bin/ssr_diag
class late_start
@@ -1107,14 +991,25 @@ service poweroffhandler /system/vendor/bin/poweroffhandler
disabled
oneshot
-
on property:vendor.display.lcd_density=*
setprop ro.sf.lcd_density ${vendor.display.lcd_density}
-service vendor.vppservice /vendor/bin/vppservice
+# Logcat dump daemon, dumps logs to logdump partition
+service logdumpd /system/bin/logcat -b all -v threadtime -D -w /dev/block/bootdevice/by-name/logdump
+ class core
+ writepid /dev/cpuset/system-background/tasks
+ seclabel u:r:logdumpd:s0
+ disabled
+
+# Logdumpd is enabled only for userdebug non-perf build
+on property:ro.logdumpd.enabled=1
+ start logdumpd
+
+service time_daemon /vendor/bin/time_daemon
class main
- user media
- group camera
+ user system
+ group system
+ capabilities SYS_TIME
# Set vendor-ril lib path based on Meta version
on property:vendor.rild.libpath=*
@@ -1155,7 +1050,6 @@ service chre /vendor/bin/chre
socket chre seqpacket 0660 root system
shutdown critical
-
on property:vendor.chre.enabled=0
stop chre
@@ -1173,18 +1067,12 @@ on property:vendor.opengles.version=*
on property:vendor.gpu.available_frequencies=*
setprop ro.vendor.gpu.available_frequencies ${vendor.gpu.available_frequencies}
-service vendor.wifilearner /system/vendor/bin/wifilearner
- class main
- user wifi
- group wifi
- oneshot
-
service vendor.audio-hal-2-0 /vendor/bin/hw/android.hardware.audio@2.0-service
override
class hal
user audioserver
# media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
- group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct oem_2901 wakelock system
+ group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct oem_2901 wakelock
capabilities BLOCK_SUSPEND
ioprio rt 4
writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
@@ -1192,6 +1080,7 @@ service vendor.audio-hal-2-0 /vendor/bin/hw/android.hardware.audio@2.0-service
# and its .rc file has an "onrestart restart audio-hal" rule, thus
# an additional auto-restart from the init process isn't needed.
oneshot
+ interface android.hardware.audio@5.0::IDevicesFactory default
interface android.hardware.audio@4.0::IDevicesFactory default
interface android.hardware.audio@2.0::IDevicesFactory default
diff --git a/rootdir/bin/init.qcom.sensors.sh b/rootdir/etc/init.qcom.sensors.sh
index daf7de2..daf7de2 100644
--- a/rootdir/bin/init.qcom.sensors.sh
+++ b/rootdir/etc/init.qcom.sensors.sh
diff --git a/rootdir/bin/init.qcom.sh b/rootdir/etc/init.qcom.sh
index 1b811c3..02c0394 100644
--- a/rootdir/bin/init.qcom.sh
+++ b/rootdir/etc/init.qcom.sh
@@ -84,7 +84,7 @@ start_msm_irqbalance_8939()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
case "$platformid" in
- "239" | "293" | "294" | "295" | "304" | "338" | "313" |"353" | "354")
+ "239" | "293" | "294" | "295" | "304" | "338" | "313" | "353" | "354")
start vendor.msm_irqbalance;;
"349" | "350" )
start vendor.msm_irqbal_lb;;
@@ -99,11 +99,32 @@ start_msm_irqbalance_msmnile()
fi
}
+start_msm_irqbalance_kona()
+{
+ if [ -f /vendor/bin/msm_irqbalance ]; then
+ start vendor.msm_irqbalance
+ fi
+}
+
+start_msm_irqbalance_lito()
+{
+ if [ -f /vendor/bin/msm_irqbalance ]; then
+ start vendor.msm_irqbalance
+ fi
+}
+
+start_msm_irqbalance_atoll()
+{
+ if [ -f /vendor/bin/msm_irqbalance ]; then
+ start vendor.msm_irqbalance
+ fi
+}
+
start_msm_irqbalance660()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
case "$platformid" in
- "317" | "324" | "325" | "326" | "345" | "346")
+ "317" | "321" | "324" | "325" | "326" | "336" | "345" | "346" | "360" | "393")
start vendor.msm_irqbalance;;
"318" | "327" | "385")
start vendor.msm_irqbl_sdm630;;
@@ -114,7 +135,7 @@ start_msm_irqbalance660()
start_msm_irqbalance()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
- start vendor.msm_irqbalance
+ start vendor.msm_irqbalance
fi
}
@@ -197,7 +218,7 @@ case "$target" in
fi
case "$soc_id" in
- "317" | "324" | "325" | "326" | "318" | "327" | "385" )
+ "317" | "324" | "325" | "326" | "318" | "327" )
case "$hw_platform" in
"Surf")
setprop qemu.hw.mainkeys 0
@@ -267,7 +288,7 @@ case "$target" in
;;
esac
;;
- "msm8994" | "msm8992" | "msm8998" | "apq8098_latv" | "sdm845" | "sdm710" | "qcs605" | "sm6150" | "trinket")
+ "msm8994" | "msm8992" | "msm8998" | "apq8098_latv" | "sdm845" | "sdm710" | "qcs605" | "sm6150" | "trinket" | "bengal")
start_msm_irqbalance
;;
"msm8996")
@@ -297,6 +318,15 @@ case "$target" in
"msmnile")
start_msm_irqbalance_msmnile
;;
+ "kona")
+ start_msm_irqbalance_kona
+ ;;
+ "lito")
+ start_msm_irqbalance_lito
+ ;;
+ "atoll")
+ start_msm_irqbalance_atoll
+ ;;
"msm8937")
start_msm_irqbalance_8939
if [ -f /sys/devices/soc0/soc_id ]; then
@@ -376,7 +406,7 @@ case "$target" in
hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
fi
case "$soc_id" in
- "336" | "337" | "347" | "360" | "393" | "370" | "371" )
+ "336" | "337" | "347" | "360" | "393" )
case "$hw_platform" in
"Surf")
setprop qemu.hw.mainkeys 0
diff --git a/rootdir/etc/init.qcom.usb.rc b/rootdir/etc/init.qcom.usb.rc
index cd85142..f2c3b0a 100644
--- a/rootdir/etc/init.qcom.usb.rc
+++ b/rootdir/etc/init.qcom.usb.rc
@@ -1,4 +1,4 @@
-# Copyright (c) 2011-2016, 2018 The Linux Foundation. All rights reserved.
+# Copyright (c) 2011-2016, 2018-2019 The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -30,7 +30,7 @@ on charger
mkdir /dev/usb-ffs/adb 0770 shell shell
mount configfs none /config
mkdir /config/usb_gadget/g1 0770 shell shell
- mkdir /config/usb_gadget/g1/strings/0x409 0770 shell shell
+ mkdir /config/usb_gadget/g1/strings/0x409 0770
write /config/usb_gadget/g1/bcdUSB 0x0200
write /config/usb_gadget/g1/os_desc/use 1
write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
@@ -73,6 +73,7 @@ on boot
mkdir /config/usb_gadget/g1/functions/ffs.adb
mkdir /config/usb_gadget/g1/functions/diag.diag
mkdir /config/usb_gadget/g1/functions/diag.diag_mdm
+ mkdir /config/usb_gadget/g1/functions/diag.diag_mdm2
mkdir /config/usb_gadget/g1/functions/cser.dun.0
mkdir /config/usb_gadget/g1/functions/cser.nmea.1
mkdir /config/usb_gadget/g1/functions/cser.dun.2
@@ -102,7 +103,7 @@ on boot
mkdir /dev/usb-ffs/adb 0770 shell system
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=1000,rmode=0770,fmode=0660
write /sys/class/android_usb/android0/f_ffs/aliases adb
- setprop sys.usb.mtp.device_type 2
+ setprop sys.mtp.device_type 2
setprop vendor.usb.controller ${sys.usb.controller}
enable vendor.qcom-usb-sh
@@ -118,6 +119,9 @@ on property:persist.vendor.usb.config=*
on boot && property:ro.boot.usbconfigfs=true
setprop sys.usb.configfs 1
+on property:vendor.usb.configfs=1 && property:sys.usb.configfs=0
+ setprop sys.usb.configfs 1
+
# Following are the parameters required for usb functionality. They provide configurable options like
# product_id/vendor id and allows specifying required functions:
#
diff --git a/rootdir/bin/init.qcom.usb.sh b/rootdir/etc/init.qcom.usb.sh
index b332530..caa7052 100644
--- a/rootdir/bin/init.qcom.usb.sh
+++ b/rootdir/etc/init.qcom.usb.sh
@@ -72,6 +72,9 @@ if [ "$(getprop persist.vendor.usb.config)" == "" -a \
;;
*)
case "$target" in
+ "msm8996")
+ setprop persist.vendor.usb.config diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb
+ ;;
"msm8909")
setprop persist.vendor.usb.config diag,serial_smd,rmnet_qti_bam,adb
;;
@@ -96,20 +99,13 @@ if [ "$(getprop persist.vendor.usb.config)" == "" -a \
setprop persist.vendor.usb.config diag,serial_smd,rmnet_ipa,adb
fi
;;
- "msm8996")
- if [ -d /config/usb_gadget ]; then
- setprop persist.vendor.usb.config diag,serial_cdev,rmnet,adb
- else
- setprop persist.vendor.usb.config diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb
- fi
- ;;
"msm8998" | "sdm660" | "apq8098_latv")
setprop persist.vendor.usb.config diag,serial_cdev,rmnet,adb
;;
"sdm845" | "sdm710")
setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb
;;
- "msmnile" | "sm6150" | "trinket")
+ "msmnile" | "sm6150" | "trinket" | "lito" | "atoll" | "bengal")
setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,qdss,adb
;;
*)
@@ -149,29 +145,9 @@ if [ "$target" == "msm8937" ]; then
*)
;;
esac
- else
- case "$soc_id" in
- "313" | "320")
- setprop vendor.usb.rndis.func.name "rndis_bam"
- setprop vendor.usb.rmnet.func.name "rmnet_bam"
- setprop vendor.usb.rmnet.inst.name "rmnet"
- setprop vendor.usb.dpl.inst.name "dpl"
- ;;
- *)
- ;;
- esac
fi
fi
-if [ "$target" == "msm8996" ]; then
- if [ -d /config/usb_gadget ]; then
- setprop vendor.usb.rndis.func.name "rndis_bam"
- setprop vendor.usb.rmnet.func.name "rmnet_bam"
- setprop vendor.usb.rmnet.inst.name "rmnet"
- setprop vendor.usb.dpl.inst.name "dpl"
- fi
-fi
-
# check configfs is mounted or not
if [ -d /config/usb_gadget ]; then
product_string=`cat /config/usb_gadget/g1/strings/0x409/product` 2> /dev/null
@@ -190,6 +166,7 @@ if [ -d /config/usb_gadget ]; then
serialno=1234567
echo $serialno > /config/usb_gadget/g1/strings/0x409/serialnumber
fi
+ setprop vendor.usb.configfs 1
fi
#
diff --git a/rootdir/etc/init.recovery.qcom.rc b/rootdir/etc/init.recovery.qcom.rc
new file mode 100644
index 0000000..71e6ce7
--- /dev/null
+++ b/rootdir/etc/init.recovery.qcom.rc
@@ -0,0 +1,60 @@
+# Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of The Linux Foundation nor
+# the names of its contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+on init
+ write /sys/class/backlight/panel0-backlight/brightness 200
+
+ mkdir /config
+ mount configfs none /config
+ mkdir /config/usb_gadget/g1 0770 shell shell
+ write /config/usb_gadget/g1/bcdUSB 0x0200
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0xd001
+ mkdir /config/usb_gadget/g1/strings/0x409 0770 shell shell
+ write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
+ write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
+ write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
+ mkdir /config/usb_gadget/g1/functions/ffs.adb
+ write /config/usb_gadget/g1/os_desc/use 1
+ write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
+ write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
+ setprop sys.usb.configfs 1
+
+on property:ro.boot.usbcontroller=*
+ setprop sys.usb.controller ${ro.boot.usbcontroller}
+
+on property:sys.usb.ffs.ready=1
+ mkdir /config/usb_gadget/g1/configs/b.1 0777 shell shell
+ symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
+ mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb"
+ symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+
+on fs
+ wait /dev/block/platform/soc/${ro.boot.bootdevice}
+ symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
diff --git a/rootdir/etc/init.target.rc b/rootdir/etc/init.target.rc
index 433a0b2..83f0499 100755..100644
--- a/rootdir/etc/init.target.rc
+++ b/rootdir/etc/init.target.rc
@@ -27,11 +27,6 @@
#
#
-on early-init
- mkdir /firmware 0771 system system
- mkdir /bt_firmware 0771 system system
- mkdir /dsp 0771 media media
-
on init
write /dev/stune/foreground/schedtune.sched_boost_no_override 1
write /dev/stune/top-app/schedtune.sched_boost_no_override 1
@@ -53,11 +48,9 @@ on fs
restorecon_recursive /mnt/vendor/persist
write /sys/kernel/boot_adsp/boot 1
- chmod 0664 /sys/class/thermal/thermal_message/sconfig
- chown system system /sys/class/thermal/thermal_message/sconfig
-
on post-fs
start vendor.qseecomd
+ exec - system system -- /vendor/bin/init.qti.qseecomd.sh
write /dev/ipa 1
on init
@@ -68,10 +61,7 @@ on post-fs-data
mkdir /data/tombstones/lpass 0771 system system
mkdir /data/tombstones/wcnss 0771 system system
mkdir /data/tombstones/dsps 0771 system system
-#D2SP has no hbtp feature
-# mkdir /data/vendor/hbtp 0750 system system
-#end
- mkdir /data/vendor/tloc 0700 system drmrpc
+ mkdir /data/vendor/hbtp 0750 system system
on boot
start rmt_storage
@@ -81,22 +71,36 @@ on boot
write /dev/cpuset/foreground/boost/cpus 0-7
write /dev/cpuset/background/cpus 0-7
write /dev/cpuset/system-background/cpus 0-7
- chown system system /mnt/vendor/persist/sensors/sns.reg
-#spk pa-cal lct-20180914
- chmod 0664 /dev/tiload_node
+ ####Regionalization config and prop files####
+ chmod 0644 /persist/speccfg/spec
+ chmod 0644 /persist/speccfg/devicetype
+ chmod 0644 /persist/speccfg/mbnversion
+ chmod 0644 /persist/speccfg/.not_triggered
+ chmod 0644 /persist/speccfg/vendor_ro.prop
+ chmod 0644 /persist/speccfg/vendor_persist.prop
+ chmod 0644 /persist/speccfg/submask
+ chmod 0644 /persist/speccfg/partition
+ chown system system /persist/speccfg/spec
+ chown system system /persist/speccfg/devicetype
+ chown system system /persist/speccfg/mbnversion
+ chown system system /persist/speccfg/.not_triggered
+ chown system system /persist/speccfg/vendor_ro.prop
+ chown system system /persist/speccfg/vendor_persist.prop
+ chown system system /persist/speccfg/submask
+ chown system system /persist/speccfg/partition
#Create folder dump yuv images while debugging
mkdir /data/vendor/camera 0770 camera camera
-# DT2W
- chown system system /proc/wake_node
- chmod 0660 /proc/wake_node
+#Load WLAN driver
+ insmod /vendor/lib/modules/qca_cld3_wlan.ko
#USB controller configuration
setprop vendor.usb.rndis.func.name "rndis_bam"
setprop vendor.usb.rmnet.func.name "rmnet_bam"
setprop vendor.usb.rmnet.inst.name "rmnet"
setprop vendor.usb.dpl.inst.name "dpl"
+ setprop vendor.usb.qdss.inst.name "qdss"
write /sys/module/usb_f_qcrndis/parameters/rndis_dl_max_xfer_size 15916
setprop sys.usb.configfs 1
@@ -151,16 +155,11 @@ on property:sys.shutdown.requested=*
#on property:sys.boot_completed=1
# start qrngp
#
-
service vendor.qseecomd /vendor/bin/qseecomd
class core
user root
group root
-#service mpdecision /system/vendor/bin/mpdecision --avg_comp
-# user root
-# disabled
-#
#service qosmgrd /system/bin/qosmgr /system/etc/qosmgr_rules.xml
# user system
# group system
@@ -183,11 +182,6 @@ service thermal-engine /system/vendor/bin/thermal-engine
# class core
# oneshot
#
-service time_daemon /vendor/bin/time_daemon
- class main
- user system
- group system
- capabilities SYS_TIME
service adsprpcd_root /vendor/bin/adsprpcd
class main
@@ -199,13 +193,11 @@ service adsprpcd /vendor/bin/adsprpcd audiopd
user media
group media
-#D2SP has no hbtp feature
-#service hbtp /system/vendor/bin/hbtp_daemon
-# class main
-# user system
-# group system
-# disabled
-#end
+service hbtp /system/vendor/bin/hbtp_daemon
+ class main
+ user system
+ group system
+ disabled
service audiod /system/vendor/bin/audiod
class late_start
@@ -367,14 +359,14 @@ service vendor.pd_mapper /system/vendor/bin/pd-mapper
on property:vendor.ims.QMI_DAEMON_STATUS=1
start vendor.imsdatadaemon
-#on property:vold.decrypt=trigger_restart_framework
-# start cnss_diag
+on property:vold.decrypt=trigger_restart_framework
+ start cnss_diag
service cnss_diag /system/vendor/bin/cnss_diag -q -f -t HELIUM
class main
user system
group system wifi inet sdcard_rw media_rw diag
- disabled
+ oneshot
service vendor.ims_rtp_daemon /system/vendor/bin/ims_rtp_daemon
class main
@@ -447,23 +439,9 @@ service seempd /system/bin/seempd
group system sdcard_rw
socket seempdw dgram 0666 system system
-service vendor.tlocd /vendor/bin/tloc_daemon
- class late_start
- user system
- group drmrpc gps net_raw
-
service vendor.hvdcp_opti /system/vendor/bin/hvdcp_opti
class main
user root
group system wakelock
-service smcinvoked /system/bin/smcinvoked
- class main
- user system
- group system
-
-on property:persist.sys.display_srgb=1
- write /sys/class/graphics/fb0/msm_fb_srgb 1
-on property:persist.sys.display_srgb=2
- write /sys/class/graphics/fb0/msm_fb_srgb 2
diff --git a/rootdir/etc/ueventd.qcom.rc b/rootdir/etc/ueventd.qcom.rc
index 72f85cc..8677655 100644
--- a/rootdir/etc/ueventd.qcom.rc
+++ b/rootdir/etc/ueventd.qcom.rc
@@ -55,8 +55,8 @@ firmware_directories /vendor/firmware_mnt/image/
/dev/dpl_ctrl 0660 usb usb
/dev/ipa_odl_ctl 0660 radio radio
/dev/ipa_adpl 0660 system oem_2905
-/dev/hab 0666 system system
/dev/synx_device 0660 root camera
+/dev/hab 0666 system system
#permissions for CSVT
/dev/smd11 0660 radio radio
@@ -124,22 +124,27 @@ firmware_directories /vendor/firmware_mnt/image/
/dev/at_usb0 0640 radio radio
/dev/at_mdm0 0640 radio radio
/dev/video* 0660 system camera
+/dev/cvp* 0660 system camera
/dev/media* 0660 system camera
/dev/v4l-subdev* 0660 system camera
/dev/qseecom 0660 system drmrpc
/dev/qce 0660 system drmrpc
-/dev/smcinvoke 0660 system system
+/dev/smcinvoke 0660 system drmrpc
/dev/qsee_ipc_irq_spss 0660 system drmrpc
/dev/seemplog 0660 system system
/dev/pft 0660 system drmrpc
/dev/spcom 0660 system system
+/dev/spss_utils 0660 system system
/dev/sp_kernel 0660 system system
+/dev/sp_nvm 0660 system system
/dev/sp_ssr 0660 system system
/dev/sp_keymaster 0660 system system
/dev/sec_nvm_* 0660 system system
/dev/cryptoapp 0660 system system
/dev/spdaemon_ssr 0660 system system
-/dev/cam-hyp-intf* 0660 system camera
+/dev/iuicc 0660 system system
+/dev/iuicc0 0660 system system
+/dev/iuicc1 0660 system system
/dev/gemini0 0660 system camera
/dev/jpeg0 0660 system camera
/dev/jpeg1 0660 system camera
@@ -149,20 +154,26 @@ firmware_directories /vendor/firmware_mnt/image/
/dev/adsprpc-smd-secure 0644 system system
/dev/system_health_monitor 0644 radio system
/dev/mdss_rotator 0664 system system
-/dev/cpu_dma_latency 0660 root system
#QDSS
/dev/byte-cntr 0660 system oem_2902
/dev/mhi_qdss 0660 system oem_2902
/sys/class/qdss_bridge/mhi_qdss mode 0660 system oem_2902
+#qg
+/dev/qg 0660 system system
+/dev/qg_battery 0660 system system
+
+#qvr
+/dev/qvr_external_sensor_ioctl 0660 system system
+/sys/kernel/qvr_external_sensor/fd 0660 system system
+
# wlan
/dev/wcnss_wlan 0660 system system
/dev/wcnss_ctrl 0660 system system
/sys/devices/soc/a000000.qcom,wcnss-wlan/net/wlan0/queues/rx-* rps_cpus 0660 system system
/sys/devices/soc/a000000.qcom,wcnss-wlan/net/p2p0/queues/rx-* rps_cpus 0660 system system
/dev/spidev0.0 0660 system audio
-/dev/i2c-7 0660 system audio
/dev/msm_camera/* 0660 system camera
/dev/gemini/ 0660 system camera
/dev/mercury0 0660 system camera
@@ -214,7 +225,7 @@ firmware_directories /vendor/firmware_mnt/image/
/dev/i2c-5 0660 media media
/dev/avtimer 0660 system audio
/dev/spidev2.0 0660 system audio
-
+/dev/aud_pasthru_adsp 0660 system audio
# DVB devices
/dev/dvb/adapter0/demux* 0440 media media
/dev/dvb/adapter0/dvr* 0660 media media
@@ -260,24 +271,7 @@ firmware_directories /vendor/firmware_mnt/image/
/sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input* secure_touch 0440 system drmrpc
/sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input* secure_touch_enable 0660 system drmrpc
-# native sensors input
-/sys/devices/virtual/input/input* enable_int 0660 system input
-/sys/devices/virtual/input/input* gyro_op_mode 0660 system input
-/sys/devices/virtual/input/input* acc_range 0660 system input
-/sys/devices/virtual/input/input* acc_value 0660 system input
-/sys/devices/virtual/input/input* gyro_odr 0660 system input
-/sys/devices/virtual/input/input* fifo_data_sel 0660 system input
-/sys/devices/virtual/input/input* fifo_watermark 0660 system input
-/sys/devices/virtual/input/input* enable 0660 system input
-/sys/devices/virtual/input/input* acc_odr 0660 system input
-/sys/devices/virtual/input/input* temperature 0660 system input
-/sys/devices/virtual/input/input* acc_op_mode 0660 system input
-/sys/devices/virtual/input/input* fifo_bytecount 0660 system input
-/sys/devices/virtual/input/input* gyro_range 0660 system input
-/sys/devices/virtual/input/input* gyro_value 0660 system input
-
-# GNSS PPS Device premissions
-/dev/pps* 0660 gps gps
+# GNSS Device premissions
/dev/gnss_sirf 0660 gps gps
# laser sensor access
@@ -302,6 +296,7 @@ firmware_directories /vendor/firmware_mnt/image/
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/queues/rx-0/rps_cpus 0660 system system
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/gro_flush_timeout 0660 system system
/sys/devices/virtual/net/bond0 queues/rx-0/rps_cpus 0660 system system
+/dev/wigig_sensing 0660 system system
#nfc permissions
/dev/nfc-nci 0660 nfc nfc
@@ -323,7 +318,9 @@ firmware_directories /vendor/firmware_mnt/image/
/dev/ramdump* 0640 system system
# Fingerprint device
-/dev/qbt1000 0660 system system
+/dev/qbt* 0660 system system
+/sys/class/fts/touch_aoi aoi_set 0660 root system
+/sys/class/fts/touch_aoi power_set 0660 root system
#ImproveTouch device
/dev/hbtp_input 0660 system system
@@ -368,6 +365,8 @@ firmware_directories /vendor/firmware_mnt/image/
#Memory Offline
/sys/devices/system/memory/memory* state 0660 system system
+/sys/devices/virtual/hdcp/msm_hdcp min_level_change 0664 system graphics
+
# sys-fs display
/sys/class/graphics/fb* hpd 0664 system graphics
/sys/class/graphics/fb* res_info 0664 system graphics
@@ -397,10 +396,3 @@ firmware_directories /vendor/firmware_mnt/image/
/sys/class/graphics/fb0 modes 0664 system graphics
/sys/class/graphics/fb0 mode 0664 system graphics
/sys/class/graphics/fb0 msm_cmd_autorefresh_en 0664 system graphics
-/sys/class/graphics/fb0 dynamic_bitclk 0664 system graphics
-
-/sys/devices/virtual/hdcp/msm_hdcp min_level_change 0664 system graphics
-
-#QG device
-/dev/qg 0660 system system
-/dev/qg_battery 0660 system system