init.target.rc 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. # Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
  2. #
  3. # Redistribution and use in source and binary forms, with or without
  4. # modification, are permitted provided that the following conditions are
  5. # met:
  6. # * Redistributions of source code must retain the above copyright
  7. # notice, this list of conditions and the following disclaimer.
  8. # * Redistributions in binary form must reproduce the above
  9. # copyright notice, this list of conditions and the following
  10. # disclaimer in the documentation and/or other materials provided
  11. # with the distribution.
  12. # * Neither the name of The Linux Foundation nor the names of its
  13. # contributors may be used to endorse or promote products derived
  14. # from this software without specific prior written permission.
  15. #
  16. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
  17. # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  18. # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
  19. # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
  20. # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  21. # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  22. # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
  23. # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  24. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  25. # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
  26. # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. #
  28. # Changes from Qualcomm Innovation Center are provided under the following
  29. # license:
  30. #
  31. # Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
  32. #
  33. # Redistribution and use in source and binary forms, with or without
  34. # modification, are permitted (subject to the limitations in the
  35. # disclaimer below) provided that the following conditions are met:
  36. #
  37. # * Redistributions of source code must retain the above copyright
  38. # notice, this list of conditions and the following disclaimer.
  39. #
  40. # * Redistributions in binary form must reproduce the above
  41. # copyright notice, this list of conditions and the following
  42. # disclaimer in the documentation and/or other materials provided
  43. # with the distribution.
  44. #
  45. # * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
  46. # contributors may be used to endorse or promote products derived
  47. # from this software without specific prior written permission.
  48. #
  49. # NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
  50. # GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
  51. # HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
  52. # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  53. # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  54. # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  55. # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  56. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  57. # GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  58. # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
  59. # IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  60. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
  61. # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  62. #
  63. import /vendor/etc/init/hw/init.qti.kernel.rc
  64. on early-init
  65. write /proc/sys/kernel/printk_devkmsg ratelimited
  66. export MEMTAG_OPTIONS off
  67. on init
  68. wait /dev/block/platform/soc/${ro.boot.bootdevice}
  69. symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
  70. chown system system /sys/devices/platform/soc/1d84000.ufshc/auto_hibern8
  71. chmod 0660 /sys/devices/platform/soc/1d84000.ufshc/auto_hibern8
  72. start logd
  73. on early-fs
  74. start vold
  75. on fs
  76. start hwservicemanager
  77. mount_all /vendor/etc/fstab.qcom --early
  78. chown root system /mnt/vendor/persist
  79. chmod 0771 /mnt/vendor/persist
  80. restorecon_recursive /mnt/vendor/persist
  81. mkdir /mnt/vendor/persist/data 0700 system system
  82. on post-fs
  83. # set RLIMIT_MEMLOCK to 64MB
  84. setrlimit 8 67108864 67108864
  85. on late-fs
  86. wait_for_prop hwservicemanager.ready true
  87. #exec_start wait_for_keymaster
  88. mount_all /vendor/etc/fstab.qcom --late
  89. on post-fs-data
  90. mkdir /vendor/data/tombstones 0771 system system
  91. # Enable WLAN cold boot calibration
  92. write /sys/kernel/cnss/fs_ready 1
  93. on early-boot
  94. start vendor.sensors
  95. verity_update_state
  96. on boot
  97. write /dev/cpuset/audio-app/cpus 1-2
  98. chown system /sys/devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_enable
  99. chmod 0660 /sys/devices/platform/soc/990000.i2c/i2c-0/0-0038/trusted_touch_enable
  100. chown system /sys/devices/platform/soc/990000.spi/spi_master/spi0/spi0.0/trusted_touch_enable
  101. chmod 0660 /sys/devices/platform/soc/990000.spi/spi_master/spi0/spi0.0/trusted_touch_enable
  102. chown system /sys/devices/platform/soc/980000.i2c/i2c-0/0-0062/trusted_touch_enable
  103. chmod 0660 /sys/devices/platform/soc/980000.i2c/i2c-0/0-0062/trusted_touch_enable
  104. chown system /sys/devices/platform/soc/980000.i2c/i2c-0/0-0062/trusted_touch_event
  105. chmod 0660 /sys/devices/platform/soc/980000.i2c/i2c-0/0-0062/trusted_touch_event
  106. chown system /sys/devices/system/cpu/hyp_core_ctl/enable
  107. chown system /sys/devices/system/cpu/hyp_core_ctl/hcc_min_freq
  108. #USB controller configuration
  109. setprop vendor.usb.controller a600000.dwc3
  110. on property:vendor.display.lcd_density=560
  111. setprop dalvik.vm.heapgrowthlimit 256m
  112. on property:vendor.display.lcd_density=640
  113. setprop dalvik.vm.heapgrowthlimit 512m
  114. on init && property:ro.boot.mode=charger
  115. wait_for_prop vendor.all.modules.ready 1
  116. mount_all /vendor/etc/charger_fw_fstab.qti --early
  117. wait /sys/kernel/boot_adsp/boot
  118. write /sys/kernel/boot_adsp/boot 1
  119. on property:init.svc.vendor.charger=running
  120. start vendor.power_off_alarm
  121. setprop sys.usb.controller a600000.dwc3
  122. wait /sys/class/udc/${sys.usb.controller}
  123. setprop sys.usb.configfs 1
  124. write /sys/kernel/cnss/charger_mode 1
  125. #service vendor.lowi /vendor/bin/sscrpcd
  126. # class core
  127. # user system
  128. # group system wakelock
  129. # capabilities BLOCK_SUSPEND
  130. #pd-mapper
  131. service vendor.pd_mapper /vendor/bin/pd-mapper
  132. class core
  133. user system
  134. group system
  135. #Peripheral manager
  136. service vendor.per_mgr /vendor/bin/pm-service
  137. class core
  138. user system
  139. group system
  140. ioprio rt 4
  141. service vendor.per_proxy /vendor/bin/pm-proxy
  142. class core
  143. user system
  144. group system
  145. disabled
  146. service vendor.mdm_helper /vendor/bin/mdm_helper
  147. class core
  148. group system wakelock
  149. disabled
  150. service vendor.mdm_launcher /vendor/bin/sh /vendor/bin/init.mdm.sh
  151. class core
  152. oneshot
  153. on property:init.svc.vendor.per_mgr=running
  154. start vendor.per_proxy
  155. on property:sys.shutdown.requested=*
  156. write /sys/kernel/qcom_rproc/shutdown_in_progress 1
  157. stop vendor.per_proxy
  158. on property:vold.decrypt=trigger_restart_framework
  159. start vendor.cnss_diag
  160. service vendor.cnss_diag /system/vendor/bin/cnss_diag -q -f -t HELIUM
  161. class main
  162. user system
  163. group system wifi inet sdcard_rw media_rw diag
  164. oneshot
  165. on early-boot && property:persist.vendor.pcie.boot_option=*
  166. write /sys/bus/platform/devices/1c00000.qcom,pcie/debug/boot_option ${persist.vendor.pcie.boot_option}
  167. write /sys/bus/platform/devices/1c08000.qcom,pcie/debug/boot_option ${persist.vendor.pcie.boot_option}
  168. on property:sys.boot_completed=1
  169. enable vendor.qvirtmgr
  170. start vendor.qvirtmgr