Skip to content

Commit

Permalink
passion: add qcom-post-boot service
Browse files Browse the repository at this point in the history
note: caf uses init.svc.bootanim=stopped to run qcom-post-boot
however this causes a race condition between the post_boot script and
the BOOT_COMPLETE broadcast that evtoolbox uses to restore cpu settings.
In testing the post_boot script has always completed first but by less than
2 seconds and most by less than 1 second. I find that unacceptable.
Instead run post_boot on dev.bootcomplete=1 which is set at least 10
seconds before init.svc.bootanim=stopped and sys.boot_complete=1 (which
are set at the same time) Leaving plenty of time to ensure settings in
post_boot do not override user settings in evtoolbox.

Change-Id: I0d50ba5954b94aa5975cbe95b0351fca8fe21ad0
  • Loading branch information
drewis committed Jun 7, 2012
1 parent 43a13e5 commit 0be6e7e
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions init.mahimahi.rc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ on post-fs-data
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp

setprop vold.post_fs_data_done 1

on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug

Expand Down Expand Up @@ -58,22 +56,6 @@ on boot
write /sys/block/mtdblock4/bdi/read_ahead_kb 4
write /sys/block/mtdblock5/bdi/read_ahead_kb 4

# Lower maximum frequency when screen is off
write /sys/devices/system/cpu/cpu0/cpufreq/screen_off_max_freq 700000

# Power Management
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 245000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 998400
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 40000

# KSM defaults
# write /sys/kernel/mm/ksm/sleep_millisecs 1500
write /sys/kernel/mm/ksm/sleep_millisecs 3000
write /sys/kernel/mm/ksm/pages_to_scan 256
# enable KSM
write /sys/kernel/mm/ksm/run 1

# Wakelock debug
write /sys/module/wakelock/parameters/debug_mask 7

Expand Down Expand Up @@ -133,4 +115,13 @@ service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
group bluetooth net_bt_admin
disabled

service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
class late_start
user root
disabled
oneshot

on property:dev.bootcomplete=1
start qcom-post-boot

service dspcrashd /system/bin/dspcrashd

0 comments on commit 0be6e7e

Please sign in to comment.