-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.encore.rc
executable file
·207 lines (160 loc) · 5.99 KB
/
init.encore.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
on early-init
start hwprops
on init
# setup global environment
export PHONE_STORAGE /mnt/emmc
export DSP_PATH /system/lib/dsp
export DEFAULT_BASEIMAGE /system/lib/dsp/baseimage.dof
# create mountpoints
mkdir /mnt/emmc 0000 system system
mkdir /mnt/usbdisk 0000 system system
symlink /mnt/emmc /emmc
symlink /mnt/usbdisk /usbdisk
# for encore
mkdir /rom 0777 root root
on fs
# mount partitions
mount vfat /dev/block/mmcblk0p2 /rom sync noatime nodiratime uid=1000,gid=1000,fmask=117,dmask=007
mount ext4 /dev/block/mmcblk0p5 /system wait ro barrier=1
mount ext4 /dev/block/mmcblk0p6 /data wait noatime nosuid nodev barrier=1 noauto_da_alloc
mount ext4 /dev/block/mmcblk0p7 /cache wait noatime nosuid nodev barrier=1
on post-fs
# load kernel modules
#insmod /system/lib/modules/bridgedriver.ko
#insmod /system/lib/modules/dm-mod.ko
#insmod /system/lib/modules/dm-crypt.ko
#insmod /system/lib/modules/tun.ko
# change permissions for alsa nodes
symlink /dev/snd/pcmC0D0c /dev/pcmC0D0c
symlink /dev/snd/pcmC0D0p /dev/pcmC0D0p
symlink /dev/snd/controlC0 /dev/controlC0
symlink /dev/snd/timer /dev/timer
chown audio audio /dev/pcmC0D0c
chown audio audio /dev/pcmC0D0p
chown audio audio /dev/controlC0
chown audio audio /dev/timer
on boot
# wireless
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
# bluetooth power up/down interface
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/state
# bluetooth uart
chown bluetooth bluetooth /dev/ttyS1
setprop wifi.interface tiwlan0
setprop wlan.driver.status "ok"
# CyanMobile Props
setprop ro.squadzone.build 1
setprop persist.sys.gmaps_hack 1
# Temporary workaround for SOD
# Only needed for 2.6.29
#write /sys/power/wake_lock 1
# Enable Power Management - thanks NookieFroyo for this
# Mount Debug file system
mount debugfs /sys/kernel/debug /sys/kernel/debug
# Enabling sleep in idle path
write /sys/kernel/debug/pm_debug/sleep_while_idle 1
# Enabling Voltage OFF in idle path
write /sys/kernel/debug/pm_debug/voltage_off_while_idle 1
# Enabling OFF mode
write /sys/kernel/debug/pm_debug/enable_off_mode 1
# Enablig DVFS with ondemand governor
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor conservative
# Enabling SmartReflex for Zoom3 OMAP3630
write /sys/power/sr_vdd1_autocomp 1
write /sys/power/sr_vdd2_autocomp 1
# Permissions for setting the DSP Frequency
chown media root /sys/power/dsp_freq
# Permissions for DSP bridge device
chmod 0777 /dev/DspBridge
# Permissions for Overlay
chmod 0777 /dev/video1
chmod 0777 /dev/video2
chmod 0777 /dev/omap-resizer
chmod 0777 /dev/omap-previewer
# change permissions for overlay managers and display devices
chmod 0777 /sys/devices/platform/omapdss/manager0/name
chmod 0777 /sys/devices/platform/omapdss/manager1/name
chmod 0777 /sys/devices/platform/omapdss/display0/name
chmod 0777 /sys/devices/platform/omapdss/display0/enabled
chmod 0777 /sys/devices/platform/omapdss/display0/timings
chmod 0777 /sys/devices/platform/omapdss/overlay0/manager
chmod 0777 /sys/devices/platform/omapdss/overlay1/manager
chmod 0777 /sys/devices/platform/omapdss/overlay2/manager
chmod 0777 /sys/devices/platform/omapdss/overlay0/enabled
chmod 0777 /sys/devices/platform/omapdss/overlay1/enabled
chmod 0777 /sys/devices/platform/omapdss/overlay2/enabled
# SGX driver
chmod 0666 /dev/pvrsrvkm
#Set read_ahead buffers
write /sys/block/mmcblk0/bdi/read_ahead_kb 1024
write /sys/block/mmcblk1/bdi/read_ahead_kb 1024
# There's no back seek penalty on MMC
write /sys/devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/queue/iosched/back_seek_penalty 0
# Allow us to seek up to 1GB back
write /sys/devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/queue/iosched/back_seek_max 1048576
# Only pick one request from each queue at each round robin
write /sys/devices/platform/mmci-omap-hs.1/mmc_host/mmc0/mmc0:0001/block/mmcblk0/queue/iosched/quantum 1
service hwprops /sbin/hwprops
critical
disabled
oneshot
# Initialize the SGX driver
service pvrsrvinit /system/bin/pvrsrvinit
user root
oneshot
# Start of SGX driver
service pvrsrv /system/bin/sh /system/bin/sgx/rc.pvr start
user root
oneshot
# Update the battery data heuristics every hour
service logbatterydata /system/bin/log_battery_data.sh
user root
group root
# OMAP specific services start here
service clearboot /system/bin/clear_bootcnt.sh
user root
group root
oneshot
# OMAP stuff:
# most of this is unused for the moment.
# load DSP firmwarevpl
service baseimage /system/bin/dspexec /system/lib/dsp/baseimage.dof
user root
group audio
oneshot
#service pppd_gprs /etc/init.gprs-pppd /dev/pts/1
# user root
# group radio cache inet misc
# disabled
#service fw3a /system/bin/fw3a_core
# user media
# group system camera
service uim /system/bin/uim-sysfs
user root
group media bluetooth
oneshot
service wlan_loader /system/bin/wlan_loader \
-f /system/etc/wifi/firmware.bin \
-i /system/etc/wifi/tiwlan.ini \
-e /rom/DevConf/WiFiBackupCalibration
disabled
oneshot
service ifcfg_ti /system/bin/ifconfig tiwlan0 up
disabled
oneshot
service wpa_supplicant /system/bin/wpa_supplicant \
-Dtiwlan0 -itiwlan0 -c/data/misc/wifi/wpa_supplicant.conf
socket wpa_tiwlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_tiwlan0 /system/bin/dhcpcd -ABKL tiwlan0
disabled
oneshot
service iprenew_tiwlan0 /system/bin/dhcpcd -n
disabled
oneshot