From 4f23356c79ed230571fe222932bb966c7e7d5ec4 Mon Sep 17 00:00:00 2001 From: chaptsand Date: Sat, 23 Mar 2024 21:10:58 +0800 Subject: [PATCH] sm8550-common: init: Checkout to LA.VENDOR.13.2.0.r1-22400-KAILUA.QSSI14.0 Change-Id: I02932f3da7923dfc8b4fcdc04f98f89cbb610c69 --- init/init.class_main.sh | 88 ++++++++++++++++++++++--------------- init/init.qcom.post_boot.sh | 29 ++++++++++++ init/ueventd.qcom.rc | 1 + 3 files changed, 82 insertions(+), 36 deletions(-) diff --git a/init/init.class_main.sh b/init/init.class_main.sh index 74217c9..d2b978c 100644 --- a/init/init.class_main.sh +++ b/init/init.class_main.sh @@ -47,48 +47,64 @@ esac case "$baseband" in "msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3" | "sdm" | "sdx" | "sm6") - start vendor.qcrild - - case "$baseband" in - "svlte2a" | "csfb") - start qmiproxy - ;; - "sglte" | "sglte2" ) - if [ "x$sgltecsfb" != "xtrue" ]; then - start qmiproxy - else - setprop persist.vendor.radio.voice.modem.index 0 - fi - ;; - esac - - multisim=`getprop persist.radio.multisim.config` - - if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then - start vendor.qcrild2 - elif [ "$multisim" = "tsts" ]; then - start vendor.qcrild2 - start vendor.qcrild3 + # start qcrild only for targets on which modem is present + # modemvalue 0x0 indicates Modem online + # modemvalue 0x1 indicates Modem IP is not functional or disabled + # modemvalue 0x2 indicates Modem offline + modemvalue="0x0" + if [ -f /sys/devices/soc0/modem ]; then + modemvalue=`cat /sys/devices/soc0/modem` fi - case "$datamode" in - "tethered") + if [ $modemvalue != "0x1" ] && [ $modemvalue != "0x2" ]; then + start vendor.qcrild + + case "$baseband" in + "svlte2a" | "csfb") + start qmiproxy + ;; + "sglte" | "sglte2" ) + if [ "x$sgltecsfb" != "xtrue" ]; then + start qmiproxy + else + setprop persist.vendor.radio.voice.modem.index 0 + fi + ;; + esac + + multisim=`getprop persist.radio.multisim.config` + + if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then + start vendor.qcrild2 + elif [ "$multisim" = "tsts" ]; then + start vendor.qcrild2 + start vendor.qcrild3 + fi + + case "$datamode" in + "tethered") # This daemon was also disabled in sm8450 as a qualcomm tethering interface. # start vendor.dataqti - if [ "$low_ram" != "true" ]; then - start vendor.dataadpl - fi - ;; - "concurrent") + if [ "$low_ram" != "true" ]; then + start vendor.dataadpl + fi + ;; + "concurrent") # This daemon was also disabled in sm8450 as a qualcomm tethering interface. # start vendor.dataqti - if [ "$low_ram" != "true" ]; then - start vendor.dataadpl - fi - ;; - *) - ;; - esac + if [ "$low_ram" != "true" ]; then + start vendor.dataadpl + fi + ;; + *) + ;; + esac + else + setprop ro.vendor.radio.noril yes + stop vendor.qcrild + stop vendor.qcrild2 + stop vendor.qcrild3 + fi esac # diff --git a/init/init.qcom.post_boot.sh b/init/init.qcom.post_boot.sh index a6e1053..e38dc66 100644 --- a/init/init.qcom.post_boot.sh +++ b/init/init.qcom.post_boot.sh @@ -856,6 +856,7 @@ function start_hbtp() fi } + case "$target" in "kalama") if [ -f /sys/devices/soc0/chip_family ]; then @@ -884,6 +885,34 @@ case "$target" in ;; esac +case "$target" in + "crow") + if [ -f /sys/devices/soc0/chip_family ]; then + chip_family_id=`cat /sys/devices/soc0/chip_family` + else + chip_family_id=-1 + fi + + echo "adsprpc : chip_family_id : $chip_faily_id" > /dev/kmsg + + case "$chip_family_id" in + "0x92") + if [ -f /sys/devices/platform/soc/soc:qcom,msm_fastrpc/fastrpc_cdsp_status ]; then + fastrpc_cdsp_status=`cat /sys/devices/platform/soc/soc:qcom,msm_fastrpc/fastrpc_cdsp_status` + else + fastrpc_cdsp_status=-1 + fi + + echo "adsprpc : fastrpc_cdsp_status : $fastrpc_cdsp_status" > /dev/kmsg + + if [ $fastrpc_cdsp_status -eq 0 ]; then + setprop vendor.fastrpc.disable.cdsprpcd.daemon 1 + echo "adsprpc : Disabled cdsp daemon" > /dev/kmsg + fi + esac + ;; +esac + case "$target" in "msm7201a_ffa" | "msm7201a_surf" | "msm7627_ffa" | "msm7627_6x" | "msm7627a" | "msm7627_surf" | \ "qsd8250_surf" | "qsd8250_ffa" | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "qsd8650a_st1x") diff --git a/init/ueventd.qcom.rc b/init/ueventd.qcom.rc index 421d568..8e12c63 100644 --- a/init/ueventd.qcom.rc +++ b/init/ueventd.qcom.rc @@ -254,6 +254,7 @@ subsystem mem_buf_vm /sys/devices/platform/soc/1c00000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/net/wlan*/queues/rx-* rps_cpus 0660 system system /dev/spidev0.0 0660 system audio /dev/i2c-7 0660 system audio +/dev/msm_lsm_cdev 0660 system audio /dev/msm_camera/* 0660 system camera /dev/gemini/ 0660 system camera /dev/mercury0 0660 system camera