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 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 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 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 14 | on fs |
| 15 | mount_all /fstab.hikey |
| 16 | setprop ro.crypto.fuse_sdcard false |
| 17 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 18 | on post-fs-data |
| 19 | mkdir /data/media 0770 media_rw media_rw |
| 20 | mkdir /data/misc/gatord 0700 root root |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 21 | # Set SELinux security contexts for files used by lava. |
| 22 | restorecon_recursive /data/local/tmp/lava |
| 23 | |
| 24 | on post-fs |
Yongqin Liu | 05ba086 | 2016-03-23 21:22:57 +0800 | [diff] [blame] | 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 |
Yongqin Liu | 05ba086 | 2016-03-23 21:22:57 +0800 | [diff] [blame] | 29 | symlink /sdcard /storage/sdcard0 |
| 30 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 31 | # insert WiFi Modules |
| 32 | insmod /system/modules/rfkill.ko |
| 33 | insmod /system/modules/wifi/compat.ko |
| 34 | insmod /system/modules/wifi/cfg80211.ko |
| 35 | insmod /system/modules/wifi/mac80211.ko |
| 36 | insmod /system/modules/wifi/wlcore.ko |
| 37 | insmod /system/modules/wifi/wl18xx.ko |
| 38 | insmod /system/modules/wifi/wlcore_sdio.ko |
| 39 | |
| 40 | # BT LED sysfs entry |
| 41 | write /sys/devices/leds/leds/bt_active/trigger "hci1rx" |
| 42 | |
| 43 | chmod 0666 /dev/ump |
| 44 | chmod 0666 /dev/ion |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 45 | chmod 0666 /dev/graphics/fb0 |
| 46 | |
| 47 | # fake some battery state |
| 48 | setprop status.battery.state Slow |
| 49 | setprop status.battery.level 5 |
| 50 | setprop status.battery.level_raw 50 |
| 51 | setprop status.battery.level_scale 9 |
| 52 | |
| 53 | # Set Display density |
| 54 | setprop ro.sf.lcd_density 160 |
| 55 | |
| 56 | # Set supported opengles version |
| 57 | setprop ro.opengles.version 196608 |
| 58 | |
| 59 | # change permissions for process groups |
| 60 | # https://bugs.launchpad.net/bugs/1037611 |
| 61 | chmod 0660 /dev/cpuctl |
| 62 | |
Yongqin Liu | 16c8b0a | 2016-03-23 21:35:50 +0800 | [diff] [blame] | 63 | # update cpuset now that processors are up |
| 64 | # Foreground should contain all cores |
| 65 | write /dev/cpuset/foreground/cpus 0-7 |
| 66 | |
| 67 | # Add foreground/boost cpuset, it is used for app launches, |
| 68 | # and maybe other high priority tasks in the future. |
| 69 | # It's to be set to whatever cores should be used |
| 70 | # for short term high-priority tasks. |
| 71 | write /dev/cpuset/foreground/boost/cpus 0-7 |
| 72 | |
| 73 | #background contains a small subset (generally one little core) |
| 74 | write /dev/cpuset/background/cpus 0 |
| 75 | |
| 76 | # add system-background cpuset, a new cpuset for system services |
| 77 | # that should not run on larger cores |
| 78 | # system-background is for system tasks that should only run on |
| 79 | # little cores, not on bigs to be used only by init |
| 80 | write /dev/cpuset/system-background/cpus 0-4 |
| 81 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 82 | # enable Google-specific location features, |
| 83 | # like NetworkLocationProvider and LocationCollector |
| 84 | setprop ro.com.google.locationfeatures 1 |
| 85 | |
| 86 | # enable test harness |
| 87 | setprop ro.test_harness true |
| 88 | |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 89 | on property:usb_speed.switch=high |
| 90 | write /sys/kernel/debug/f72c0000.usb/config "0" |
| 91 | |
| 92 | on property:usb_speed.switch=full |
| 93 | write /sys/kernel/debug/f72c0000.usb/config "1" |
| 94 | |
| 95 | #userspace daemon needed for bluetooth |
| 96 | service uim /system/bin/uim |
| 97 | class main |
| 98 | user root |
| 99 | oneshot |
| 100 | |
| 101 | service wpa_supplicant /system/bin/wpa_supplicant \ |
| 102 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ |
| 103 | -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 |
| 104 | socket wpa_wlan0 dgram 660 wifi wifi |
| 105 | class main |
| 106 | disabled |
| 107 | oneshot |
| 108 | |