blob: f15640ab364805c7ed82a80381fe583adfa21600 [file] [log] [blame]
Amit Pundir4e375822019-04-18 16:46:10 +05301import init.${ro.hardware}.usb.rc
2import init.${ro.hardware}.power.rc
3
John Stultz95188ca2021-07-21 23:21:22 +00004on early-fs
5 start vold
6
Amit Pundir4e375822019-04-18 16:46:10 +05307on fs
John Stultz95188ca2021-07-21 23:21:22 +00008 mount_all /vendor/etc/fstab.${ro.hardware} --early
Yongqin Liubbb804e2020-04-21 17:52:44 +08009 swapon_all /vendor/etc/fstab.${ro.hardware}
Amit Pundir4e375822019-04-18 16:46:10 +053010
Yongqin Liuab5d0cc2020-03-20 13:44:54 +080011on post-fs
12 # set RLIMIT_MEMLOCK to 64MB
13 setrlimit 8 67108864 67108864
14
John Stultz95188ca2021-07-21 23:21:22 +000015on late-fs
16 mount_all /vendor/etc/fstab.${ro.hardware} --late
17
Amit Pundir4e375822019-04-18 16:46:10 +053018on init
19 # For legacy support
20 # See storage config details at http://source.android.com/tech/storage/
21 # since /storage is mounted on post-fs in init.rc
22 symlink /sdcard /storage/sdcard0
23
24 # Initialize cpusets to boot-time values
25 write /dev/cpuset/foreground/cpus 0-7
26 write /dev/cpuset/background/cpus 0-7
27 write /dev/cpuset/system-background/cpus 0-7
28 write /dev/cpuset/top-app/cpus 0-7
29
30on early-boot
31 mount debugfs debugfs /sys/kernel/debug
32 chmod 755 /sys/kernel/debug
33 chmod 755 /sys/kernel/debug/sync
34 chown graphics graphics /sys/kernel/debug/sync/sw_sync
35 chmod 777 /sys/kernel/debug/sync/sw_sync
36 chown graphics graphics /sys/kernel/debug/sync/info
37
38on zygote-start
39 mkdir /data/vendor/wifi 0770 wifi wifi
40 mkdir /data/vendor/wifi/wpa 0770 wifi wifi
41 mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
42
43on property:sys.boot_completed=1
Amit Pundir66c35f42020-06-21 21:50:34 +053044 chmod 0755 /sys/kernel/debug/tracing
45
Amit Pundir4e375822019-04-18 16:46:10 +053046 # update cpuset now that processors are up
47 # Foreground should contain most cores (7 is reserved for top-app)
48 write /dev/cpuset/foreground/cpus 0-6
49
50 # top-app gets all cpus (including reserved #7)
51 write /dev/cpuset/top-app/cpus 0-7
52
53 #background contains a small subset (generally one little core)
54 write /dev/cpuset/background/cpus 0
55
56 # add system-background cpuset, a new cpuset for system services
57 # that should not run on larger cores
58 # system-background is for system tasks that should only run on
59 # little cores, not on bigs to be used only by init
60 write /dev/cpuset/system-background/cpus 0-3
61
62service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
63 -Dnl80211 -g@android:wpa_wlan0
64 interface android.hardware.wifi.supplicant@1.0::ISupplicant default
65 interface android.hardware.wifi.supplicant@1.1::ISupplicant default
66 socket wpa_wlan0 dgram 660 wifi wifi
67 class main
68 disabled
69 oneshot
Amit Pundird3525fb2021-05-31 16:16:21 +053070
71# TODO: disable this service once we implement system suspend
72service suspend_blocker /vendor/bin/suspend_blocker
73 class early_hal # Start together with system_suspend HAL
74 group system
75 user root