Home | History | Annotate | Download | only in hikey
      1 import init.hikey.usb.rc
      2 
      3 on init
      4     # mount debugfs
      5     mount debugfs /sys/kernel/debug /sys/kernel/debug
      6 
      7     # disable transparent huge pages
      8     write /sys/kernel/mm/transparent_hugepage/enabled "never"
      9 
     10     # Disabled virtual memory randomization
     11     # (if randomization is enabled the AEM-JIT will have a lower cache hit rate)
     12     write /proc/sys/kernel/randomize_va_space 0
     13 
     14 on fs
     15     mount_all /fstab.hikey
     16     setprop ro.crypto.fuse_sdcard false
     17 
     18 on post-fs-data
     19     mkdir /data/media 0770 media_rw media_rw
     20     mkdir /data/misc/gatord 0700 root root
     21     # Set SELinux security contexts for files used by lava.
     22     restorecon_recursive /data/local/tmp/lava
     23 
     24 on post-fs
     25 
     26     # For legacy support
     27     # See storage config details at http://source.android.com/tech/storage/
     28     # since /storage is mounted on post-fs in init.rc
     29     symlink /sdcard /storage/sdcard0
     30 
     31     # BT LED sysfs entry
     32     write /sys/devices/leds/leds/bt_active/trigger "hci1rx"
     33 
     34     chmod 0666 /dev/ump
     35     chmod 0666 /dev/ion
     36     chmod 0666 /dev/graphics/fb0
     37 
     38 # fake some battery state
     39     setprop status.battery.state Slow
     40     setprop status.battery.level 5
     41     setprop status.battery.level_raw  50
     42     setprop status.battery.level_scale 9
     43 
     44 # Set Display density
     45     setprop ro.sf.lcd_density 160
     46 
     47 # Set supported opengles version
     48     setprop ro.opengles.version 196608
     49 
     50     # update cpuset now that processors are up
     51     # Foreground should contain all cores
     52     write /dev/cpuset/foreground/cpus 0-7
     53 
     54     # Add foreground/boost cpuset, it is used for app launches,
     55     # and maybe other high priority tasks in the future.
     56     # It's to be set to whatever cores should be used
     57     # for short term high-priority tasks.
     58     write /dev/cpuset/foreground/boost/cpus 0-7
     59 
     60     #background contains a small subset (generally one little core)
     61     write /dev/cpuset/background/cpus 0
     62 
     63     # add system-background cpuset, a new cpuset for system services
     64     # that should not run on larger cores
     65     # system-background is for system tasks that should only run on
     66     # little cores, not on bigs to be used only by init
     67     write /dev/cpuset/system-background/cpus 0-4
     68 
     69 # enable Google-specific location features,
     70 # like NetworkLocationProvider and LocationCollector
     71     setprop ro.com.google.locationfeatures 1
     72 
     73 # enable test harness
     74     setprop ro.test_harness true
     75 
     76 on property:usb_speed.switch=high
     77     write /sys/kernel/debug/f72c0000.usb/config "0"
     78 
     79 on property:usb_speed.switch=full
     80     write /sys/kernel/debug/f72c0000.usb/config "1"
     81 
     82 #userspace daemon needed for bluetooth
     83 service uim /system/bin/uim
     84     class main
     85     user bluetooth
     86     group bluetooth net_bt_admin system net_bt_stack
     87     oneshot
     88 
     89 service wpa_supplicant /system/bin/wpa_supplicant \
     90      -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
     91      -e/data/misc/wifi/entropy.bin  -g@android:wpa_wlan0
     92      socket wpa_wlan0 dgram 660 wifi wifi
     93      class main
     94      disabled
     95      oneshot
     96 
     97