228 lines
7.3 KiB
Text
Executable file
228 lines
7.3 KiB
Text
Executable file
import init.common.rc
|
|
import init.sun8i.common.rc
|
|
import init.sun8i.usb.rc
|
|
on init
|
|
# See storage config details at http://source.android.com/tech/storage/
|
|
mkdir /mnt/shell/emulated 0700 shell shell
|
|
mkdir /storage/emulated 0555 root root
|
|
|
|
export EXTERNAL_STORAGE /storage/emulated/legacy
|
|
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
|
|
export EMULATED_STORAGE_TARGET /storage/emulated
|
|
|
|
# Support legacy paths
|
|
symlink /storage/emulated/legacy /sdcard
|
|
symlink /storage/emulated/legacy /mnt/sdcard
|
|
symlink /storage/emulated/legacy /storage/sdcard0
|
|
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
|
|
|
|
mkdir /mnt/media_rw/extsd 0700 media_rw media_rw
|
|
mkdir /storage/extsd 0700 root root
|
|
export SECONDARY_STORAGE /storage/extsd
|
|
symlink /storage/extsd /mnt/extsd
|
|
|
|
mkdir /mnt/media_rw/usbhost 0700 media_rw media_rw
|
|
mkdir /storage/usbhost 0700 root root
|
|
symlink /storage/usbhost /mnt/usbhost
|
|
|
|
mount debugfs debugfs /sys/kernel/debug
|
|
|
|
on post-fs-data
|
|
mkdir /data/media 0770 media_rw media_rw
|
|
# Set indication (checked by vold) that we have finished this action
|
|
setprop vold.post_fs_data_done 1
|
|
# to force to start sdcard
|
|
class_start late_start
|
|
|
|
on charger
|
|
insmod sunxi_tr.ko
|
|
insmod disp.ko
|
|
class_start charger
|
|
write /sys/module/printk/parameters/console_suspend N
|
|
write /proc/sys/kernel/printk 0
|
|
|
|
on boot
|
|
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
|
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
|
|
|
chown system system /sys/kernel/autohotplug/enable
|
|
chmod 0660 /sys/kernel/autohotplug/enable
|
|
|
|
chown system system /sys/devices/system/cpu/cpu0/cpufreq/boot_lock
|
|
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/boot_lock
|
|
|
|
chown system system /sys/devices/platform/sunxi-budget-cooling/roomage
|
|
chmod 0660 /sys/devices/platform/sunxi-budget-cooling/roomage
|
|
|
|
chown system system /sys/class/devfreq/sunxi-ddrfreq/dsm/scene
|
|
chmod 0660 /sys/class/devfreq/sunxi-ddrfreq/dsm/scene
|
|
|
|
on early-fs
|
|
insmod nand.ko
|
|
exec /sbin/busybox sh /sbin/init_parttion.sh
|
|
# set RLIMIT_NICE to allow priorities from 19 to -20
|
|
setrlimit 13 40 40
|
|
mount_all /fstab.sun8i
|
|
start zygote
|
|
start zygote_secondary
|
|
start console
|
|
|
|
# tp
|
|
insmod /system/vendor/modules/sw-device.ko
|
|
|
|
insmod /system/vendor/modules/sunxi_tr.ko
|
|
insmod /system/vendor/modules/disp.ko
|
|
insmod /system/vendor/modules/hdmi.ko
|
|
|
|
#secure storage
|
|
mkdir /data/secure_store 0777 root system
|
|
insmod /system/vendor/modules/te_sec_storage.ko
|
|
|
|
# gpu
|
|
insmod /system/vendor/modules/pvrsrvkm.ko
|
|
|
|
setprop ro.crypto.fuse_sdcard true
|
|
swapon_all /fstab.sun8i
|
|
start installd
|
|
|
|
#csi module
|
|
insmod /system/vendor/modules/videobuf-core.ko
|
|
insmod /system/vendor/modules/videobuf-dma-contig.ko
|
|
insmod /system/vendor/modules/cci.ko
|
|
insmod /system/vendor/modules/actuator.ko
|
|
insmod /system/vendor/modules/vfe_os.ko
|
|
insmod /system/vendor/modules/vfe_subdev.ko
|
|
insmod /system/vendor/modules/dw9714_act.ko
|
|
insmod /system/vendor/modules/gc0308.ko
|
|
insmod /system/vendor/modules/gc2035.ko
|
|
insmod /system/vendor/modules/gc0328.ko
|
|
insmod /system/vendor/modules/gc2145.ko
|
|
insmod /system/vendor/modules/gc2145d.ko
|
|
insmod /system/vendor/modules/gc0329.ko
|
|
insmod /system/vendor/modules/gc0312.ko
|
|
insmod /system/vendor/modules/ov5647.ko
|
|
insmod /system/vendor/modules/ov5640.ko
|
|
insmod /system/vendor/modules/gc5004.ko
|
|
insmod /system/vendor/modules/gc2245.ko
|
|
insmod /system/vendor/modules/vfe_v4l2.ko
|
|
|
|
# network
|
|
# insmod /system/vendor/modules/bcmdhd.ko
|
|
# insmod /system/vendor/modules/bcm_btlpm.ko
|
|
insmod /system/vendor/modules/usbnet.ko
|
|
insmod /system/vendor/modules/asix.ko
|
|
insmod /system/vendor/modules/qf9700.ko
|
|
insmod /system/vendor/modules/mcs7830.ko
|
|
insmod /system/vendor/modules/rtl8150.ko
|
|
insmod /system/vendor/modules/cdc_ether.ko
|
|
insmod /system/vendor/modules/rtl_bluesleep.ko
|
|
|
|
|
|
#inet_recover
|
|
insmod /system/vendor/modules/inet_recover.ko
|
|
|
|
# bcm bluetooth
|
|
# uart device
|
|
chmod 660 /dev/ttyS1
|
|
chown bluetooth net_bt_stack /dev/ttyS1
|
|
mkdir /data/misc/bluedroid 770 bluetooth net_bt_stack
|
|
|
|
# power up/down interface
|
|
chmod 0660 /sys/class/rfkill/rfkill0/state
|
|
chmod 0660 /sys/class/rfkill/rfkill0/type
|
|
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
|
|
chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
|
|
|
|
# bluetooth MAC address programming
|
|
chown bluetooth net_bt_stack ro.bt.bdaddr_path
|
|
chown bluetooth net_bt_stack /system/etc/bluetooth
|
|
chown bluetooth net_bt_stack /data/misc/bluetooth
|
|
setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr"
|
|
|
|
# bluetooth LPM
|
|
chmod 0220 /proc/bluetooth/sleep/lpm
|
|
chmod 0220 /proc/bluetooth/sleep/btwrite
|
|
chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm
|
|
chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite
|
|
write /proc/bluetooth/sleep/lpm 1
|
|
|
|
## gps
|
|
# chown root system /dev/ttyS2
|
|
# chmod 0660 /dev/ttyS2
|
|
# chmod 777 /system/bin/glgps
|
|
# chmod 777 /system/bin/gpslogd
|
|
|
|
# # standby pinctl
|
|
# chown root system /sys/devices/platform/gps/power_enable
|
|
# chmod 0664 /sys/devices/platform/gps/power_enable
|
|
#
|
|
# mkdir /data/gps 775 system system
|
|
# chown system system /data/gps
|
|
|
|
on fs
|
|
# UDISK would be mounted as data partition when multiple user enabled.
|
|
#format_userdata /dev/block/by-name/UDISK OCTOPUS
|
|
# GPU service
|
|
service pvrsrvctl /system/vendor/bin/pvrsrvctl --start
|
|
class core
|
|
user root
|
|
group root
|
|
oneshot
|
|
|
|
service sensors /sbin/busybox sh /system/bin/sensors.sh
|
|
user root
|
|
group root
|
|
disabled
|
|
oneshot
|
|
|
|
on property:sys.sensors=1
|
|
start sensors
|
|
|
|
# virtual sdcard daemon running as media_rw (1023)
|
|
service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
|
|
class late_start
|
|
|
|
service fuse_extsd /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/extsd /storage/extsd
|
|
class late_start
|
|
disabled
|
|
|
|
service fuse_usbhost /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usbhost /storage/usbhost
|
|
class late_start
|
|
disabled
|
|
|
|
# 1. realtek & eagle wifi service
|
|
# 1.1 realtek & eagle wifi sta service
|
|
service wpa_supplicant /system/bin/wpa_supplicant \
|
|
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
|
|
-O/data/misc/wifi/sockets \
|
|
-e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
|
|
# we will start as root and wpa_supplicant will switch to user wifi
|
|
# after setting up the capabilities required for WEXT
|
|
# user wifi
|
|
# group wifi inet keystore
|
|
class main
|
|
socket wpa_wlan0 dgram 660 wifi wifi
|
|
disabled
|
|
oneshot
|
|
|
|
# 1.2 realtek & eagle wifi sta p2p concurrent service
|
|
service p2p_supplicant /system/bin/wpa_supplicant \
|
|
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
|
|
-e/data/misc/wifi/entropy.bin -N \
|
|
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
|
|
-O/data/misc/wifi/sockets \
|
|
-g@android:wpa_wlan0
|
|
class main
|
|
socket wpa_wlan0 dgram 660 wifi wifi
|
|
disabled
|
|
oneshot
|
|
|
|
|
|
## Run gps service
|
|
#service gps-daemon /system/bin/glgps -c /system/etc/gps/gpsconfig.xml
|
|
# class main
|
|
# socket gps seqpacket 0660 gps system
|
|
# socket rilgps.socket seqpacket 0660 gps system
|
|
# user gps
|
|
# group system inet sdcard_rw
|
|
|