Dmitry Shmidt | d711433 | 2015-12-10 10:35:59 -0800 | [diff] [blame] | 1 | import init.hikey.usb.rc |
| 2 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 3 | on init |
| 4 | # mount debugfs |
| 5 | mount debugfs /sys/kernel/debug /sys/kernel/debug |
| 6 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 7 | # disable transparent huge pages |
| 8 | write /sys/kernel/mm/transparent_hugepage/enabled "never" |
| 9 | |
| 10 | # See storage config details at http://source.android.com/tech/storage/ |
| 11 | symlink /sdcard /mnt/sdcard |
| 12 | symlink /sdcard /storage/sdcard0 |
| 13 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 14 | # Disabled virtual memory randomization |
| 15 | # (if randomization is enabled the AEM-JIT will have a lower cache hit rate) |
| 16 | write /proc/sys/kernel/randomize_va_space 0 |
| 17 | |
| 18 | #bluetooth |
| 19 | #UART device |
| 20 | chmod 0660 /dev/ttyAMA1 |
| 21 | chown bluetooth net_bt_stack /dev/ttyAMA1 |
| 22 | |
| 23 | on fs |
| 24 | mount_all /fstab.hikey |
| 25 | setprop ro.crypto.fuse_sdcard false |
| 26 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 27 | on post-fs-data |
| 28 | mkdir /data/media 0770 media_rw media_rw |
| 29 | mkdir /data/misc/gatord 0700 root root |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 30 | # Set SELinux security contexts for files used by lava. |
| 31 | restorecon_recursive /data/local/tmp/lava |
| 32 | |
| 33 | on post-fs |
| 34 | # insert WiFi Modules |
| 35 | insmod /system/modules/rfkill.ko |
| 36 | insmod /system/modules/wifi/compat.ko |
| 37 | insmod /system/modules/wifi/cfg80211.ko |
| 38 | insmod /system/modules/wifi/mac80211.ko |
| 39 | insmod /system/modules/wifi/wlcore.ko |
| 40 | insmod /system/modules/wifi/wl18xx.ko |
| 41 | insmod /system/modules/wifi/wlcore_sdio.ko |
| 42 | |
| 43 | # BT LED sysfs entry |
| 44 | write /sys/devices/leds/leds/bt_active/trigger "hci1rx" |
| 45 | |
| 46 | chmod 0666 /dev/ump |
| 47 | chmod 0666 /dev/ion |
| 48 | chmod 0666 /dev/mali |
| 49 | chown system.graphics /dev/mali |
| 50 | chmod 0666 /dev/graphics/fb0 |
| 51 | |
| 52 | # fake some battery state |
| 53 | setprop status.battery.state Slow |
| 54 | setprop status.battery.level 5 |
| 55 | setprop status.battery.level_raw 50 |
| 56 | setprop status.battery.level_scale 9 |
| 57 | |
| 58 | # Set Display density |
| 59 | setprop ro.sf.lcd_density 160 |
| 60 | |
| 61 | # Set supported opengles version |
| 62 | setprop ro.opengles.version 196608 |
| 63 | |
| 64 | # change permissions for process groups |
| 65 | # https://bugs.launchpad.net/bugs/1037611 |
| 66 | chmod 0660 /dev/cpuctl |
| 67 | |
| 68 | # enable Google-specific location features, |
| 69 | # like NetworkLocationProvider and LocationCollector |
| 70 | setprop ro.com.google.locationfeatures 1 |
| 71 | |
| 72 | # enable test harness |
| 73 | setprop ro.test_harness true |
| 74 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 75 | on property:usb_speed.switch=high |
| 76 | write /sys/kernel/debug/f72c0000.usb/config "0" |
| 77 | |
| 78 | on property:usb_speed.switch=full |
| 79 | write /sys/kernel/debug/f72c0000.usb/config "1" |
| 80 | |
| 81 | #userspace daemon needed for bluetooth |
| 82 | service uim /system/bin/uim |
| 83 | class main |
| 84 | user root |
| 85 | oneshot |
| 86 | |
| 87 | service wpa_supplicant /system/bin/wpa_supplicant \ |
| 88 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ |
| 89 | -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 |
| 90 | socket wpa_wlan0 dgram 660 wifi wifi |
| 91 | class main |
| 92 | disabled |
| 93 | oneshot |
| 94 | |
Dmitry Shmidt | 43780b1 | 2016-03-17 10:42:10 -0700 | [diff] [blame] | 95 | service dhcpcd_wlan0 /system/bin/dhcpcd -dABKL |
| 96 | group dhcp |
| 97 | disabled |
| 98 | oneshot |
| 99 | |
| 100 | service dhcpcd_eth0 /system/bin/dhcpcd -dABKL |
| 101 | group dhcp |
| 102 | disabled |
| 103 | oneshot |
| 104 | |
| 105 | service dhcpcd_bt-pan /system/bin/dhcpcd -dABKL |
| 106 | group dhcp |
| 107 | disabled |
| 108 | oneshot |