Amit Pundir | c738b81 | 2019-06-19 16:13:49 +0530 | [diff] [blame] | 1 | import init.${ro.hardware}.usb.rc |
| 2 | import init.${ro.hardware}.power.rc |
| 3 | |
| 4 | on fs |
Amit Pundir | 4823247 | 2020-07-05 19:04:17 +0530 | [diff] [blame] | 5 | mount_all /vendor/etc/fstab.${ro.hardware} |
| 6 | swapon_all /vendor/etc/fstab.${ro.hardware} |
Amit Pundir | c738b81 | 2019-06-19 16:13:49 +0530 | [diff] [blame] | 7 | |
Yongqin Liu | 42dec01 | 2020-03-20 13:44:54 +0800 | [diff] [blame] | 8 | on post-fs |
| 9 | # set RLIMIT_MEMLOCK to 64MB |
| 10 | setrlimit 8 67108864 67108864 |
| 11 | |
Caleb Connolly | 62fd5a4 | 2022-01-24 16:00:04 +0000 | [diff] [blame] | 12 | # make sure remoteprocs have booted, some will attempt |
| 13 | # to start before firmware is available and not automatically |
| 14 | # retry. |
| 15 | write /sys/class/remoteproc/remoteproc0/state start |
| 16 | write /sys/class/remoteproc/remoteproc1/state start |
| 17 | write /sys/class/remoteproc/remoteproc2/state start |
| 18 | |
Amit Pundir | c738b81 | 2019-06-19 16:13:49 +0530 | [diff] [blame] | 19 | on init |
Amit Pundir | c738b81 | 2019-06-19 16:13:49 +0530 | [diff] [blame] | 20 | # Initialize cpusets to boot-time values |
| 21 | write /dev/cpuset/foreground/cpus 0-7 |
| 22 | write /dev/cpuset/background/cpus 0-7 |
| 23 | write /dev/cpuset/system-background/cpus 0-7 |
| 24 | write /dev/cpuset/top-app/cpus 0-7 |
| 25 | |
Amit Pundir | c738b81 | 2019-06-19 16:13:49 +0530 | [diff] [blame] | 26 | on early-boot |
| 27 | mount debugfs debugfs /sys/kernel/debug |
| 28 | chmod 755 /sys/kernel/debug |
| 29 | chmod 755 /sys/kernel/debug/sync |
| 30 | chown graphics graphics /sys/kernel/debug/sync/sw_sync |
| 31 | chmod 777 /sys/kernel/debug/sync/sw_sync |
| 32 | chown graphics graphics /sys/kernel/debug/sync/info |
| 33 | |
Amit Pundir | c738b81 | 2019-06-19 16:13:49 +0530 | [diff] [blame] | 34 | on zygote-start |
| 35 | mkdir /data/vendor/wifi 0770 wifi wifi |
| 36 | mkdir /data/vendor/wifi/wpa 0770 wifi wifi |
| 37 | mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi |
| 38 | |
Alexander Martinz | e124f36 | 2022-08-17 10:51:02 +0200 | [diff] [blame] | 39 | on post-fs-data |
| 40 | # set sys.memfd_use to true now that the ashmem is dropped v5.18 |
| 41 | # https://lore.kernel.org/all/20220315123457.2354812-1-hch@lst.de/. |
| 42 | setprop sys.use_memfd true |
| 43 | |
Amit Pundir | c738b81 | 2019-06-19 16:13:49 +0530 | [diff] [blame] | 44 | on property:sys.boot_completed=1 |
Amit Pundir | d56da2e | 2020-06-21 21:50:34 +0530 | [diff] [blame] | 45 | chmod 0755 /sys/kernel/debug/tracing |
| 46 | |
Amit Pundir | c738b81 | 2019-06-19 16:13:49 +0530 | [diff] [blame] | 47 | # update cpuset now that processors are up |
| 48 | # Foreground should contain most cores (7 is reserved for top-app) |
| 49 | write /dev/cpuset/foreground/cpus 0-6 |
| 50 | |
| 51 | # top-app gets all cpus (including reserved #7) |
| 52 | write /dev/cpuset/top-app/cpus 0-7 |
| 53 | |
| 54 | #background contains a small subset (generally one little core) |
| 55 | write /dev/cpuset/background/cpus 0 |
| 56 | |
| 57 | # add system-background cpuset, a new cpuset for system services |
| 58 | # that should not run on larger cores |
| 59 | # system-background is for system tasks that should only run on |
| 60 | # little cores, not on bigs to be used only by init |
| 61 | write /dev/cpuset/system-background/cpus 0-3 |
| 62 | |
| 63 | service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ |
| 64 | -Dnl80211 -g@android:wpa_wlan0 |
| 65 | interface android.hardware.wifi.supplicant@1.0::ISupplicant default |
| 66 | interface android.hardware.wifi.supplicant@1.1::ISupplicant default |
| 67 | socket wpa_wlan0 dgram 660 wifi wifi |
| 68 | class main |
| 69 | disabled |
| 70 | oneshot |