Skip to content

Commit

Permalink
charger: Update charger startup
Browse files Browse the repository at this point in the history
Change-Id: I37a7e6c3f262d90f600e7bdd9719d0dbed26f399
  • Loading branch information
HazouPH committed Mar 21, 2018
1 parent 432f396 commit c4a81ef
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 1 addition & 3 deletions rootdir/etc/init.common.rc
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ on post-fs-data
# Set indication (checked by vold) that we have finished this action
setprop vold.post_fs_data_done 1

on charger
# /system is not already mounted under COS
mount ext4 /dev/block/mmcblk0p16 /system ro noatime
on start-charging
start pvrsrvctl
# reduce backlight
write /sys/class/backlight/psb-bl/brightness 50
Expand Down
4 changes: 1 addition & 3 deletions rootdir/etc/init.debug.rc
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,11 @@ on post-fs-data
chown root log /data/dontpanic/last_kmsg
chmod 0640 /data/dontpanic/last_kmsg

on charger
on start-charging
# basic networking for "adb root"
ifup lo
hostname localhost
domainname localdomain
mount ext4 /dev/block/mmcblk0p16 /system ro noatime
mount -t auto /dev/block/mmcblk0p17 /data
# intel puts /data/logs on a different partition, we don't
mkdir /data/logs 0770 system log
mkdir /data/logs/modemcrash 0775 system log
Expand Down
16 changes: 10 additions & 6 deletions rootdir/etc/init.sc1.rc
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,27 @@ on init
# init does not automatically run "on early-fs", "on fs", "on post-fs",
# "on post-fs-data", "on early-boot", and "on boot" in charge-only-mode
on charger
mount ext4 /dev/block/mmcblk0p16 /system ro noatime
mount -t auto /dev/block/mmcblk0p17 /data
trigger early-fs
trigger fs
trigger post-fs
trigger start-charging

on start-charging
start console
start watchdogd
exec /system/bin/charge_only_mode

# CPU Frequency Governor
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor powersave
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
write /sys/devices/system/cpu/cpu1/online 0

# runs after "on init" and before "on fs"; doesn't run in charge-only-mode
on early-fs
mkdir /pds 0755 root root

on fs
setprop ro.crypto.fuse_sdcard true

# runs after "on fs" and before "on post-fs-data"
# /system, /cache, and /pds should be mounted at this point
# does not usually run charge-only-mode
Expand Down Expand Up @@ -256,9 +263,6 @@ on boot
# Setup folder for aplogd
mkdir /data/aplogd 0750 log log

on fs
setprop ro.crypto.fuse_sdcard true

on property:sys.boot_completed=1
# Insert matrix for PnP measurements
chmod 0640 /dev/matrix
Expand Down

0 comments on commit c4a81ef

Please sign in to comment.