clover: rootdir: Update to MIUI 8.9.20 stock ramdisk
This commit is contained in:
parent
915391ba38
commit
9f3626aba1
21 changed files with 1863 additions and 177 deletions
21
device.mk
21
device.mk
|
@ -87,13 +87,28 @@ PRODUCT_COPY_FILES += \
|
|||
# Ramdisk
|
||||
PRODUCT_PACKAGES += \
|
||||
init.class_main.sh \
|
||||
init.msm.usb.configfs.rc \
|
||||
init.mdm.sh \
|
||||
init.qcom.class_core.sh \
|
||||
init.qcom.coex.sh \
|
||||
init.qcom.crashdata.sh \
|
||||
init.qcom.early_boot.sh \
|
||||
init.qcom.efs.sync.sh \
|
||||
init.qcom.post_boot.sh \
|
||||
init.qcom.rc \
|
||||
init.qcom.sdio.sh \
|
||||
init.qcom.sensors.sh \
|
||||
init.qcom.sh \
|
||||
init.qcom.usb.rc \
|
||||
init.qcom.syspart_fixup.sh \
|
||||
init.qcom.usb.sh \
|
||||
init.qcom.wifi.sh \
|
||||
init.qti.fm.sh \
|
||||
init.qti.ims.sh \
|
||||
init.qti.qseecomd.sh
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
init.msm.usb.configfs.rc \
|
||||
init.qcom.factory.rc \
|
||||
init.qcom.rc \
|
||||
init.qcom.usb.rc \
|
||||
init.target.rc \
|
||||
ueventd.qcom.rc
|
||||
|
||||
|
|
147
rootdir/Android.mk
Executable file → Normal file
147
rootdir/Android.mk
Executable file → Normal file
|
@ -1,7 +1,44 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
# files that live under device/qcom/common/rootdir/etc/
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.class_main.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.class_main.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.mdm.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.mdm.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.class_core.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.class_core.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.coex.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.coex.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.crashdata.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.crashdata.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.early_boot.sh
|
||||
|
@ -11,6 +48,14 @@ LOCAL_SRC_FILES := bin/init.qcom.early_boot.sh
|
|||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.efs.sync.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.efs.sync.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.post_boot.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
|
@ -20,11 +65,19 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
|||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.rc
|
||||
LOCAL_MODULE := init.qcom.sdio.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||
LOCAL_SRC_FILES := bin/init.qcom.sdio.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.sensors.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qcom.sensors.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
@ -36,29 +89,13 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
|||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.class_main.sh
|
||||
LOCAL_MODULE := init.qcom.syspart_fixup.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.class_main.sh
|
||||
LOCAL_SRC_FILES := bin/init.qcom.syspart_fixup.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.usb.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.usb.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.msm.usb.configfs.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.msm.usb.configfs.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.usb.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
|
@ -68,12 +105,59 @@ LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
|||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := ueventd.qcom.rc
|
||||
LOCAL_MODULE_STEM := ueventd.rc
|
||||
LOCAL_MODULE := init.qcom.wifi.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/ueventd.qcom.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)
|
||||
LOCAL_SRC_FILES := bin/init.qcom.wifi.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qti.ims.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qti.ims.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qti.qseecomd.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := bin/init.qti.qseecomd.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.msm.usb.configfs.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.msm.usb.configfs.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.factory.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.factory.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.usb.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.usb.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
@ -83,3 +167,12 @@ LOCAL_MODULE_CLASS := ETC
|
|||
LOCAL_SRC_FILES := etc/init.target.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := ueventd.qcom.rc
|
||||
LOCAL_MODULE_STEM := ueventd.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/ueventd.qcom.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
|
5
rootdir/bin/init.class_main.sh
Executable file → Normal file
5
rootdir/bin/init.class_main.sh
Executable file → Normal file
|
@ -36,11 +36,9 @@ datamode=`getprop persist.data.mode`
|
|||
|
||||
case "$baseband" in
|
||||
"apq" | "sda" )
|
||||
#modify by gongpeicai for wifiOnly bug-start
|
||||
# setprop ro.radio.noril yes
|
||||
setprop ro.radio.noril true
|
||||
#modify by gongpeicai for wifiOnly bug-end
|
||||
stop ril-daemon
|
||||
start ipacm
|
||||
esac
|
||||
|
||||
case "$baseband" in
|
||||
|
@ -50,7 +48,6 @@ esac
|
|||
|
||||
case "$baseband" in
|
||||
"msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3" | "sdm" | "sdx")
|
||||
start ipacm-diag
|
||||
start ipacm
|
||||
case "$baseband" in
|
||||
"svlte2a" | "csfb")
|
||||
|
|
34
rootdir/bin/init.mdm.sh
Normal file
34
rootdir/bin/init.mdm.sh
Normal file
|
@ -0,0 +1,34 @@
|
|||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2013, 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 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.
|
||||
#
|
||||
|
||||
baseband=`getprop ro.baseband`
|
||||
if [ "$baseband" = "mdm" ] || [ "$baseband" = "mdm2" ]; then
|
||||
start mdm_helper
|
||||
fi
|
||||
|
216
rootdir/bin/init.qcom.class_core.sh
Normal file
216
rootdir/bin/init.qcom.class_core.sh
Normal file
|
@ -0,0 +1,216 @@
|
|||
#!/vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2012-2013, 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.
|
||||
#
|
||||
|
||||
# Set platform variables
|
||||
target=`getprop ro.board.platform`
|
||||
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
|
||||
|
||||
|
||||
# Dynamic Memory Managment (DMM) provides a sys file system to the userspace
|
||||
# that can be used to plug in/out memory that has been configured as unstable.
|
||||
# This unstable memory can be in Active or In-Active State.
|
||||
# Each of which the userspace can request by writing to a sys file.
|
||||
#
|
||||
# ro.dev.dmm = 1; Indicates that DMM is enabled in the Android User Space. This
|
||||
# property is set in the Android system properties file.
|
||||
#
|
||||
# If ro.dev.dmm.dpd.start_address is set here then the target has a memory
|
||||
# configuration that supports DynamicMemoryManagement.
|
||||
init_DMM()
|
||||
{
|
||||
block=-1
|
||||
|
||||
case "$target" in
|
||||
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "msm8960")
|
||||
;;
|
||||
*)
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
mem="/sys/devices/system/memory"
|
||||
op=`cat $mem/movable_start_bytes`
|
||||
case "$op" in
|
||||
"0")
|
||||
log -p i -t DMM DMM Disabled. movable_start_bytes not set: $op
|
||||
;;
|
||||
|
||||
"$mem/movable_start_bytes: No such file or directory ")
|
||||
log -p i -t DMM DMM Disabled. movable_start_bytes does not exist: $op
|
||||
;;
|
||||
|
||||
*)
|
||||
log -p i -t DMM DMM available. movable_start_bytes at $op
|
||||
movable_start_bytes=0x`cat $mem/movable_start_bytes`
|
||||
block_size_bytes=0x`cat $mem/block_size_bytes`
|
||||
block=$((#${movable_start_bytes}/${block_size_bytes}))
|
||||
|
||||
chown -h system.system $mem/memory$block/state
|
||||
chown -h system.system $mem/probe
|
||||
chown -h system.system $mem/active
|
||||
chown -h system.system $mem/remove
|
||||
|
||||
case "$target" in
|
||||
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
|
||||
echo $movable_start_bytes > $mem/probe
|
||||
case "$?" in
|
||||
"0")
|
||||
log -p i -t DMM $movable_start_bytes to physical hotplug succeeded.
|
||||
;;
|
||||
*)
|
||||
log -p e -t DMM $movable_start_bytes to physical hotplug failed.
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
echo online > $mem/memory$block/state
|
||||
case "$?" in
|
||||
"0")
|
||||
log -p i -t DMM \'echo online\' to logical hotplug succeeded.
|
||||
;;
|
||||
*)
|
||||
log -p e -t DMM \'echo online\' to logical hotplug failed.
|
||||
return
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
setprop ro.dev.dmm.dpd.start_address $movable_start_bytes
|
||||
setprop ro.dev.dmm.dpd.block $block
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$target" in
|
||||
"msm8960")
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
# For 7X30 targets:
|
||||
# ro.dev.dmm.dpd.start_address is set when the target has a 2x256Mb memory
|
||||
# configuration. This is also used to indicate that the target is capable of
|
||||
# setting EBI-1 to Deep Power Down or Self Refresh.
|
||||
op=`cat $mem/low_power_memory_start_bytes`
|
||||
case "$op" in
|
||||
"0")
|
||||
log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes not set:$op
|
||||
;;
|
||||
"$mem/low_power_memory_start_bytes No such file or directory ")
|
||||
log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes does not exist:$op
|
||||
;;
|
||||
*)
|
||||
log -p i -t DMM Self-Refresh-Only available. low_power_memory_start_bytes at $op
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
#
|
||||
# For controlling console and shell on console on 8960 - perist.serial.enable 8960
|
||||
# On other target use default ro.debuggable property.
|
||||
#
|
||||
serial=`getprop persist.serial.enable`
|
||||
dserial=`getprop ro.debuggable`
|
||||
case "$target" in
|
||||
"msm8960")
|
||||
case "$serial" in
|
||||
"0")
|
||||
echo 0 > /sys/devices/platform/msm_serial_hsl.0/console
|
||||
;;
|
||||
"1")
|
||||
echo 1 > /sys/devices/platform/msm_serial_hsl.0/console
|
||||
start console
|
||||
;;
|
||||
*)
|
||||
case "$dserial" in
|
||||
"1")
|
||||
start console
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
"msm8610" | "msm8974" | "msm8226")
|
||||
case "$serial" in
|
||||
"0")
|
||||
echo 0 > /sys/devices/f991f000.serial/console
|
||||
;;
|
||||
"1")
|
||||
echo 1 > /sys/devices/f991f000.serial/console
|
||||
start console
|
||||
;;
|
||||
*)
|
||||
case "$dserial" in
|
||||
"1")
|
||||
start console
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
case "$dserial" in
|
||||
"1")
|
||||
start console
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$target" in
|
||||
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
|
||||
insmod /system/lib/modules/ss_mfcinit.ko
|
||||
insmod /system/lib/modules/ss_vencoder.ko
|
||||
insmod /system/lib/modules/ss_vdecoder.ko
|
||||
chmod -h 0666 /dev/ss_mfc_reg
|
||||
chmod -h 0666 /dev/ss_vdec
|
||||
chmod -h 0666 /dev/ss_venc
|
||||
|
||||
init_DMM
|
||||
;;
|
||||
|
||||
"msm8960")
|
||||
init_DMM
|
||||
;;
|
||||
esac
|
115
rootdir/bin/init.qcom.coex.sh
Normal file
115
rootdir/bin/init.qcom.coex.sh
Normal file
|
@ -0,0 +1,115 @@
|
|||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2009-2010, 2012, 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.
|
||||
|
||||
LOG_TAG="qcom-bt-wlan-coex"
|
||||
LOG_NAME="${0}:"
|
||||
|
||||
coex_pid=""
|
||||
ath_wlan_supported=`getprop wlan.driver.ath`
|
||||
|
||||
loge ()
|
||||
{
|
||||
/system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@"
|
||||
}
|
||||
|
||||
logi ()
|
||||
{
|
||||
/system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@"
|
||||
}
|
||||
|
||||
failed ()
|
||||
{
|
||||
loge "$1: exit code $2"
|
||||
exit $2
|
||||
}
|
||||
|
||||
start_coex ()
|
||||
{
|
||||
case "$ath_wlan_supported" in
|
||||
"2")
|
||||
echo "ATH WLAN Chip ID AR6004 is enabled"
|
||||
/system/bin/abtfilt -d -z -n -m -a -w wlan0 &
|
||||
;;
|
||||
"1")
|
||||
echo "ATH WLAN Chip ID is enabled"
|
||||
# Must have -d -z -n -v -s -w wlan0 parameters for atheros btfilter.
|
||||
/system/bin/abtfilt -d -z -n -v -q -s -w wlan0 &
|
||||
;;
|
||||
"0")
|
||||
echo "WCN WLAN Chip ID is enabled"
|
||||
# Must have -o turned on to avoid daemon (otherwise we cannot get pid)
|
||||
/system/bin/btwlancoex -o $opt_flags &
|
||||
;;
|
||||
*)
|
||||
echo "NO WLAN Chip ID is enabled, so enabling ATH as default"
|
||||
# Must have -d -z -n -v -s -w wlan0 parameters for atheros btfilter.
|
||||
/system/bin/abtfilt -d -z -n -v -q -s -w wlan0 &
|
||||
;;
|
||||
esac
|
||||
coex_pid=$!
|
||||
logi "start_coex: pid = $coex_pid"
|
||||
}
|
||||
|
||||
kill_coex ()
|
||||
{
|
||||
logi "kill_coex: pid = $coex_pid"
|
||||
kill -TERM $coex_pid
|
||||
# this shell doesn't exit now -- wait returns for normal exit
|
||||
}
|
||||
|
||||
# mimic coex options parsing -- maybe a waste of effort
|
||||
USAGE="${0} [-o] [-c] [-r] [-i] [-h]"
|
||||
|
||||
while getopts "ocrih" f
|
||||
do
|
||||
case $f in
|
||||
o | c | r | i | h) opt_flags="$opt_flags -$f" ;;
|
||||
\?) echo $USAGE; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
# init does SIGTERM on ctl.stop for service
|
||||
trap "kill_coex" TERM INT
|
||||
|
||||
#Selectively start coex module
|
||||
target=`getprop ro.board.platform`
|
||||
|
||||
if [ "$target" == "msm8960" ] && [ "$ath_wlan_supported" != "2" ]; then
|
||||
logi "btwlancoex/abtfilt is not needed"
|
||||
else
|
||||
# Build settings may not produce the coex executable
|
||||
if ls /system/bin/btwlancoex || ls /system/bin/abtfilt
|
||||
then
|
||||
start_coex
|
||||
wait $coex_pid
|
||||
logi "Coex stopped"
|
||||
else
|
||||
logi "btwlancoex/abtfilt not available"
|
||||
fi
|
||||
fi
|
||||
exit 0
|
48
rootdir/bin/init.qcom.crashdata.sh
Normal file
48
rootdir/bin/init.qcom.crashdata.sh
Normal file
|
@ -0,0 +1,48 @@
|
|||
#!/vendor/bin/sh
|
||||
# Copyright (c) 2017, 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 "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.
|
||||
#
|
||||
|
||||
abnormalcnt="persist.vendor.crash.cnt"
|
||||
|
||||
abnormal_cnt=`getprop $abnormalcnt`
|
||||
crash_detect=`getprop persist.vendor.crash.detect`
|
||||
|
||||
if [ "$abnormal_cnt" = "" ]
|
||||
then
|
||||
setprop $abnormalcnt 0
|
||||
fi
|
||||
|
||||
if [ "$crash_detect" = "true" ]
|
||||
then
|
||||
abnormal_cnt=`expr $abnormal_cnt + 1`
|
||||
setprop $abnormalcnt $abnormal_cnt
|
||||
elif [ "$crash_detect" = "false" ];then
|
||||
setprop persist.vendor.crash.detect true
|
||||
else
|
||||
setprop persist.vendor.crash.detect true
|
||||
fi
|
5
rootdir/bin/init.qcom.early_boot.sh
Executable file → Normal file
5
rootdir/bin/init.qcom.early_boot.sh
Executable file → Normal file
|
@ -1,6 +1,7 @@
|
|||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2012-2013,2016 The Linux Foundation. All rights reserved.
|
||||
# Copyright (c) 2012-2013,2016,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:
|
||||
|
@ -225,7 +226,7 @@ case "$target" in
|
|||
# 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)
|
||||
294|295|296|297|298|313|353|354|363|364)
|
||||
setprop ro.opengles.version 196610
|
||||
;;
|
||||
303|307|308|309|320)
|
||||
|
|
35
rootdir/bin/init.qcom.efs.sync.sh
Normal file
35
rootdir/bin/init.qcom.efs.sync.sh
Normal file
|
@ -0,0 +1,35 @@
|
|||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2012, 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 "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.
|
||||
#
|
||||
#
|
||||
|
||||
PATH=/system/bin:$PATH
|
||||
export PATH
|
||||
cat /sys/devices/platform/rs300000a7.65536/force_sync
|
||||
cat /sys/devices/platform/rs300100a7.65536/force_sync
|
346
rootdir/bin/init.qcom.post_boot.sh
Executable file → Normal file
346
rootdir/bin/init.qcom.post_boot.sh
Executable file → Normal file
|
@ -231,21 +231,53 @@ function configure_zram_parameters() {
|
|||
# Zram disk - 75% for Go devices.
|
||||
# For 512MB Go device, size = 384MB
|
||||
# For 1GB Go device, size = 768MB
|
||||
# Others - 512MB size
|
||||
# For >3GB Non-Go device, size = 1GB
|
||||
# For <=3GB Non-Go device, size = 512MB
|
||||
# And enable lz4 zram compression for Go devices
|
||||
zram_enable=`getprop ro.vendor.qti.config.zram`
|
||||
if [ "$zram_enable" == "true" ]; then
|
||||
if [ -f /sys/block/zram0/disksize ]; then
|
||||
if [ $MemTotal -le 524288 ] && [ "$low_ram" == "true" ]; then
|
||||
echo lz4 > /sys/block/zram0/comp_algorithm
|
||||
echo 402653184 > /sys/block/zram0/disksize
|
||||
elif [ $MemTotal -le 1048576 ] && [ "$low_ram" == "true" ]; then
|
||||
echo lz4 > /sys/block/zram0/comp_algorithm
|
||||
echo 805306368 > /sys/block/zram0/disksize
|
||||
else
|
||||
# Set Zram disk size to 512MB for <=3GB
|
||||
# and 1GB for >3GB Non-Go targets.
|
||||
if [ $MemTotal -gt 3145728 ]; then
|
||||
echo 1073741824 > /sys/block/zram0/disksize
|
||||
else
|
||||
echo 536870912 > /sys/block/zram0/disksize
|
||||
fi
|
||||
fi
|
||||
mkswap /dev/block/zram0
|
||||
swapon /dev/block/zram0 -p 32758
|
||||
|
||||
# Set swappiness to 100 for all targets
|
||||
echo 100 > /proc/sys/vm/swappiness
|
||||
fi
|
||||
}
|
||||
|
||||
function configure_read_ahead_kb_values() {
|
||||
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
|
||||
MemTotal=${MemTotalStr:16:8}
|
||||
|
||||
# Set 128 for <= 3GB &
|
||||
# Set 512 for > 3GB
|
||||
if [ $MemTotal -le 3145728 ]; then
|
||||
echo 128 > /sys/block/mmcblk0/bdi/read_ahead_kb
|
||||
echo 128 > /sys/block/mmcblk0/queue/read_ahead_kb
|
||||
echo 128 > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb
|
||||
echo 128 > /sys/block/mmcblk0rpmb/queue/read_ahead_kb
|
||||
echo 128 > /sys/block/dm-0/queue/read_ahead_kb
|
||||
echo 128 > /sys/block/dm-1/queue/read_ahead_kb
|
||||
else
|
||||
echo 512 > /sys/block/mmcblk0/bdi/read_ahead_kb
|
||||
echo 512 > /sys/block/mmcblk0/queue/read_ahead_kb
|
||||
echo 512 > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb
|
||||
echo 512 > /sys/block/mmcblk0rpmb/queue/read_ahead_kb
|
||||
echo 512 > /sys/block/dm-0/queue/read_ahead_kb
|
||||
echo 512 > /sys/block/dm-1/queue/read_ahead_kb
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -264,6 +296,10 @@ function configure_memory_parameters() {
|
|||
# Set ALMK parameters (usually above the highest minfree values)
|
||||
# 32 bit will have 53K & 64 bit will have 81K
|
||||
#
|
||||
# vmpressure_file_min threshold is always set slightly higher
|
||||
# than LMK minfree's last bin value for 32-bit arch. It is calculated as
|
||||
# vmpressure_file_min = (last bin - second last bin ) + last bin
|
||||
# For 64-bit arch, vmpressure_file_min = LMK minfree's last bin value
|
||||
|
||||
ProductName=`getprop ro.product.name`
|
||||
low_ram=`getprop ro.config.low_ram`
|
||||
|
@ -271,9 +307,11 @@ low_ram=`getprop ro.config.low_ram`
|
|||
if [ "$ProductName" == "msm8996" ]; then
|
||||
# Enable Adaptive LMK
|
||||
echo 1 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
|
||||
echo 81250 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
|
||||
echo 80640 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
|
||||
|
||||
configure_zram_parameters
|
||||
|
||||
configure_read_ahead_kb_values
|
||||
else
|
||||
arch_type=`uname -m`
|
||||
MemTotalStr=`cat /proc/meminfo | grep MemTotal`
|
||||
|
@ -295,7 +333,7 @@ else
|
|||
echo $set_almk_ppr_adj > /sys/module/process_reclaim/parameters/min_score_adj
|
||||
|
||||
#Set other memory parameters
|
||||
echo 0 > /sys/module/process_reclaim/parameters/enable_process_reclaim
|
||||
echo 1 > /sys/module/process_reclaim/parameters/enable_process_reclaim
|
||||
echo 70 > /sys/module/process_reclaim/parameters/pressure_max
|
||||
echo 30 > /sys/module/process_reclaim/parameters/swap_opt_eff
|
||||
echo 1 > /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk
|
||||
|
@ -303,18 +341,23 @@ else
|
|||
echo 10 > /sys/module/process_reclaim/parameters/pressure_min
|
||||
echo 1024 > /sys/module/process_reclaim/parameters/per_swap_size
|
||||
echo "18432,23040,27648,32256,55296,80640" > /sys/module/lowmemorykiller/parameters/minfree
|
||||
echo 81250 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
|
||||
echo 80640 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
|
||||
elif [ "$arch_type" == "aarch64" ] && [ $MemTotal -gt 1048576 ]; then
|
||||
echo 10 > /sys/module/process_reclaim/parameters/pressure_min
|
||||
echo 1024 > /sys/module/process_reclaim/parameters/per_swap_size
|
||||
echo "14746,18432,22118,25805,40000,55000" > /sys/module/lowmemorykiller/parameters/minfree
|
||||
echo 81250 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
|
||||
echo 55000 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
|
||||
elif [ "$arch_type" == "aarch64" ]; then
|
||||
echo 50 > /sys/module/process_reclaim/parameters/pressure_min
|
||||
echo 512 > /sys/module/process_reclaim/parameters/per_swap_size
|
||||
echo "14746,18432,22118,25805,40000,55000" > /sys/module/lowmemorykiller/parameters/minfree
|
||||
echo 81250 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
|
||||
echo 55000 > /sys/module/lowmemorykiller/parameters/vmpressure_file_min
|
||||
else
|
||||
# Set allocstall_threshold to 0 for both Go & non-go <=1GB targets
|
||||
if [ $MemTotal -le 1048576 ]; then
|
||||
echo 0 > /sys/module/vmpressure/parameters/allocstall_threshold
|
||||
fi
|
||||
|
||||
if [ $MemTotal -le 1048576 ] && [ "$low_ram" == "true" ]; then
|
||||
# Disable KLMK, ALMK, PPR & Core Control for Go devices
|
||||
echo 0 > /sys/module/lowmemorykiller/parameters/enable_lmk
|
||||
|
@ -322,6 +365,11 @@ else
|
|||
echo 0 > /sys/module/process_reclaim/parameters/enable_process_reclaim
|
||||
echo 1 > /sys/devices/system/cpu/cpu0/core_ctl/disable
|
||||
else
|
||||
# Disable Core Control, enable KLMK for non-go 8909
|
||||
if [ "$ProductName" == "msm8909" ]; then
|
||||
echo 1 > /sys/devices/system/cpu/cpu0/core_ctl/disable
|
||||
echo 1 > /sys/module/lowmemorykiller/parameters/enable_lmk
|
||||
fi
|
||||
echo 50 > /sys/module/process_reclaim/parameters/pressure_min
|
||||
echo 512 > /sys/module/process_reclaim/parameters/per_swap_size
|
||||
echo "15360,19200,23040,26880,34415,43737" > /sys/module/lowmemorykiller/parameters/minfree
|
||||
|
@ -329,8 +377,15 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
#Enable oom_reaper
|
||||
if [ -f /sys/module/lowmemorykiller/parameters/oom_reaper ]; then
|
||||
echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper
|
||||
fi
|
||||
|
||||
configure_zram_parameters
|
||||
|
||||
configure_read_ahead_kb_values
|
||||
|
||||
SWAP_ENABLE_THRESHOLD=1048576
|
||||
swap_enable=`getprop ro.vendor.qti.config.swap`
|
||||
|
||||
|
@ -1534,9 +1589,6 @@ case "$target" in
|
|||
echo 110 > /proc/sys/kernel/sched_grp_downmigrate
|
||||
echo 1 > /proc/sys/kernel/sched_enable_thread_grouping
|
||||
|
||||
#Support touch boost
|
||||
echo 0:1401600 1:1401600 2:1401600 3:1401600 4:1401600 5:1401600 6:1401600 7:1401600 > /sys/module/cpu_boost/parameters/input_boost_freq
|
||||
|
||||
# Set Memory parameters
|
||||
configure_memory_parameters
|
||||
|
||||
|
@ -1566,6 +1618,8 @@ case "$target" in
|
|||
platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
|
||||
fi
|
||||
|
||||
echo 0 > /proc/sys/kernel/sched_boost
|
||||
|
||||
case "$soc_id" in
|
||||
"293" | "304" | "338" | "351")
|
||||
|
||||
|
@ -1655,24 +1709,6 @@ case "$target" in
|
|||
|
||||
# disable thermal & BCL core_control to update interactive gov settings
|
||||
echo 0 > /sys/module/msm_thermal/core_control/enabled
|
||||
for mode in /sys/devices/soc.0/qcom,bcl.*/mode
|
||||
do
|
||||
echo -n disable > $mode
|
||||
done
|
||||
for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
|
||||
do
|
||||
bcl_hotplug_mask=`cat $hotplug_mask`
|
||||
echo 0 > $hotplug_mask
|
||||
done
|
||||
for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
|
||||
do
|
||||
bcl_soc_hotplug_mask=`cat $hotplug_soc_mask`
|
||||
echo 0 > $hotplug_soc_mask
|
||||
done
|
||||
for mode in /sys/devices/soc.0/qcom,bcl.*/mode
|
||||
do
|
||||
echo -n enable > $mode
|
||||
done
|
||||
|
||||
#if the kernel version >=4.9,use the schedutil governor
|
||||
KernelVersionStr=`cat /proc/sys/kernel/osrelease`
|
||||
|
@ -1700,22 +1736,6 @@ case "$target" in
|
|||
|
||||
# re-enable thermal & BCL core_control now
|
||||
echo 1 > /sys/module/msm_thermal/core_control/enabled
|
||||
for mode in /sys/devices/soc.0/qcom,bcl.*/mode
|
||||
do
|
||||
echo -n disable > $mode
|
||||
done
|
||||
for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
|
||||
do
|
||||
echo $bcl_hotplug_mask > $hotplug_mask
|
||||
done
|
||||
for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
|
||||
do
|
||||
echo $bcl_soc_hotplug_mask > $hotplug_soc_mask
|
||||
done
|
||||
for mode in /sys/devices/soc.0/qcom,bcl.*/mode
|
||||
do
|
||||
echo -n enable > $mode
|
||||
done
|
||||
|
||||
# SMP scheduler
|
||||
echo 85 > /proc/sys/kernel/sched_upmigrate
|
||||
|
@ -1747,6 +1767,7 @@ case "$target" in
|
|||
echo 4 > $cpubw/bw_hwmon/sample_ms
|
||||
echo 34 > $cpubw/bw_hwmon/io_percent
|
||||
echo 20 > $cpubw/bw_hwmon/hist_memory
|
||||
echo 80 > $cpubw/bw_hwmon/down_thres
|
||||
echo 0 > $cpubw/bw_hwmon/hyst_length
|
||||
echo 0 > $cpubw/bw_hwmon/guard_band_mbps
|
||||
echo 250 > $cpubw/bw_hwmon/up_scale
|
||||
|
@ -1776,27 +1797,6 @@ case "$target" in
|
|||
echo 1 > $DCC_PATH/enable
|
||||
done
|
||||
|
||||
# disable thermal & BCL core_control to update interactive gov settings
|
||||
echo 0 > /sys/module/msm_thermal/core_control/enabled
|
||||
for mode in /sys/devices/soc.0/qcom,bcl.*/mode
|
||||
do
|
||||
echo -n disable > $mode
|
||||
done
|
||||
for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
|
||||
do
|
||||
bcl_hotplug_mask=`cat $hotplug_mask`
|
||||
echo 0 > $hotplug_mask
|
||||
done
|
||||
for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
|
||||
do
|
||||
bcl_soc_hotplug_mask=`cat $hotplug_soc_mask`
|
||||
echo 0 > $hotplug_soc_mask
|
||||
done
|
||||
for mode in /sys/devices/soc.0/qcom,bcl.*/mode
|
||||
do
|
||||
echo -n enable > $mode
|
||||
done
|
||||
|
||||
# configure governor settings for little cluster
|
||||
echo 1 > /sys/devices/system/cpu/cpu0/online
|
||||
echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
||||
|
@ -1806,6 +1806,9 @@ case "$target" in
|
|||
echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load
|
||||
# sched_load_boost as -6 is equivalent to target load as 85.
|
||||
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
|
||||
|
||||
# configure governor settings for big cluster
|
||||
echo 1 > /sys/devices/system/cpu/cpu4/online
|
||||
|
@ -1816,9 +1819,12 @@ case "$target" in
|
|||
echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load
|
||||
# sched_load_boost as -6 is equivalent to target load as 85.
|
||||
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/cpu7/sched_load_boost
|
||||
echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
|
||||
|
||||
echo 614400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||
echo 1094400 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
|
||||
echo 633600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
|
||||
|
||||
# cpuset settings
|
||||
echo 0-3 > /dev/cpuset/background/cpus
|
||||
|
@ -1826,25 +1832,6 @@ case "$target" in
|
|||
# choose idle CPU for top app tasks
|
||||
echo 1 > /dev/stune/top-app/schedtune.prefer_idle
|
||||
|
||||
# re-enable thermal & BCL core_control now
|
||||
echo 1 > /sys/module/msm_thermal/core_control/enabled
|
||||
for mode in /sys/devices/soc.0/qcom,bcl.*/mode
|
||||
do
|
||||
echo -n disable > $mode
|
||||
done
|
||||
for hotplug_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_mask
|
||||
do
|
||||
echo $bcl_hotplug_mask > $hotplug_mask
|
||||
done
|
||||
for hotplug_soc_mask in /sys/devices/soc.0/qcom,bcl.*/hotplug_soc_mask
|
||||
do
|
||||
echo $bcl_soc_hotplug_mask > $hotplug_soc_mask
|
||||
done
|
||||
for mode in /sys/devices/soc.0/qcom,bcl.*/mode
|
||||
do
|
||||
echo -n enable > $mode
|
||||
done
|
||||
|
||||
# Disable Core control
|
||||
echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/enable
|
||||
echo 0 > /sys/devices/system/cpu/cpu4/core_ctl/enable
|
||||
|
@ -1869,6 +1856,13 @@ case "$target" in
|
|||
echo 86 > /proc/sys/kernel/sched_upmigrate
|
||||
echo 80 > /proc/sys/kernel/sched_group_downmigrate
|
||||
echo 90 > /proc/sys/kernel/sched_group_upmigrate
|
||||
echo 1 > /proc/sys/kernel/sched_walt_rotate_big_tasks
|
||||
|
||||
# Enable min frequency adjustment for big cluster
|
||||
if [ -f /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_cluster ]; then
|
||||
echo "4-7" > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_cluster
|
||||
fi
|
||||
echo 1 > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_adjust
|
||||
|
||||
;;
|
||||
esac
|
||||
|
@ -1894,11 +1888,11 @@ case "$target" in
|
|||
fi
|
||||
|
||||
case "$soc_id" in
|
||||
"303" | "307" | "308" | "309" | "320" | "294" | "353")
|
||||
"303" | "307" | "308" | "309" | "320" )
|
||||
|
||||
# Start Host based Touch processing
|
||||
case "$hw_platform" in
|
||||
"MTP" | "QRD" )
|
||||
"MTP" )
|
||||
start_hbtp
|
||||
;;
|
||||
esac
|
||||
|
@ -2086,6 +2080,147 @@ case "$target" in
|
|||
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$soc_id" in
|
||||
"354" | "364" | "353" | "363" )
|
||||
|
||||
# Start Host based Touch processing
|
||||
case "$hw_platform" in
|
||||
"MTP" | "Surf" | "RCM" | "QRD" )
|
||||
start_hbtp
|
||||
;;
|
||||
esac
|
||||
|
||||
# Apply settings for sdm429/sda429/sdm439/sda439
|
||||
|
||||
for cpubw in /sys/class/devfreq/*qcom,mincpubw*
|
||||
do
|
||||
echo "cpufreq" > $cpubw/governor
|
||||
done
|
||||
|
||||
for cpubw in /sys/class/devfreq/*qcom,cpubw*
|
||||
do
|
||||
echo "bw_hwmon" > $cpubw/governor
|
||||
echo 20 > $cpubw/bw_hwmon/io_percent
|
||||
echo 30 > $cpubw/bw_hwmon/guard_band_mbps
|
||||
done
|
||||
|
||||
for gpu_bimc_io_percent in /sys/class/devfreq/soc:qcom,gpubw/bw_hwmon/io_percent
|
||||
do
|
||||
echo 40 > $gpu_bimc_io_percent
|
||||
done
|
||||
|
||||
case "$soc_id" in
|
||||
"353" | "363" )
|
||||
# Apply settings for sdm439/sda439
|
||||
# configure schedutil governor settings
|
||||
# enable governor for perf cluster
|
||||
echo 1 > /sys/devices/system/cpu/cpu0/online
|
||||
echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
||||
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
|
||||
#set the hispeed_freq
|
||||
echo 1497600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
|
||||
echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load
|
||||
echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||
# sched_load_boost as -6 is equivalent to target load as 85.
|
||||
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
|
||||
|
||||
## enable governor for power cluster
|
||||
echo 1 > /sys/devices/system/cpu/cpu4/online
|
||||
echo "schedutil" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
|
||||
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/rate_limit_us
|
||||
#set the hispeed_freq
|
||||
echo 998400 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_freq
|
||||
echo 85 > /sys/devices/system/cpu/cpu4/cpufreq/schedutil/hispeed_load
|
||||
echo 768000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
|
||||
# sched_load_boost as -6 is equivalent to target load as 85.
|
||||
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
|
||||
|
||||
# EAS scheduler (big.Little cluster related) settings
|
||||
echo 93 > /proc/sys/kernel/sched_upmigrate
|
||||
echo 83 > /proc/sys/kernel/sched_downmigrate
|
||||
echo 140 > /proc/sys/kernel/sched_group_upmigrate
|
||||
echo 120 > /proc/sys/kernel/sched_group_downmigrate
|
||||
|
||||
# cpuset settings
|
||||
#echo 0-3 > /dev/cpuset/background/cpus
|
||||
#echo 0-3 > /dev/cpuset/system-background/cpus
|
||||
|
||||
# Bring up all cores online
|
||||
echo 1 > /sys/devices/system/cpu/cpu1/online
|
||||
echo 1 > /sys/devices/system/cpu/cpu2/online
|
||||
echo 1 > /sys/devices/system/cpu/cpu3/online
|
||||
echo 1 > /sys/devices/system/cpu/cpu4/online
|
||||
echo 1 > /sys/devices/system/cpu/cpu5/online
|
||||
echo 1 > /sys/devices/system/cpu/cpu6/online
|
||||
echo 1 > /sys/devices/system/cpu/cpu7/online
|
||||
|
||||
# Enable core control
|
||||
echo 2 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
|
||||
echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/max_cpus
|
||||
echo 68 > /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 1 > /sys/devices/system/cpu/cpu0/core_ctl/is_big_cluster
|
||||
echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/task_thres
|
||||
|
||||
# Big cluster min frequency adjust settings
|
||||
if [ -f /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_cluster ]; then
|
||||
echo "0-3" > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_cluster
|
||||
fi
|
||||
echo 1305600 > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_floor
|
||||
;;
|
||||
*)
|
||||
# Apply settings for sdm429/sda429
|
||||
# configure schedutil governor settings
|
||||
echo 1 > /sys/devices/system/cpu/cpu0/online
|
||||
echo "schedutil" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
||||
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/rate_limit_us
|
||||
#set the hispeed_freq
|
||||
echo 1305600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
|
||||
echo 80 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_load
|
||||
echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||
# sched_load_boost as -6 is equivalent to target load as 85.
|
||||
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
|
||||
|
||||
# Bring up all cores online
|
||||
echo 1 > /sys/devices/system/cpu/cpu1/online
|
||||
echo 1 > /sys/devices/system/cpu/cpu2/online
|
||||
echo 1 > /sys/devices/system/cpu/cpu3/online
|
||||
;;
|
||||
esac
|
||||
|
||||
# Set Memory parameters
|
||||
configure_memory_parameters
|
||||
|
||||
#disable sched_boost
|
||||
echo 0 > /proc/sys/kernel/sched_boost
|
||||
|
||||
# Disable L2-GDHS low power modes
|
||||
echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/idle_enabled
|
||||
echo N > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/suspend_enabled
|
||||
echo N > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/idle_enabled
|
||||
echo N > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/suspend_enabled
|
||||
|
||||
# Enable low power modes
|
||||
echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
|
||||
|
||||
case "$soc_id" in
|
||||
"353" | "363" )
|
||||
echo 1 > /sys/module/big_cluster_min_freq_adjust/parameters/min_freq_adjust
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -2148,11 +2283,8 @@ case "$target" in
|
|||
echo 1 > /proc/sys/kernel/sched_prefer_sync_wakee_to_waker
|
||||
|
||||
# cpuset settings
|
||||
echo 0-7 > /dev/cpuset/top-app/cpus
|
||||
echo 0-1 > /dev/cpuset/background/cpus
|
||||
echo 0-2 > /dev/cpuset/system-background/cpus
|
||||
echo 4-7 > /dev/cpuset/foreground/boost/cpus
|
||||
echo 0-2,4-7 > /dev/cpuset/foreground/cpus
|
||||
echo 0-3 > /dev/cpuset/background/cpus
|
||||
echo 0-3 > /dev/cpuset/system-background/cpus
|
||||
|
||||
# disable thermal bcl hotplug to switch governor
|
||||
echo 0 > /sys/module/msm_thermal/core_control/enabled
|
||||
|
@ -2221,10 +2353,10 @@ case "$target" in
|
|||
# re-enable thermal and BCL hotplug
|
||||
echo 1 > /sys/module/msm_thermal/core_control/enabled
|
||||
|
||||
|
||||
# Support touch boost
|
||||
echo 0:1401600 1:1401600 2:1401600 3:1401600 4:1401600 5:1401600 6:1401600 7:1401600 > /sys/module/cpu_boost/parameters/input_boost_freq
|
||||
echo 60 > /sys/module/cpu_boost/parameters/input_boost_ms
|
||||
|
||||
# Set Memory parameters
|
||||
configure_memory_parameters
|
||||
|
||||
|
@ -2263,6 +2395,13 @@ case "$target" in
|
|||
case "$soc_id" in
|
||||
"318" | "327" )
|
||||
|
||||
# Start Host based Touch processing
|
||||
case "$hw_platform" in
|
||||
"MTP" | "Surf" | "RCM" | "QRD" )
|
||||
start_hbtp
|
||||
;;
|
||||
esac
|
||||
|
||||
# Setting b.L scheduler parameters
|
||||
echo 85 > /proc/sys/kernel/sched_upmigrate
|
||||
echo 85 > /proc/sys/kernel/sched_downmigrate
|
||||
|
@ -2867,6 +3006,9 @@ case "$target" in
|
|||
echo "0:1324800" > /sys/module/cpu_boost/parameters/input_boost_freq
|
||||
echo 120 > /sys/module/cpu_boost/parameters/input_boost_ms
|
||||
|
||||
# Enable oom_reaper for sdm845
|
||||
echo 1 > /sys/module/lowmemorykiller/parameters/oom_reaper
|
||||
|
||||
# Enable bus-dcvs
|
||||
for cpubw in /sys/class/devfreq/*qcom,cpubw*
|
||||
do
|
||||
|
@ -3259,28 +3401,12 @@ case "$target" in
|
|||
esac
|
||||
;;
|
||||
"msm8909")
|
||||
echo 128 > /sys/block/mmcblk0/bdi/read_ahead_kb
|
||||
echo 128 > /sys/block/mmcblk0/queue/read_ahead_kb
|
||||
echo 128 > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb
|
||||
echo 128 > /sys/block/mmcblk0rpmb/queue/read_ahead_kb
|
||||
setprop sys.post_boot.parsed 1
|
||||
;;
|
||||
"msm8952")
|
||||
echo 128 > /sys/block/mmcblk0/bdi/read_ahead_kb
|
||||
echo 128 > /sys/block/mmcblk0/queue/read_ahead_kb
|
||||
echo 128 > /sys/block/dm-0/queue/read_ahead_kb
|
||||
echo 128 > /sys/block/dm-1/queue/read_ahead_kb
|
||||
echo 128 > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb
|
||||
echo 128 > /sys/block/mmcblk0rpmb/queue/read_ahead_kb
|
||||
setprop sys.post_boot.parsed 1
|
||||
;;
|
||||
"msm8937" | "msm8953")
|
||||
echo 128 > /sys/block/mmcblk0/bdi/read_ahead_kb
|
||||
echo 128 > /sys/block/mmcblk0/queue/read_ahead_kb
|
||||
echo 128 > /sys/block/dm-0/queue/read_ahead_kb
|
||||
echo 128 > /sys/block/dm-1/queue/read_ahead_kb
|
||||
echo 128 > /sys/block/mmcblk0rpmb/bdi/read_ahead_kb
|
||||
echo 128 > /sys/block/mmcblk0rpmb/queue/read_ahead_kb
|
||||
setprop sys.post_boot.parsed 1
|
||||
|
||||
low_ram_enable=`getprop ro.config.low_ram`
|
||||
|
|
78
rootdir/bin/init.qcom.sdio.sh
Normal file
78
rootdir/bin/init.qcom.sdio.sh
Normal file
|
@ -0,0 +1,78 @@
|
|||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2010, 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 "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.
|
||||
#
|
||||
|
||||
# For successful WLAN card detection, WLAN needs SDIO polling turned on.
|
||||
# This script can be used to turn on/off SDIO polling on appropriate
|
||||
# SDIO slot on the MSM target (e.g. slot 3 on 7x30 surf).
|
||||
|
||||
arg=$1
|
||||
target=`getprop ro.board.platform`
|
||||
|
||||
case "$target" in
|
||||
"msm7627_6x")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.1/polling
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.2/polling
|
||||
;;
|
||||
|
||||
"msm7627_ffa")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.2/polling
|
||||
;;
|
||||
|
||||
"msm7627_surf")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.1/polling
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.2/polling
|
||||
;;
|
||||
|
||||
"msm7627a")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.2/polling
|
||||
;;
|
||||
|
||||
"msm7630_surf")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.3/polling
|
||||
;;
|
||||
|
||||
"msm7630_1x")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.3/polling
|
||||
;;
|
||||
|
||||
"msm7630_fusion")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.3/polling
|
||||
;;
|
||||
|
||||
"msm8660")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.4/polling
|
||||
;;
|
||||
|
||||
"msm8660_csfb")
|
||||
echo 1 > /sys/devices/platform/msm_sdcc.4/polling
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
43
rootdir/bin/init.qcom.sensors.sh
Normal file
43
rootdir/bin/init.qcom.sensors.sh
Normal file
|
@ -0,0 +1,43 @@
|
|||
#!/vendor/bin/sh
|
||||
# Copyright (c) 2015, 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.
|
||||
#
|
||||
|
||||
#
|
||||
# Function to start sensors for SSC enabled platforms
|
||||
#
|
||||
start_sensors()
|
||||
{
|
||||
if [ -c /dev/msm_dsps -o -c /dev/sensors ]; then
|
||||
chmod -h 775 /persist/sensors
|
||||
chmod -h 664 /persist/sensors/sensors_settings
|
||||
mkdir -p /persist/sensors/registry/registry
|
||||
chown -h system.root /persist/sensors/sensors_settings
|
||||
start sensors
|
||||
fi
|
||||
}
|
||||
|
||||
start_sensors
|
9
rootdir/bin/init.qcom.sh
Executable file → Normal file
9
rootdir/bin/init.qcom.sh
Executable file → Normal file
|
@ -84,13 +84,10 @@ start_msm_irqbalance_8939()
|
|||
{
|
||||
if [ -f /system/vendor/bin/msm_irqbalance ]; then
|
||||
case "$platformid" in
|
||||
"239" | "293" | "294" | "295" | "304" | "313" | "338" | "351" | "353" )
|
||||
"239" | "293" | "294" | "295" | "304" | "313" | "338" | "351" | "353" | "354" | "363" | "364")
|
||||
start vendor.msm_irqbalance;;
|
||||
"349" | "350" )
|
||||
if [ -f /system/vendor/etc/msm_irqbalance_sdm632.conf ]; then
|
||||
cp /system/vendor/etc/msm_irqbalance_sdm632.conf /system/vendor/etc/msm_irqbalance.conf
|
||||
fi
|
||||
start vendor.msm_irqbalance;;
|
||||
start vendor.msm_irqbal_lb;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
@ -373,7 +370,7 @@ case "$target" in
|
|||
fi
|
||||
if [ "$low_ram" != "true" ]; then
|
||||
case "$soc_id" in
|
||||
"294" | "295" | "303" | "307" | "308" | "309" | "313" | "320" | "353")
|
||||
"294" | "295" | "303" | "307" | "308" | "309" | "313" | "320" | "353" | "354" | "363" | "364")
|
||||
case "$hw_platform" in
|
||||
"Surf")
|
||||
setprop qemu.hw.mainkeys 0
|
||||
|
|
80
rootdir/bin/init.qcom.syspart_fixup.sh
Normal file
80
rootdir/bin/init.qcom.syspart_fixup.sh
Normal file
|
@ -0,0 +1,80 @@
|
|||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2012, 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.
|
||||
#
|
||||
|
||||
target="$1"
|
||||
serial="$2"
|
||||
|
||||
# No path is set up at this point so we have to do it here.
|
||||
PATH=/sbin:/system/sbin:/system/bin:/system/xbin
|
||||
export PATH
|
||||
|
||||
mount_needed=false;
|
||||
|
||||
if [ ! -f /system/etc/boot_fixup ];then
|
||||
# This should be the first command
|
||||
# remount system as read-write.
|
||||
mount -o rw,remount,barrier=1 /system
|
||||
mount_needed=true;
|
||||
fi
|
||||
|
||||
# **** WARNING *****
|
||||
# This runs in a single-threaded, critical path portion
|
||||
# of the Android bootup sequence. This is to guarantee
|
||||
# all necessary system partition fixups are done before
|
||||
# the rest of the system starts up. Run any non-
|
||||
# timing critical tasks in a separate process to
|
||||
# prevent slowdown at boot.
|
||||
|
||||
# Run modem link script
|
||||
if [ -f /system/etc/init.qcom.modem_links.sh ]; then
|
||||
/system/vendor/bin/init.qcom.modem_links.sh
|
||||
fi
|
||||
|
||||
# Run mdm link script
|
||||
if [ -f /system/etc/init.qcom.mdm_links.sh ]; then
|
||||
/system/vendor/bin/init.qcom.mdm_links.sh
|
||||
fi
|
||||
|
||||
# Run wifi script
|
||||
if [ -f /vendor/bin/init.qcom.wifi.sh ]; then
|
||||
/vendor/bin/init.qcom.wifi.sh "$target" "$serial"
|
||||
fi
|
||||
|
||||
# Run the sensor script
|
||||
if [ -f /system/etc/init.qcom.sensor.sh ]; then
|
||||
/system/vendor/bin/init.qcom.sensor.sh
|
||||
fi
|
||||
|
||||
touch /system/etc/boot_fixup
|
||||
|
||||
if $mount_needed ;then
|
||||
# This should be the last command
|
||||
# remount system as read-only.
|
||||
mount -o ro,remount,barrier=1 /system
|
||||
fi
|
33
rootdir/bin/init.qcom.usb.sh
Executable file → Normal file
33
rootdir/bin/init.qcom.usb.sh
Executable file → Normal file
|
@ -110,12 +110,11 @@ fi
|
|||
# Allow USB enumeration with default PID/VID
|
||||
#
|
||||
baseband=`getprop ro.baseband`
|
||||
debuggable=`getprop ro.debuggable`
|
||||
|
||||
echo 1 > /sys/class/android_usb/f_mass_storage/lun/nofua
|
||||
usb_config=`getprop persist.sys.usb.config`
|
||||
case "$usb_config" in
|
||||
"" | "adb" | "none") #USB persist config not set, select default configuration
|
||||
"" | "adb") #USB persist config not set, select default configuration
|
||||
case "$esoc_link" in
|
||||
"PCIe")
|
||||
setprop persist.sys.usb.config diag,diag_mdm,serial_cdev,rmnet_qti_ether,mass_storage,adb
|
||||
|
@ -134,12 +133,7 @@ case "$usb_config" in
|
|||
soc_machine=${soc_machine:0:3}
|
||||
case "$soc_machine" in
|
||||
"SDA")
|
||||
# setprop persist.sys.usb.config diag,adb
|
||||
if [ -z "$debuggable" -o "$debuggable" = "1" ]; then
|
||||
setprop persist.sys.usb.config adb
|
||||
else
|
||||
setprop persist.sys.usb.config none
|
||||
fi
|
||||
setprop persist.sys.usb.config diag,adb
|
||||
;;
|
||||
*)
|
||||
case "$target" in
|
||||
|
@ -180,12 +174,7 @@ case "$usb_config" in
|
|||
fi
|
||||
;;
|
||||
"msm8998" | "sdm660" | "apq8098_latv")
|
||||
# setprop persist.sys.usb.config diag,serial_cdev,rmnet,adb
|
||||
if [ -z "$debuggable" -o "$debuggable" = "1" ]; then
|
||||
setprop persist.sys.usb.config adb
|
||||
else
|
||||
setprop persist.sys.usb.config none
|
||||
fi
|
||||
setprop persist.sys.usb.config diag,serial_cdev,rmnet,adb
|
||||
;;
|
||||
"sdm845")
|
||||
setprop persist.sys.usb.config diag,serial_cdev,rmnet,dpl,adb
|
||||
|
@ -273,14 +262,6 @@ if [ -d /config/usb_gadget ]; then
|
|||
|
||||
setprop sys.usb.configfs 1
|
||||
else
|
||||
persist_comp=`getprop persist.sys.usb.config`
|
||||
comp=`getprop sys.usb.config`
|
||||
echo $persist_comp
|
||||
echo $comp
|
||||
if [ "$comp" != "$persist_comp" ]; then
|
||||
echo "setting sys.usb.config"
|
||||
setprop sys.usb.config $persist_comp
|
||||
fi
|
||||
#
|
||||
# Do target specific things
|
||||
#
|
||||
|
@ -314,6 +295,14 @@ else
|
|||
esac
|
||||
;;
|
||||
esac
|
||||
persist_comp=`getprop persist.sys.usb.config`
|
||||
comp=`getprop sys.usb.config`
|
||||
echo $persist_comp
|
||||
echo $comp
|
||||
if [ "$comp" != "$persist_comp" ]; then
|
||||
echo "setting sys.usb.config"
|
||||
setprop sys.usb.config $persist_comp
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
|
|
505
rootdir/bin/init.qcom.wifi.sh
Normal file
505
rootdir/bin/init.qcom.wifi.sh
Normal file
|
@ -0,0 +1,505 @@
|
|||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2010-2013, 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 "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.
|
||||
#
|
||||
# This script will load and unload the wifi driver to put the wifi in
|
||||
# in deep sleep mode so that there won't be voltage leakage.
|
||||
# Loading/Unloading the driver only incase if the Wifi GUI is not going
|
||||
# to Turn ON the Wifi. In the Script if the wlan driver status is
|
||||
# ok(GUI loaded the driver) or loading(GUI is loading the driver) then
|
||||
# the script won't do anything. Otherwise (GUI is not going to Turn On
|
||||
# the Wifi) the script will load/unload the driver
|
||||
# This script will get called after post bootup.
|
||||
|
||||
target="$1"
|
||||
serialno="$2"
|
||||
|
||||
btsoc=""
|
||||
|
||||
# No path is set up at this point so we have to do it here.
|
||||
PATH=/sbin:/system/sbin:/system/bin:/system/xbin
|
||||
export PATH
|
||||
|
||||
# Trigger WCNSS platform driver
|
||||
trigger_wcnss()
|
||||
{
|
||||
# We need to trigger WCNSS platform driver, WCNSS driver
|
||||
# will export a file which we must touch so that the
|
||||
# driver knows that userspace is ready to handle firmware
|
||||
# download requests.
|
||||
|
||||
# See if an appropriately named device file is present
|
||||
wcnssnode=`ls /dev/wcnss*`
|
||||
case "$wcnssnode" in
|
||||
*wcnss*)
|
||||
# Before triggering wcnss, let it know that
|
||||
# caldata is available at userspace.
|
||||
if [ -e /data/misc/wifi/WCNSS_qcom_wlan_cal.bin ]; then
|
||||
calparm=`ls /sys/module/wcnsscore/parameters/has_calibrated_data`
|
||||
if [ -e $calparm ] && [ ! -e /data/misc/wifi/WCN_FACTORY ]; then
|
||||
echo 1 > $calparm
|
||||
fi
|
||||
fi
|
||||
# There is a device file. Write to the file
|
||||
# so that the driver knows userspace is
|
||||
# available for firmware download requests
|
||||
echo 1 > $wcnssnode
|
||||
;;
|
||||
|
||||
*)
|
||||
# There is not a device file present, so
|
||||
# the driver must not be available
|
||||
echo "No WCNSS device node detected"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Plumb down the device serial number
|
||||
if [ -f /sys/devices/*wcnss-wlan/serial_number ]; then
|
||||
cd /sys/devices/*wcnss-wlan
|
||||
echo $serialno > serial_number
|
||||
cd /
|
||||
elif [ -f /sys/devices/platform/wcnss_wlan.0/serial_number ]; then
|
||||
echo $serialno > /sys/devices/platform/wcnss_wlan.0/serial_number
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
case "$target" in
|
||||
msm8974* | msm8226* | msm8610*)
|
||||
|
||||
# Check whether device is plugged on the HSIC bus
|
||||
# Currently HSIC bus will be the first index
|
||||
|
||||
if [ -e /sys/bus/platform/drivers/msm_hsic_host ]; then
|
||||
if [ ! -L /sys/bus/usb/devices/1-1 ]; then
|
||||
echo msm_hsic_host > /sys/bus/platform/drivers/msm_hsic_host/unbind
|
||||
fi
|
||||
|
||||
chown -h system.system /sys/bus/platform/drivers/msm_hsic_host/bind
|
||||
chown -h system.system /sys/bus/platform/drivers/msm_hsic_host/unbind
|
||||
chmod -h 0200 /sys/bus/platform/drivers/msm_hsic_host/bind
|
||||
chmod -h 0200 /sys/bus/platform/drivers/msm_hsic_host/unbind
|
||||
fi
|
||||
|
||||
wlanchip=""
|
||||
|
||||
# force ar6004 is ar6004_wlan.conf existed.
|
||||
if [ -f /system/etc/firmware/ath6k/AR6004/ar6004_wlan.conf ]; then
|
||||
wlanchip=`cat /system/etc/firmware/ath6k/AR6004/ar6004_wlan.conf`
|
||||
fi
|
||||
|
||||
# auto detect ar6004-sdio card
|
||||
# for ar6004-sdio card, the vendor id and device id is as the following
|
||||
# vendor id device id
|
||||
# 0x0271 0x0400
|
||||
# 0x0271 0x0401
|
||||
if [ "$wlanchip" == "" ]; then
|
||||
sdio_vendors=`echo \`cat /sys/bus/mmc/devices/*/*/vendor\``
|
||||
sdio_devices=`echo \`cat /sys/bus/mmc/devices/*/*/device\``
|
||||
ven_idx=0
|
||||
|
||||
for vendor in $sdio_vendors; do
|
||||
case "$vendor" in
|
||||
"0x0271")
|
||||
dev_idx=0
|
||||
for device in $sdio_devices; do
|
||||
if [ $ven_idx -eq $dev_idx ]; then
|
||||
case "$device" in
|
||||
"0x0400" | "0x0401" | "0x0402")
|
||||
wlanchip="AR6004-SDIO"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
dev_idx=$(( $dev_idx + 1))
|
||||
done
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
ven_idx=$(( $ven_idx + 1))
|
||||
done
|
||||
# auto detect ar6004-sdio card end
|
||||
fi
|
||||
|
||||
# for ar6004-usb card, the vendor id and device id is as the following
|
||||
# vendor id product id
|
||||
# 0x0cf3 0x9374
|
||||
# 0x0cf3 0x9372
|
||||
if [ "$wlanchip" == "" ]; then
|
||||
usb_vendors=`echo \`cat /sys/bus/usb/devices/*/*/idVendor\``
|
||||
usb_products=`echo \`cat /sys/bus/usb/devices/*/*/idProduct\``
|
||||
ven_idx=0
|
||||
|
||||
for vendor in $usb_vendors; do
|
||||
case "$vendor" in
|
||||
"0cf3")
|
||||
dev_idx=0
|
||||
for product in $usb_products; do
|
||||
if [ $ven_idx -eq $dev_idx ]; then
|
||||
case "$product" in
|
||||
"9374" | "9372")
|
||||
wlanchip="AR6004-USB"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
dev_idx=$(( $dev_idx + 1))
|
||||
done
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
ven_idx=$(( $ven_idx + 1))
|
||||
done
|
||||
# auto detect ar6004-usb card end
|
||||
fi
|
||||
|
||||
echo "The WLAN Chip ID is $wlanchip"
|
||||
case "$wlanchip" in
|
||||
"AR6004-USB")
|
||||
echo msm_hsic_host > /sys/bus/platform/drivers/msm_hsic_host/unbind
|
||||
setprop wlan.driver.ath 2
|
||||
setprop qcom.bluetooth.soc ath3k
|
||||
btsoc="ath3k"
|
||||
rm /system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/ath6kl-3.5/ath6kl_usb.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin_usb \
|
||||
/system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin_usb \
|
||||
/system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw3.0/bdata.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw3.0/bdata.bin_usb \
|
||||
/system/etc/firmware/ath6k/AR6004/hw3.0/bdata.bin
|
||||
|
||||
# Use different wpa_supplicant.conf template between wcn driver
|
||||
# and ath6kl driver
|
||||
rm /system/etc/wifi/wpa_supplicant.conf
|
||||
ln -s /system/etc/wifi/wpa_supplicant_ath6kl.conf \
|
||||
/system/etc/wifi/wpa_supplicant.conf
|
||||
;;
|
||||
|
||||
"AR6004-SDIO")
|
||||
setprop wlan.driver.ath 2
|
||||
setprop qcom.bluetooth.soc ath3k
|
||||
btsoc="ath3k"
|
||||
# Chown polling nodes as needed from UI running on system server
|
||||
chmod -h 0200 /sys/devices/msm_sdcc.1/polling
|
||||
chmod -h 0200 /sys/devices/msm_sdcc.2/polling
|
||||
chmod -h 0200 /sys/devices/msm_sdcc.3/polling
|
||||
chmod -h 0200 /sys/devices/msm_sdcc.4/polling
|
||||
|
||||
chown -h system.system /sys/devices/msm_sdcc.1/polling
|
||||
chown -h system.system /sys/devices/msm_sdcc.2/polling
|
||||
chown -h system.system /sys/devices/msm_sdcc.3/polling
|
||||
chown -h system.system /sys/devices/msm_sdcc.4/polling
|
||||
|
||||
rm /system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/ath6kl-3.5/ath6kl_sdio.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin_sdio \
|
||||
/system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin_sdio \
|
||||
/system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw3.0/bdata.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw3.0/bdata.bin_sdio \
|
||||
/system/etc/firmware/ath6k/AR6004/hw3.0/bdata.bin
|
||||
|
||||
# Use different wpa_supplicant.conf template between wcn driver
|
||||
# and ath6kl driver
|
||||
rm /system/etc/wifi/wpa_supplicant.conf
|
||||
ln -s /system/etc/wifi/wpa_supplicant_ath6kl.conf \
|
||||
/system/etc/wifi/wpa_supplicant.conf
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "*** WI-FI chip ID is not specified in /persist/wlan_chip_id **"
|
||||
echo "*** Use the default WCN driver. **"
|
||||
setprop wlan.driver.ath 0
|
||||
rm /system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/pronto/pronto_wlan.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
# Populate the writable driver configuration file
|
||||
if [ ! -s /data/misc/wifi/WCNSS_qcom_cfg.ini ]; then
|
||||
cp /system/etc/wifi/WCNSS_qcom_cfg.ini \
|
||||
/data/misc/wifi/WCNSS_qcom_cfg.ini
|
||||
chown -h system:wifi /data/misc/wifi/WCNSS_qcom_cfg.ini
|
||||
chmod -h 660 /data/misc/wifi/WCNSS_qcom_cfg.ini
|
||||
fi
|
||||
|
||||
# The property below is used in Qcom SDK for softap to determine
|
||||
# the wifi driver config file
|
||||
setprop wlan.driver.config /data/misc/wifi/WCNSS_qcom_cfg.ini
|
||||
|
||||
# Use different wpa_supplicant.conf template between wcn driver
|
||||
# and ath6kl driver
|
||||
rm /system/etc/wifi/wpa_supplicant.conf
|
||||
ln -s /system/etc/wifi/wpa_supplicant_wcn.conf \
|
||||
/system/etc/wifi/wpa_supplicant.conf
|
||||
|
||||
# Trigger WCNSS platform driver
|
||||
trigger_wcnss &
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
apq8084*)
|
||||
echo "*** Use the CNSS CLD driver.**"
|
||||
setprop wlan.driver.ath 0
|
||||
|
||||
# Use different wpa_supplicant.conf template between wcn driver
|
||||
# and ath6kl driver
|
||||
rm /system/etc/wifi/wpa_supplicant.conf
|
||||
ln -s /system/etc/wifi/wpa_supplicant_wcn.conf \
|
||||
/system/etc/wifi/wpa_supplicant.conf
|
||||
;;
|
||||
|
||||
msm8960*)
|
||||
|
||||
# Move cfg80211.ko to prima directory, the default cfg80211.ko is
|
||||
# for wcnss solution
|
||||
if [ ! -L /system/lib/modules/cfg80211.ko ]; then
|
||||
mv /system/lib/modules/cfg80211.ko /system/lib/modules/prima/
|
||||
fi
|
||||
|
||||
wlanchip=""
|
||||
|
||||
if [ -f /system/etc/firmware/ath6k/AR6004/ar6004_wlan.conf ]; then
|
||||
wlanchip=`cat /system/etc/firmware/ath6k/AR6004/ar6004_wlan.conf`
|
||||
fi
|
||||
|
||||
if [ "$wlanchip" == "" ]; then
|
||||
# auto detect ar6004-usb card
|
||||
# for ar6004-usb card, the vendor id and device id is as the following
|
||||
# vendor id product id
|
||||
# 0x0cf3 0x9374
|
||||
# 0x0cf3 0x9372
|
||||
usb_vendors=`echo \`cat /sys/bus/usb/devices/*/*/idVendor\``
|
||||
usb_products=`echo \`cat /sys/bus/usb/devices/*/*/idProduct\``
|
||||
ven_idx=0
|
||||
|
||||
for vendor in $usb_vendors; do
|
||||
case "$vendor" in
|
||||
"0cf3")
|
||||
dev_idx=0
|
||||
for product in $usb_products; do
|
||||
if [ $ven_idx -eq $dev_idx ]; then
|
||||
case "$product" in
|
||||
"9374" | "9372")
|
||||
wlanchip="AR6004-USB"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
dev_idx=$(( $dev_idx + 1))
|
||||
done
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
ven_idx=$(( $ven_idx + 1))
|
||||
done
|
||||
# auto detect ar6004-usb card end
|
||||
fi
|
||||
|
||||
if [ "$wlanchip" == "" ]; then
|
||||
# auto detect ar6004-sdio card
|
||||
# for ar6004-sdio card, the vendor id and device id is
|
||||
# as the following
|
||||
# vendor id device id
|
||||
# 0x0271 0x0400
|
||||
# 0x0271 0x0401
|
||||
sdio_vendors=`echo \`cat /sys/bus/mmc/devices/*/*/vendor\``
|
||||
sdio_devices=`echo \`cat /sys/bus/mmc/devices/*/*/device\``
|
||||
ven_idx=0
|
||||
|
||||
for vendor in $sdio_vendors; do
|
||||
case "$vendor" in
|
||||
"0x0271")
|
||||
dev_idx=0
|
||||
for device in $sdio_devices; do
|
||||
if [ $ven_idx -eq $dev_idx ]; then
|
||||
case "$device" in
|
||||
"0x0400" | "0x0401")
|
||||
wlanchip="AR6004-SDIO"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
dev_idx=$(( $dev_idx + 1))
|
||||
done
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
ven_idx=$(( $ven_idx + 1))
|
||||
done
|
||||
# auto detect ar6004-sdio card end
|
||||
fi
|
||||
|
||||
echo "The WLAN Chip ID is $wlanchip"
|
||||
case "$wlanchip" in
|
||||
"AR6004-USB")
|
||||
setprop wlan.driver.ath 2
|
||||
rm /system/lib/modules/wlan.ko
|
||||
rm /system/lib/modules/cfg80211.ko
|
||||
ln -s /system/lib/modules/ath6kl-3.5/ath6kl_usb.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/ath6kl-3.5/cfg80211.ko \
|
||||
/system/lib/modules/cfg80211.ko
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin_usb \
|
||||
/system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin_usb \
|
||||
/system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin
|
||||
|
||||
# Use different wpa_supplicant.conf template between wcn driver
|
||||
# and ath6kl driver
|
||||
rm /system/etc/wifi/wpa_supplicant.conf
|
||||
ln -s /system/etc/wifi/wpa_supplicant_ath6kl.conf \
|
||||
/system/etc/wifi/wpa_supplicant.conf
|
||||
;;
|
||||
"AR6004-SDIO")
|
||||
setprop wlan.driver.ath 2
|
||||
setprop qcom.bluetooth.soc ath3k
|
||||
btsoc="ath3k"
|
||||
rm /system/lib/modules/wlan.ko
|
||||
rm /system/lib/modules/cfg80211.ko
|
||||
ln -s /system/lib/modules/ath6kl-3.5/ath6kl_sdio.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/ath6kl-3.5/cfg80211.ko \
|
||||
/system/lib/modules/cfg80211.ko
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin
|
||||
rm /system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin_sdio \
|
||||
/system/etc/firmware/ath6k/AR6004/hw1.3/fw.ram.bin
|
||||
ln -s /system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin_sdio \
|
||||
/system/etc/firmware/ath6k/AR6004/hw1.3/bdata.bin
|
||||
|
||||
# Use different wpa_supplicant.conf template between wcn driver
|
||||
# and ath6kl driver
|
||||
rm /system/etc/wifi/wpa_supplicant.conf
|
||||
ln -s /system/etc/wifi/wpa_supplicant_ath6kl.conf \
|
||||
/system/etc/wifi/wpa_supplicant.conf
|
||||
;;
|
||||
*)
|
||||
echo "*** WI-FI chip ID is not specified in /persist/wlan_chip_id **"
|
||||
echo "*** Use the default WCN driver. **"
|
||||
setprop wlan.driver.ath 0
|
||||
rm /system/lib/modules/wlan.ko
|
||||
rm /system/lib/modules/cfg80211.ko
|
||||
ln -s /system/lib/modules/prima/prima_wlan.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/prima/cfg80211.ko \
|
||||
/system/lib/modules/cfg80211.ko
|
||||
|
||||
# The property below is used in Qcom SDK for softap to determine
|
||||
# the wifi driver config file
|
||||
setprop wlan.driver.config /data/misc/wifi/WCNSS_qcom_cfg.ini
|
||||
|
||||
# Use different wpa_supplicant.conf template between wcn driver
|
||||
# and ath6kl driver
|
||||
rm /system/etc/wifi/wpa_supplicant.conf
|
||||
ln -s /system/etc/wifi/wpa_supplicant_wcn.conf \
|
||||
/system/etc/wifi/wpa_supplicant.conf
|
||||
|
||||
# Trigger WCNSS platform driver
|
||||
trigger_wcnss &
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
msm7627a*)
|
||||
|
||||
# The default cfg80211 module is for volans
|
||||
if [ ! -L /system/lib/modules/cfg80211.ko ]; then
|
||||
mv /system/lib/modules/cfg80211.ko /system/lib/modules/volans/
|
||||
fi
|
||||
|
||||
wlanchip=`cat /persist/wlan_chip_id`
|
||||
echo "The WLAN Chip ID is $wlanchip"
|
||||
case "$wlanchip" in
|
||||
"ATH6KL")
|
||||
setprop wlan.driver.ath 1
|
||||
rm /system/lib/modules/wlan.ko
|
||||
rm /system/lib/modules/cfg80211.ko
|
||||
ln -s /system/lib/modules/ath6kl/ath6kl_sdio.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/ath6kl/cfg80211.ko \
|
||||
/system/lib/modules/cfg80211.ko
|
||||
;;
|
||||
"WCN1314")
|
||||
setprop wlan.driver.ath 0
|
||||
rm /system/lib/modules/wlan.ko
|
||||
rm /system/lib/modules/cfg80211.ko
|
||||
ln -s /system/lib/modules/volans/WCN1314_rf.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/volans/cfg80211.ko \
|
||||
/system/lib/modules/cfg80211.ko
|
||||
;;
|
||||
*)
|
||||
setprop wlan.driver.ath 1
|
||||
rm /system/lib/modules/wlan.ko
|
||||
rm /system/lib/modules/cfg80211.ko
|
||||
ln -s /system/lib/modules/ath6kl/ath6kl_sdio.ko \
|
||||
/system/lib/modules/wlan.ko
|
||||
ln -s /system/lib/modules/ath6kl/cfg80211.ko \
|
||||
/system/lib/modules/cfg80211.ko
|
||||
echo "************************************************************"
|
||||
echo "*** Error:WI-FI chip ID is not specified in"
|
||||
echo "/persist/wlan_chip_id"
|
||||
echo "******* WI-FI may not work ***************************"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
msm7627*)
|
||||
ln -s /data/hostapd/qcom_cfg.ini /etc/firmware/wlan/qcom_cfg.ini
|
||||
ln -s /persist/qcom_wlan_nv.bin /etc/firmware/wlan/qcom_wlan_nv.bin
|
||||
;;
|
||||
|
||||
msm8660*)
|
||||
;;
|
||||
|
||||
msm7630*)
|
||||
;;
|
||||
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
90
rootdir/bin/init.qti.fm.sh
Normal file
90
rootdir/bin/init.qti.fm.sh
Normal file
|
@ -0,0 +1,90 @@
|
|||
#!/vendor/bin/sh
|
||||
# Copyright (c) 2009-2011, 2015, 2017 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.
|
||||
#
|
||||
|
||||
setprop hw.fm.init 0
|
||||
|
||||
mode=`getprop hw.fm.mode`
|
||||
version=199217
|
||||
|
||||
LOG_TAG="qti-fm"
|
||||
LOG_NAME="${0}:"
|
||||
|
||||
loge ()
|
||||
{
|
||||
/vendor/bin/log -t $LOG_TAG -p e "$LOG_NAME $@"
|
||||
}
|
||||
|
||||
logi ()
|
||||
{
|
||||
/vendor/bin/log -t $LOG_TAG -p i "$LOG_NAME $@"
|
||||
}
|
||||
|
||||
failed ()
|
||||
{
|
||||
loge "$1: exit code $2"
|
||||
exit $2
|
||||
}
|
||||
|
||||
logi "In FM shell Script"
|
||||
logi "mode: $mode"
|
||||
logi "Version : $version"
|
||||
|
||||
#$fm_qsoc_patches <fm_chipVersion> <enable/disable WCM>
|
||||
#
|
||||
case $mode in
|
||||
"normal")
|
||||
logi "inserting the radio transport module"
|
||||
echo 1 > /sys/module/radio_iris_transport/parameters/fmsmd_set
|
||||
/vendor/bin/fm_qsoc_patches $version 0
|
||||
;;
|
||||
"wa_enable")
|
||||
/vendor/bin/fm_qsoc_patches $version 1
|
||||
;;
|
||||
"wa_disable")
|
||||
/vendor/bin/fm_qsoc_patches $version 2
|
||||
;;
|
||||
*)
|
||||
logi "Shell: Default case"
|
||||
/vendor/bin/fm_qsoc_patches $version 0
|
||||
;;
|
||||
esac
|
||||
|
||||
exit_code_fm_qsoc_patches=$?
|
||||
|
||||
case $exit_code_fm_qsoc_patches in
|
||||
0)
|
||||
logi "FM QSoC calibration and firmware download succeeded"
|
||||
;;
|
||||
*)
|
||||
failed "FM QSoC firmware download and/or calibration failed" $exit_code_fm_qsoc_patches
|
||||
;;
|
||||
esac
|
||||
|
||||
setprop hw.fm.init 1
|
||||
|
||||
exit 0
|
57
rootdir/bin/init.qti.ims.sh
Normal file
57
rootdir/bin/init.qti.ims.sh
Normal file
|
@ -0,0 +1,57 @@
|
|||
#! /vendor/bin/sh
|
||||
|
||||
# Copyright (c) 2014, 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 "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.
|
||||
#
|
||||
#
|
||||
|
||||
dir0=/data
|
||||
trigger_file=$dir0/ims_diabled
|
||||
ims_disabled=`getprop persist.ims.disabled`
|
||||
target=`getprop ro.build.product`
|
||||
|
||||
#if [ ! -e $trigger_file ]; then
|
||||
# for future use in doing conditional debugging
|
||||
#else
|
||||
#
|
||||
#fi
|
||||
echo "$ims_disabled"
|
||||
echo "$target"
|
||||
|
||||
if [ "$ims_disabled" = "0" ]; then
|
||||
echo "ims will be enabled"
|
||||
setprop service.qti.ims.enabled 1
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$ims_disabled" = "1" ] || [ "$target" = "msm8909_512" ]; then
|
||||
echo "ims is disabled"
|
||||
setprop service.qti.ims.enabled 0
|
||||
else
|
||||
echo "ims is enabled"
|
||||
setprop service.qti.ims.enabled 1
|
||||
fi
|
35
rootdir/bin/init.qti.qseecomd.sh
Normal file
35
rootdir/bin/init.qti.qseecomd.sh
Normal file
|
@ -0,0 +1,35 @@
|
|||
#!/vendor/bin/sh
|
||||
# Copyright (c) 2016, 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 "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.
|
||||
#
|
||||
#
|
||||
|
||||
while [ "$registered" != "true" ]
|
||||
do
|
||||
sleep 0.1
|
||||
registered="`getprop sys.listeners.registered`"
|
||||
done
|
125
rootdir/etc/init.qcom.factory.rc
Normal file
125
rootdir/etc/init.qcom.factory.rc
Normal file
|
@ -0,0 +1,125 @@
|
|||
#
|
||||
# Copyright (c) 2009-2016, 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.
|
||||
#
|
||||
|
||||
# Define fastmmi
|
||||
service fastmmi /system/bin/mmi
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
|
||||
service mmid /vendor/bin/mmid
|
||||
user root
|
||||
group root
|
||||
disabled
|
||||
|
||||
service mmi_diag /system/bin/mmi_diag
|
||||
class main
|
||||
user root
|
||||
group root oem_2901
|
||||
disabled
|
||||
|
||||
on property:sys.boot_mode=ffbm
|
||||
write ${persist.vendor.mmi.misc_dev_path} "ffbm-01"
|
||||
|
||||
on property:sys.boot_mode=qmmi
|
||||
write ${persist.vendor.mmi.misc_dev_path} "ffbm-02"
|
||||
|
||||
on property:sys.boot_mode=normal
|
||||
write ${persist.vendor.mmi.misc_dev_path} "normal"
|
||||
|
||||
# Creating a scratch storage on /data for factory testing.
|
||||
on factory-fs && property:ro.bootmode=ffbm-00
|
||||
mount tmpfs tmpfs /data
|
||||
|
||||
on factory-fs && property:ro.bootmode=ffbm-01
|
||||
mount tmpfs tmpfs /data
|
||||
|
||||
on post-fs-data
|
||||
# aligned the usb port with system standard, otherwise if only diag be added
|
||||
# Then in QMMI mode, the whole Andoid be booted, but due to the ro.bootmode is
|
||||
# not normal/unknow, then when it apply the default funcs, it will turn to MTP
|
||||
# which cause the diag/Wwan/modem port all be lost in qmmi mode. Details:
|
||||
# UsbDeviceManager.java---->getDefaultFunctions and trySetEnabledFunctions
|
||||
|
||||
setprop persist.sys.usb.ffbm-00.func ${persist.sys.usb.config}
|
||||
setprop persist.sys.usb.ffbm-01.func ${persist.sys.usb.config}
|
||||
setprop persist.sys.usb.ffbm-02.func ${persist.sys.usb.config}
|
||||
|
||||
on mmi && property:ro.bootmode=ffbm-00
|
||||
# ========================================================
|
||||
# This is FFBM only settings.
|
||||
# ========================================================
|
||||
#mkdir for factory data files.
|
||||
mkdir /persist/FTM_AP 0750 root root
|
||||
|
||||
start fastmmi
|
||||
# start qcom-post-boot to set the misc partition path property value
|
||||
start qcom-post-boot
|
||||
start mmi_diag
|
||||
|
||||
on mmi && property:ro.bootmode=ffbm-01
|
||||
# ========================================================
|
||||
# This is FFBM only settings.
|
||||
# ========================================================
|
||||
#mkdir for factory data files.
|
||||
mkdir /persist/FTM_AP 0750 root root
|
||||
|
||||
start fastmmi
|
||||
## start qcom-post-boot to set the misc partition path property value
|
||||
start qcom-post-boot
|
||||
start mmi_diag
|
||||
|
||||
on ffbm
|
||||
trigger early-fs
|
||||
trigger factory-fs
|
||||
trigger fs
|
||||
trigger post-fs
|
||||
|
||||
# Mount fstab in init.{$device}.rc by mount_all with '--late' parameter
|
||||
# to only mount entries with 'latemount'. This is needed if '--early' is
|
||||
# specified in the previous mount_all command on the fs stage.
|
||||
# With /system mounted and properties form /system + /factory available,
|
||||
# some services can be started.
|
||||
trigger late-fs
|
||||
|
||||
# Now we can mount /data. File encryption requires keymaster to decrypt
|
||||
# /data, which in turn can only be loaded when system properties are present.
|
||||
trigger post-fs-data
|
||||
|
||||
# Now we can start zygote for devices with file based encryption
|
||||
trigger zygote-start
|
||||
|
||||
# Load persist properties and override properties (if enabled) from /data.
|
||||
trigger load_persist_props_action
|
||||
|
||||
# Remove a file to wake up anything waiting for firmware.
|
||||
trigger firmware_mounts_complete
|
||||
|
||||
trigger early-boot
|
||||
trigger boot
|
||||
trigger mmi
|
|
@ -216,6 +216,13 @@ on boot
|
|||
# Create vpp directory
|
||||
mkdir /persist/vpp 0770 media media
|
||||
|
||||
# Set permission for double tap to wake support
|
||||
chown system system /sys/devices/soc/c177000.i2c/i2c-3/3-0038/fts_gesture_mode
|
||||
chmod 0660 /sys/devices/soc/c177000.i2c/i2c-3/3-0038/fts_gesture_mode
|
||||
|
||||
# Wifi firmware reload path
|
||||
chown wifi wifi /sys/module/wlan/parameters/fwpath
|
||||
|
||||
# load WIGIG platform driver
|
||||
insmod /vendor/lib/modules/msm_11ad_proxy.ko
|
||||
|
||||
|
|
Loading…
Reference in a new issue