Skip to content

Commit

Permalink
enable cpusets + other init changes
Browse files Browse the repository at this point in the history
Change-Id: I4fb2c9a799346a0584967e193cbbd864f8a7c836
  • Loading branch information
fat-tire committed Jan 20, 2016
1 parent 5d58a20 commit 6086bd8
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
2 changes: 2 additions & 0 deletions BoardConfigCommon.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ LOCAL_PATH := device/samsung/trlte-common
# Architecture
TARGET_CPU_VARIANT := krait

ENABLE_CPUSETS := true

# Audio
BOARD_USES_ALSA_AUDIO := true
AUDIO_FEATURE_ENABLED_HWDEP_CAL := true
Expand Down
37 changes: 26 additions & 11 deletions rootdir/etc/init.qcom.rc
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,16 @@ on early-boot
write /sys/kernel/boot_adsp/boot 1

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

# CPU Sets

write /dev/cpuset/foreground/cpus 0-3
write /dev/cpuset/foreground/boost/cpus 0-3
write /dev/cpuset/background/cpus 0
write /dev/cpuset/system-background/cpus 0-1
write /dev/cpuctl/cpu.shares 1024

mount debugfs /sys/kernel/debug /sys/kernel/debug
chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
Expand Down Expand Up @@ -431,6 +439,10 @@ on boot
# Permissions for usb_lock
chown system radio /sys/class/android_usb/android0/usb_lock

# misc radio files
chmod 0664 /data/data/data_usage_rx
chmod 0664 /data/data/data_usage_tx

# For WiFi
chown wifi wifi /dev/rfkill
chmod 0600 /dev/rfkill
Expand Down Expand Up @@ -480,12 +492,14 @@ on boot
#Remove SUID bit for iproute2 ip tool
chmod 0755 /system/bin/ip


chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state

#For bridgemgr daemon to inform the USB driver of the correct transport
chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport

chown radio radio /sys/class/net/rmnet_usb0/queues/rx-0/rps_cpus
chmod 664 /sys/class/net/rmnet_usb0/queues/rx-0/rps_cpus

# For setting tcp delayed ack
chown system system /sys/kernel/ipv4/tcp_delack_seg
chown system system /sys/kernel/ipv4/tcp_use_userconfig
Expand Down Expand Up @@ -775,8 +789,6 @@ on boot
chown system system /sys/kernel/ipv4/tcp_rmem_max
chown root radio /proc/cmdline



# Adjust YUV to RGB Conversion(CSC_Conversion)
chown system media_rw /sys/class/graphics/fb0/csc_cfg
chmod 0660 /sys/class/graphics/fb0/csc_cfg
Expand Down Expand Up @@ -1208,9 +1220,12 @@ on boot
chown system radio /sys/class/sec/sec_touchkey/boost_level

# permission for Input Device(Wacom).
chmod 0660 /sys/class/input/input4/enabled
chown system system /sys/class/input/input4/enabled
chown system system /sys/class/input/input18/enabled
chmod 0664 /sys/class/input/input4/enabled
chown system input /sys/class/input/input4/enabled
# (make sure input18 exists)
wait /sys/class/input/input18/enabled
chmod 0664 /sys/class/input/input18/enabled
chown system input /sys/class/input/input18/enabled

# permissions for bluetooth.
setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
Expand Down Expand Up @@ -1241,6 +1256,7 @@ service qcamerasvr /system/bin/mm-qcamera-daemon
class main
user camera
group camera system inet input graphics radio sdcard_rw sdcard_r media_rw shell log
writepid /dev/cpuset/system-background/tasks

# there seems to be a large philosophical discussion about this daemon. The consensus seems to
# be to not enable it http://forum.xda-developers.com/showthread.php?t=1755180 but it's here
Expand All @@ -1260,6 +1276,7 @@ service mpdecision /system/bin/mpdecision --avg_comp
class main
user root
group system
writepid /dev/cpuset/system-background/tasks
disabled

#service thermal-engine /system/bin/thermal-engine
Expand Down Expand Up @@ -1569,12 +1586,10 @@ on property:sys.boot_completed=1
write /sys/module/cpu_boost/parameters/plug_boost_ms 5

# permissions for S-Pen
chmod 0660 /dev/input/event18
chmod 0660 /dev/input/event19
chmod 0664 /dev/input/event18
chmod 0664 /dev/input/event19
chown system input /dev/input/event18
chown system input /dev/input/event19
chmod 0660 /sys/class/input/input18/enabled
chown system system /sys/class/input/input18/enabled
chown system radio /sys/class/sec/sec_epen/epen_firm_update
chown system radio /sys/class/sec/sec_epen/epen_reset
chown system radio /sys/class/sec/sec_epen/epen_reset_result
Expand Down

0 comments on commit 6086bd8

Please sign in to comment.