Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 1 | import init.${ro.hardware}.usb.rc |
| 2 | import init.${ro.hardware}.power.rc |
| 3 | |
John Stultz | 95188ca | 2021-07-21 23:21:22 +0000 | [diff] [blame] | 4 | on early-fs |
| 5 | start vold |
| 6 | |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 7 | on fs |
John Stultz | 95188ca | 2021-07-21 23:21:22 +0000 | [diff] [blame] | 8 | mount_all /vendor/etc/fstab.${ro.hardware} --early |
Yongqin Liu | bbb804e | 2020-04-21 17:52:44 +0800 | [diff] [blame] | 9 | swapon_all /vendor/etc/fstab.${ro.hardware} |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 10 | |
Yongqin Liu | ab5d0cc | 2020-03-20 13:44:54 +0800 | [diff] [blame] | 11 | on post-fs |
| 12 | # set RLIMIT_MEMLOCK to 64MB |
| 13 | setrlimit 8 67108864 67108864 |
| 14 | |
John Stultz | 95188ca | 2021-07-21 23:21:22 +0000 | [diff] [blame] | 15 | on late-fs |
| 16 | mount_all /vendor/etc/fstab.${ro.hardware} --late |
| 17 | |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 18 | on init |
Amit Pundir | ab98c6c | 2024-02-08 23:18:26 +0530 | [diff] [blame] | 19 | # ZRAM setup |
| 20 | write /sys/block/zram0/comp_algorithm lz4 |
| 21 | |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 22 | # For legacy support |
| 23 | # See storage config details at http://source.android.com/tech/storage/ |
| 24 | # since /storage is mounted on post-fs in init.rc |
| 25 | symlink /sdcard /storage/sdcard0 |
| 26 | |
| 27 | # Initialize cpusets to boot-time values |
| 28 | write /dev/cpuset/foreground/cpus 0-7 |
| 29 | write /dev/cpuset/background/cpus 0-7 |
| 30 | write /dev/cpuset/system-background/cpus 0-7 |
| 31 | write /dev/cpuset/top-app/cpus 0-7 |
| 32 | |
| 33 | on early-boot |
| 34 | mount debugfs debugfs /sys/kernel/debug |
| 35 | chmod 755 /sys/kernel/debug |
| 36 | chmod 755 /sys/kernel/debug/sync |
| 37 | chown graphics graphics /sys/kernel/debug/sync/sw_sync |
| 38 | chmod 777 /sys/kernel/debug/sync/sw_sync |
| 39 | chown graphics graphics /sys/kernel/debug/sync/info |
| 40 | |
| 41 | on zygote-start |
| 42 | mkdir /data/vendor/wifi 0770 wifi wifi |
| 43 | mkdir /data/vendor/wifi/wpa 0770 wifi wifi |
| 44 | mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi |
| 45 | |
| 46 | on property:sys.boot_completed=1 |
Amit Pundir | 66c35f4 | 2020-06-21 21:50:34 +0530 | [diff] [blame] | 47 | chmod 0755 /sys/kernel/debug/tracing |
| 48 | |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 49 | # update cpuset now that processors are up |
| 50 | # Foreground should contain most cores (7 is reserved for top-app) |
| 51 | write /dev/cpuset/foreground/cpus 0-6 |
| 52 | |
| 53 | # top-app gets all cpus (including reserved #7) |
| 54 | write /dev/cpuset/top-app/cpus 0-7 |
| 55 | |
| 56 | #background contains a small subset (generally one little core) |
| 57 | write /dev/cpuset/background/cpus 0 |
| 58 | |
| 59 | # add system-background cpuset, a new cpuset for system services |
| 60 | # that should not run on larger cores |
| 61 | # system-background is for system tasks that should only run on |
| 62 | # little cores, not on bigs to be used only by init |
| 63 | write /dev/cpuset/system-background/cpus 0-3 |
| 64 | |
Amit Pundir | ab98c6c | 2024-02-08 23:18:26 +0530 | [diff] [blame] | 65 | trigger sys-boot-completed-set |
| 66 | |
| 67 | # We want one opportunity per boot to enable zram, so we |
| 68 | # use a trigger we fire from the above stanza. If |
| 69 | # persist.sys.zram_enabled becomes true after boot, |
| 70 | # we don't want to run swapon_all at that time. |
| 71 | on sys-boot-completed-set && property:persist.sys.zram_enabled=1 |
| 72 | swapon_all |
| 73 | |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 74 | service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ |
| 75 | -Dnl80211 -g@android:wpa_wlan0 |
Amit Pundir | 5f212cf | 2022-08-17 16:32:56 +0530 | [diff] [blame] | 76 | interface aidl android.hardware.wifi.supplicant.ISupplicant/default |
Amit Pundir | 4e37582 | 2019-04-18 16:46:10 +0530 | [diff] [blame] | 77 | interface android.hardware.wifi.supplicant@1.0::ISupplicant default |
| 78 | interface android.hardware.wifi.supplicant@1.1::ISupplicant default |
| 79 | socket wpa_wlan0 dgram 660 wifi wifi |
| 80 | class main |
| 81 | disabled |
| 82 | oneshot |
Amit Pundir | d3525fb | 2021-05-31 16:16:21 +0530 | [diff] [blame] | 83 | |
| 84 | # TODO: disable this service once we implement system suspend |
| 85 | service suspend_blocker /vendor/bin/suspend_blocker |
| 86 | class early_hal # Start together with system_suspend HAL |
| 87 | group system |
| 88 | user root |