Permalink
Browse files

init: update

  • Loading branch information...
1 parent f2dbd77 commit 0d3e45d784d0fde6794d87abd5de87dee5b17550 @mechmetal committed Aug 30, 2013
Showing with 46 additions and 71 deletions.
  1. +46 −71 rootdir/init.semc.rc
View
117 rootdir/init.semc.rc 100644 → 100755
@@ -1,34 +1,30 @@
+import init.device.rc
import init.semc.usb.rc
on early-init
mount debugfs debugfs /sys/kernel/debug
+ chmod 666 /proc/cmdline
- mkdir /storage 0555 root root
- mkdir /storage/sdcard0 0555 root root
+on init
export EXTERNAL_STORAGE /storage/sdcard0
- # Support legacy paths
+ mkdir /storage 0050 system sdcard_r
+ mkdir /storage/sdcard0 0000 system system
+ mkdir /storage/usbdisk0 0000 system system
+
+ # for backwards compatibility
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
- symlink /storage/usbdisk /usbdisk
- symlink /storage/usbdisk /mnt/usbdisk
-
-on fs
- mount_all /fstab.semc
-
-on post-fs-data
- mkdir /data/misc/wifi 0770 wifi wifi
- mkdir /data/misc/wifi/sockets 0770 wifi wifi
- mkdir /data/misc/wifi/hostapd 0770 wifi wifi
- mkdir /data/misc/dhcp 0770 dhcp dhcp
- chown dhcp dhcp /data/misc/dhcp
-
- setprop vold.post_fs_data_done 1
+ symlink /storage/usbdisk0 /usbdisk
+ symlink /storage/usbdisk0 /mnt/usbdisk
on early-boot
# Offline charging
exec /system/bin/chargemon
+ # set RLIMIT_MEMLOCK to 64MB
+ setrlimit 8 67108864 67108864
+
on boot
# Disable idle power collapse during boot.
# These features will be enabled at the end of boot
@@ -44,29 +40,20 @@ on boot
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/state
chown system system /sys/module/sco/parameters/disable_esco
+ # To prevent out of order acknowledgements from making
+ # connection tracking to treat them as not belonging to
+ # the connection they belong to.
+ # Otherwise, a weird issue happens in which some long
+ # connections on high-throughput links get dropped when
+ # an ack packet comes out of order
+ write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
+
+ chown root system /proc/net/ip_conntrack
# Panel backlight
chown system system /sys/class/leds/lcd-backlight/brightness
chmod 660 /sys/class/leds/lcd-backlight/brightness
- # Keyboard backlight
- chown system system /sys/class/leds/keyboard-backlight-rgb1/brightness
- chmod 660 /sys/class/leds/keyboard-backlight-rgb1/brightness
- chown system system /sys/class/leds/keyboard-backlight-rgb2/brightness
- chmod 660 /sys/class/leds/keyboard-backlight-rgb2/brightness
- chown system system /sys/class/leds/keyboard-backlight-rgb3/brightness
- chmod 660 /sys/class/leds/keyboard-backlight-rgb3/brightness
- chown system system /sys/class/leds/keyboard-backlight-rgb4/brightness
- chmod 660 /sys/class/leds/keyboard-backlight-rgb4/brightness
-
- # Button backlight
- chown system system /sys/class/leds/button-backlight/brightness
- chmod 660 /sys/class/leds/button-backlight/brightness
- chown system system /sys/class/leds/button-backlight-rgb1/brightness
- chmod 660 /sys/class/leds/button-backlight-rgb1/brightness
- chown system system /sys/class/leds/button-backlight-rgb2/brightness
- chmod 660 /sys/class/leds/button-backlight-rgb2/brightness
-
# LED
chown system system /sys/class/leds/red/brightness
chmod 660 /sys/class/leds/red/brightness
@@ -91,32 +78,6 @@ on boot
chown system system /sys/devices/i2c-0/0-0040/dim_time
chmod 660 /sys/devices/i2c-0/0-0040/dim_time
- # AS3676/Ambient Light Sensor
- chown system system /sys/devices/i2c-0/0-0040/als_on
- chmod 660 /sys/devices/i2c-0/0-0040/als_on
-
- # LM35xx/cameralight
- chown system system /sys/devices/i2c-0/0-0053/torch_enable
- chmod 666 /sys/devices/i2c-0/0-0053/torch_enable
- chown system system /sys/devices/i2c-0/0-0053/torch_current
- chmod 666 /sys/devices/i2c-0/0-0053/torch_current
- chown system system /sys/devices/i2c-0/0-0053/cm_torch
- chmod 666 /sys/devices/i2c-0/0-0053/cm_torch
- chown system system /sys/devices/i2c-0/0-0053/privacy_enable
- chmod 666 /sys/devices/i2c-0/0-0053/privacy_enable
- chown system system /sys/devices/i2c-0/0-0053/privacy_current
- chmod 666 /sys/devices/i2c-0/0-0053/privacy_current
- chown system system /sys/devices/i2c-0/0-0053/flash_enable
- chmod 666 /sys/devices/i2c-0/0-0053/flash_enable
- chown system system /sys/devices/i2c-0/0-0053/flash_duration
- chmod 666 /sys/devices/i2c-0/0-0053/flash_duration
- chown system system /sys/devices/i2c-0/0-0053/flash_synchronization
- chmod 666 /sys/devices/i2c-0/0-0053/flash_synchronization
- chown system system /sys/devices/i2c-0/0-0053/flash_current
- chmod 666 /sys/devices/i2c-0/0-0053/flash_current
- chown system system /sys/devices/i2c-0/0-0053/status
- chmod 666 /sys/devices/i2c-0/0-0053/status
-
# Owner for the proximity sensor
chown system system /sys/devices/i2c-0/0-0054/threshold
chown system system /sys/devices/i2c-0/0-0054/nburst
@@ -129,7 +90,7 @@ on boot
class_start default
# Load wl1271 modules
- exec /system/bin/wifiload
+ exec /modules/wifiload
# USB host support
mkdir /dev/bus 0771 system system
@@ -141,19 +102,33 @@ on boot
chown system system /sys/devices/platform/msm_hsusb/gadget/wakeup
# power-management
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1017600
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 122000
- chmod 0666 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
- write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 50000
- write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 90
- write /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy 1
- write /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor 4
- write /sys/devices/system/cpu/cpufreq/ondemand/down_differential 10
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 122880
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1401600
# Don't disable dmesg access for apps
write /proc/sys/kernel/dmesg_restrict 0
+ # Flash storage isn't a good entropy source, and only causes locking
+ # overhead in the kernel. Turn it off.
+ write /sys/block/mmcblk0/queue/add_random 0
+
+on fs
+ mount_all /fstab.semc
+
+on post-fs-data
+ mkdir /data/misc/wifi 0770 wifi wifi
+ mkdir /data/misc/wifi/sockets 0770 wifi wifi
+ mkdir /data/misc/wifi/hostapd 0770 wifi wifi
+ mkdir /data/misc/dhcp 0770 dhcp dhcp
+ chown dhcp dhcp /data/misc/dhcp
+ chown wifi wifi /system/etc/firmware/ti-connectivity
+ chown wifi wifi /system/etc/wifi/wpa_supplicant.conf
+ chown wifi wifi /data/misc/wifi/wpa_supplicant.conf
+ chown wifi wifi /data/misc/wifi/p2p_supplicant.conf
+ chown wifi wifi /data/misc/wifi/p2p_supplicant_manual.conf
+
+ setprop vold.post_fs_data_done 1
+
on property:init.svc.bluetoothd=running
write /sys/devices/virtual/bluetooth/hci0/link_supervision_timeout 6400

0 comments on commit 0d3e45d

Please sign in to comment.