1import init.${ro.hardware}.usb.rc 2import init.${ro.hardware}.power.rc 3 4on early-fs 5 start vold 6 7on fs 8 mount_all /vendor/etc/fstab.${ro.hardware} --early 9 swapon_all /vendor/etc/fstab.${ro.hardware} 10 11on post-fs 12 # set RLIMIT_MEMLOCK to 64MB 13 setrlimit 8 67108864 67108864 14 15on late-fs 16 mount_all /vendor/etc/fstab.${ro.hardware} --late 17 18on init 19 # ZRAM setup 20 write /sys/block/zram0/comp_algorithm lz4 21 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 33on 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 41on 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 46on property:sys.boot_completed=1 47 chmod 0755 /sys/kernel/debug/tracing 48 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 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. 71on sys-boot-completed-set && property:persist.sys.zram_enabled=1 72 swapon_all 73 74service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ 75 -Dnl80211 -g@android:wpa_wlan0 76 interface aidl android.hardware.wifi.supplicant.ISupplicant/default 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 83 84# TODO: disable this service once we implement system suspend 85service suspend_blocker /vendor/bin/suspend_blocker 86 class early_hal # Start together with system_suspend HAL 87 group system 88 user root 89