From 60f0bc50f75846cdd2e2ccae64200e23e7448e89 Mon Sep 17 00:00:00 2001 From: kubersharma001 Date: Wed, 23 Oct 2019 12:19:49 +0530 Subject: [PATCH] sanders: Cleanup/tweak init.{qcom|mmi}.rc Change-Id: I0a31c0dfa75388175c8941e39081ed0a348856a8 --- rootdir/etc/init.mmi.rc | 1 - rootdir/etc/init.qcom.rc | 41 +++++++++++++++------------------------- 2 files changed, 15 insertions(+), 27 deletions(-) diff --git a/rootdir/etc/init.mmi.rc b/rootdir/etc/init.mmi.rc index 8236374..15f3b70 100644 --- a/rootdir/etc/init.mmi.rc +++ b/rootdir/etc/init.mmi.rc @@ -3,7 +3,6 @@ import /vendor/etc/init/hw/init.mmi.usb.rc on early-boot write /sys/module/subsystem_restart/parameters/disable_restart_work 0x0 - write /proc/sys/kernel/poweroff_cmd "/system/bin/reboot -p" on init chown system log /sys/fs/pstore/console-ramoops-0 diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index 6426f94..e532bdc 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -45,29 +45,34 @@ on early-init write /sys/block/zram0/comp_algorithm lz4 write /proc/sys/vm/page-cluster 0 +on init + # Create cgroup mount point for memory + mkdir /sys/fs/cgroup/memory/bg 0750 root system + write /sys/fs/cgroup/memory/bg/memory.swappiness 140 + write /sys/fs/cgroup/memory/bg/memory.move_charge_at_immigrate 1 + chown root system /sys/fs/cgroup/memory/bg/tasks + chmod 0660 /sys/fs/cgroup/memory/bg/tasks + + write /sys/module/qpnp_rtc/parameters/poweron_alarm 1 + on fs wait /dev/block/platform/soc/${ro.boot.bootdevice} symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice - - # Start HW service manager early - start hwservicemanager mount_all /vendor/etc/fstab.qcom --early write /proc/sys/vm/swappiness 100 + # Start HW service manager early + start hwservicemanager + on late-fs # Start services for bootanim - start vendor.configstore-hal start servicemanager start surfaceflinger start bootanim + start vendor.configstore-hal start vendor.gralloc-2-0 - # Wait for hwservicemanager ready since fsck might be triggered in mount_all --late - # In such case, init won't responce the property_set from hwservicemanager and then - # cause services for bootanim not running. - wait_for_prop hwservicemanager.ready true - - # mount RW partitions which need run fsck + # Mount RW partitions which need run fsck mount_all /vendor/etc/fstab.qcom --late chown root system /mnt/vendor/persist @@ -76,20 +81,10 @@ on late-fs mkdir /mnt/vendor/persist/bms 0700 root system restorecon_recursive /mnt/vendor/persist -on init - write /sys/module/qpnp_rtc/parameters/poweron_alarm 1 - # Set permissions for persist partition mkdir /persist 0771 root system mkdir /mnt/vendor/persist 0771 root system - # Create cgroup mount point for memory - mkdir /sys/fs/cgroup/memory/bg 0750 root system - write /sys/fs/cgroup/memory/bg/memory.swappiness 140 - write /sys/fs/cgroup/memory/bg/memory.move_charge_at_immigrate 1 - chown root system /sys/fs/cgroup/memory/bg/tasks - chmod 0660 /sys/fs/cgroup/memory/bg/tasks - on early-boot # set RLIMIT_MEMLOCK to 64MB setrlimit 8 67108864 67108864 @@ -119,12 +114,6 @@ on early-boot chmod 0664 /mnt/vendor/persist/sensors/sensors_settings on boot - # access permission for secure touch - chmod 0660 /sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input0/secure_touch_enable - chmod 0440 /sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input0/secure_touch - chown system drmrpc /sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input0/secure_touch_enable - chown system drmrpc /sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input0/secure_touch - chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power chown bluetooth net_bt /sys/class/rfkill/rfkill0/type chown bluetooth net_bt /sys/class/rfkill/rfkill0/state