-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sun4i.rc
executable file
·150 lines (129 loc) · 5.24 KB
/
init.sun4i.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
on early-init
export EXTERNAL_STORAGE /storage/sdcard0
export SECONDARY_STORAGE /storage/sdcard1
mkdir /storage 0050 system sdcard_r
mkdir /storage/sdcard0 0000 system system
mkdir /storage/sdcard1 0000 system system
mkdir /storage/sdcard2 0000 system system
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
symlink /storage/sdcard1 /mnt/extsd
on fs
mount ext4 /dev/block/nandd /system wait rw
#Allwinner hacks for data and cache - Corvus
# mount ext4 /dev/block/nande /data wait noatime nosuid nodev
# mount ext4 /dev/block/nandh /cache wait noatime nosuid nodev
wait /dev/block/nande
mount ext4 /dev/block/nande /data wait noatime nosuid nodev barrier=0
setupfs /dev/block/nande
umount /data
exec /system/bin/logwrapper /system/bin/e2fsck -y /dev/block/nande
exec /system/xbin/busybox mount -t ext4 -o noatime,nosuid,nodev,barrier=0,journal_checksum,noauto_da_alloc /dev/block/nande /data
mount ext4 /dev/block/nandh /cache wait noatime nosuid nodev barrier=0
setupfs /dev/block/nandh
umount /cache
exec /system/bin/logwrapper /system/bin/e2fsck -y /dev/block/nandh
exec /system/xbin/busybox mount -t ext4 -o noatime,nosuid,nodev,barrier=0,journal_checksum,noauto_da_alloc /dev/block/nandh /cache
format_userdata /dev/block/nandi A10-MID
on boot
# Enable interactive governor
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
# Lower maximum frequency when screen is off
write /sys/devices/system/cpu/cpu0/cpufreq/screen_off_max_freq 696000
# cpufreq interactive governor: timer 20ms, min sample 20ms, hispeed 700MHz
write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 20000
write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 20000
write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 696000
# chown adequately for power HAL
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
# gpu drivers
insmod /system/lib/modules/ump.ko
insmod /system/lib/modules/mali.ko
# touchscreen drivers
#insmod /system/lib/modules/ft5x_ts.ko
#insmod /system/lib/modules/goodix_touch_3F.ko
#insmod /system/lib/modules/goodix_touch.ko
#insmod /system/lib/modules/gt801_2plus1.ko
#insmod /system/lib/modules/ssd253x-ts.ko
#insmod /system/lib/modules/Novatek_TouchDriver.ko
# gsensor drivers
#insmod /system/lib/modules/bma250.ko
#insmod /system/lib/modules/mecs.ko
#insmod /system/lib/modules/mxc622x.ko
#insmod /system/lib/modules/mma7660.ko
#insmod /system/lib/modules/kxte9.ko
# camera drivers
insmod /system/lib/modules/videobuf-core.ko
insmod /system/lib/modules/videobuf-dma-contig.ko
insmod /system/lib/modules/gc0308.ko
insmod /system/lib/modules/gc0308b.ko
insmod /system/lib/modules/gt2005.ko
insmod /system/lib/modules/mt9m112.ko
insmod /system/lib/modules/ov5640.ko
insmod /system/lib/modules/sun4i_csi1.ko
insmod /system/lib/modules/sun4i_csi0.ko
# usb ethernet drivers
insmod /system/lib/modules/usbnet.ko
insmod /system/lib/modules/asix.ko
insmod /system/lib/modules/qf9700.ko
insmod /system/lib/modules/mcs7830.ko
insmod /system/lib/modules/rtl8150.ko
# misc
#chown system system /sys/class/timed_output/sun4i-vibrator/enable
chown system system /sys/class/rfkill/rfkill0/state
chmod 0777 /sys/class/rfkill/rfkill0/state
write /sys/class/rfkill/rfkill0/state 0
on post-fs-data
mkdir /data/misc/sensors 0777 system system
setprop vold.post_fs_data_done 1
# wifi related service
service wpa_supplicant /system/bin/wpa_supplicant -D wext -i wlan0 \
-c /data/misc/wifi/wpa_supplicant.conf -e /data/misc/wifi/entropy.bin
class main
socket wpa_wlan0 dgram 0660 wifi wifi
group system wifi inet
disabled
oneshot
service p2p_supplicant /system/bin/wpa_supplicant -D wext -i wlan0 \
-c /data/misc/wifi/wpa_supplicant.conf -e /data/misc/wifi/entropy.bin
class main
socket wpa_wlan0 dgram 0660 wifi wifi
group system wifi inet
disabled
oneshot
# dhcpcd daemons
service dhcpcd_wlan0 /system/bin/dhcpcd -aABKL
class main
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -aABKL
class main
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n
class main
disabled
oneshot
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service iprenew_eth0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service memsicd /system/bin/logwrapper /system/bin/memsicd
class memsicd
oneshot
on property:dev.bootcomplete=1
write /sys/module/lowmemorykiller/parameters/minfree "2048,4096,51200,56320,61440,70400"