sanders: Cleanup/tweak init.{qcom|mmi}.rc
Change-Id: I0a31c0dfa75388175c8941e39081ed0a348856a8
This commit is contained in:
committed by
Jorge Lucas
parent
b9aebf22b3
commit
60f0bc50f7
@@ -3,7 +3,6 @@ import /vendor/etc/init/hw/init.mmi.usb.rc
|
|||||||
|
|
||||||
on early-boot
|
on early-boot
|
||||||
write /sys/module/subsystem_restart/parameters/disable_restart_work 0x0
|
write /sys/module/subsystem_restart/parameters/disable_restart_work 0x0
|
||||||
write /proc/sys/kernel/poweroff_cmd "/system/bin/reboot -p"
|
|
||||||
|
|
||||||
on init
|
on init
|
||||||
chown system log /sys/fs/pstore/console-ramoops-0
|
chown system log /sys/fs/pstore/console-ramoops-0
|
||||||
|
|||||||
@@ -45,29 +45,34 @@ on early-init
|
|||||||
write /sys/block/zram0/comp_algorithm lz4
|
write /sys/block/zram0/comp_algorithm lz4
|
||||||
write /proc/sys/vm/page-cluster 0
|
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
|
on fs
|
||||||
wait /dev/block/platform/soc/${ro.boot.bootdevice}
|
wait /dev/block/platform/soc/${ro.boot.bootdevice}
|
||||||
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/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
|
mount_all /vendor/etc/fstab.qcom --early
|
||||||
write /proc/sys/vm/swappiness 100
|
write /proc/sys/vm/swappiness 100
|
||||||
|
|
||||||
|
# Start HW service manager early
|
||||||
|
start hwservicemanager
|
||||||
|
|
||||||
on late-fs
|
on late-fs
|
||||||
# Start services for bootanim
|
# Start services for bootanim
|
||||||
start vendor.configstore-hal
|
|
||||||
start servicemanager
|
start servicemanager
|
||||||
start surfaceflinger
|
start surfaceflinger
|
||||||
start bootanim
|
start bootanim
|
||||||
|
start vendor.configstore-hal
|
||||||
start vendor.gralloc-2-0
|
start vendor.gralloc-2-0
|
||||||
|
|
||||||
# Wait for hwservicemanager ready since fsck might be triggered in mount_all --late
|
# Mount RW partitions which need run fsck
|
||||||
# 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_all /vendor/etc/fstab.qcom --late
|
mount_all /vendor/etc/fstab.qcom --late
|
||||||
|
|
||||||
chown root system /mnt/vendor/persist
|
chown root system /mnt/vendor/persist
|
||||||
@@ -76,20 +81,10 @@ on late-fs
|
|||||||
mkdir /mnt/vendor/persist/bms 0700 root system
|
mkdir /mnt/vendor/persist/bms 0700 root system
|
||||||
restorecon_recursive /mnt/vendor/persist
|
restorecon_recursive /mnt/vendor/persist
|
||||||
|
|
||||||
on init
|
|
||||||
write /sys/module/qpnp_rtc/parameters/poweron_alarm 1
|
|
||||||
|
|
||||||
# Set permissions for persist partition
|
# Set permissions for persist partition
|
||||||
mkdir /persist 0771 root system
|
mkdir /persist 0771 root system
|
||||||
mkdir /mnt/vendor/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
|
on early-boot
|
||||||
# set RLIMIT_MEMLOCK to 64MB
|
# set RLIMIT_MEMLOCK to 64MB
|
||||||
setrlimit 8 67108864 67108864
|
setrlimit 8 67108864 67108864
|
||||||
@@ -119,12 +114,6 @@ on early-boot
|
|||||||
chmod 0664 /mnt/vendor/persist/sensors/sensors_settings
|
chmod 0664 /mnt/vendor/persist/sensors/sensors_settings
|
||||||
|
|
||||||
on boot
|
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 bluetooth /sys/module/bluetooth_power/parameters/power
|
||||||
chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
|
chown bluetooth net_bt /sys/class/rfkill/rfkill0/type
|
||||||
chown bluetooth net_bt /sys/class/rfkill/rfkill0/state
|
chown bluetooth net_bt /sys/class/rfkill/rfkill0/state
|
||||||
|
|||||||
Reference in New Issue
Block a user