blob: d93f96c57d91a75420030b0c83c90023111dc7d3 [file] [log] [blame]
Amit Pundirc738b812019-06-19 16:13:49 +05301import init.${ro.hardware}.usb.rc
2import init.${ro.hardware}.power.rc
3
4on fs
Amit Pundir48232472020-07-05 19:04:17 +05305 mount_all /vendor/etc/fstab.${ro.hardware}
6 swapon_all /vendor/etc/fstab.${ro.hardware}
Amit Pundirc738b812019-06-19 16:13:49 +05307
Yongqin Liu42dec012020-03-20 13:44:54 +08008on post-fs
9 # set RLIMIT_MEMLOCK to 64MB
10 setrlimit 8 67108864 67108864
11
Amit Pundirc738b812019-06-19 16:13:49 +053012on init
Amit Pundirc738b812019-06-19 16:13:49 +053013 # Initialize cpusets to boot-time values
14 write /dev/cpuset/foreground/cpus 0-7
15 write /dev/cpuset/background/cpus 0-7
16 write /dev/cpuset/system-background/cpus 0-7
17 write /dev/cpuset/top-app/cpus 0-7
18
Amit Pundirc738b812019-06-19 16:13:49 +053019on early-boot
20 mount debugfs debugfs /sys/kernel/debug
21 chmod 755 /sys/kernel/debug
22 chmod 755 /sys/kernel/debug/sync
23 chown graphics graphics /sys/kernel/debug/sync/sw_sync
24 chmod 777 /sys/kernel/debug/sync/sw_sync
25 chown graphics graphics /sys/kernel/debug/sync/info
26
Amit Pundir4c517ea2021-05-23 02:24:19 +053027 chown system system /sys/class/backlight/wled/brightness
28
Amit Pundirc738b812019-06-19 16:13:49 +053029on zygote-start
30 mkdir /data/vendor/wifi 0770 wifi wifi
31 mkdir /data/vendor/wifi/wpa 0770 wifi wifi
32 mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
33
34on property:sys.boot_completed=1
Amit Pundird56da2e2020-06-21 21:50:34 +053035 chmod 0755 /sys/kernel/debug/tracing
36
Amit Pundirc738b812019-06-19 16:13:49 +053037 # update cpuset now that processors are up
38 # Foreground should contain most cores (7 is reserved for top-app)
39 write /dev/cpuset/foreground/cpus 0-6
40
41 # top-app gets all cpus (including reserved #7)
42 write /dev/cpuset/top-app/cpus 0-7
43
44 #background contains a small subset (generally one little core)
45 write /dev/cpuset/background/cpus 0
46
47 # add system-background cpuset, a new cpuset for system services
48 # that should not run on larger cores
49 # system-background is for system tasks that should only run on
50 # little cores, not on bigs to be used only by init
51 write /dev/cpuset/system-background/cpus 0-3
52
53service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
54 -Dnl80211 -g@android:wpa_wlan0
55 interface android.hardware.wifi.supplicant@1.0::ISupplicant default
56 interface android.hardware.wifi.supplicant@1.1::ISupplicant default
57 socket wpa_wlan0 dgram 660 wifi wifi
58 class main
59 disabled
60 oneshot