forked from g1011999/device-amazon-otter
-
Notifications
You must be signed in to change notification settings - Fork 29
/
init.omap4430.rc
260 lines (207 loc) · 7.21 KB
/
init.omap4430.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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
import init.omap4430.usb.rc
on init
loglevel 8
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/media_rw/sdcard0 0700 media_rw media_rw
mkdir /storage/sdcard0 0700 root root
export EXTERNAL_STORAGE /storage/sdcard0
# Support legacy paths
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
# create removable USB Mass Storage mountpoints
mkdir /storage/usb0 0555 root root
mkdir /storage/usb1 0555 root root
on fs
mkdir /factory 0775 radio radio
mount_all /fstab.omap4430
swapon_all /fstab.omap4430
# zRAM read only 1 page at a time
write /proc/sys/vm/page-cluster 0
# pvr module
insmod /system/lib/modules/pvrsrvkm_sgx540_120.ko
insmod /system/lib/modules/omaplfb_sgx540_120.ko
start pvrsrvinit
# change permissions for mtd device
chmod 0660 /dev/mtd/mtd0
chown media media /dev/mtd/mtd0
# change permissions for i2c-2 device
chmod 0660 /dev/i2c-2
chown media media /dev/i2c-2
# change permissions for Tiler driver
chmod 0777 /dev/tiler
chmod 0777 /dev/dmm
# change permissions for ION driver
chmod 0777 /dev/ion
# change permissions for rfkill
chmod 0777 /dev/rfkill
# We chown/chmod /factory because mount is run as root + defaults
chown radio radio /factory
chmod 0775 /factory
# change permissions for Sensors
# bma250
chown system system /sys/bus/i2c/devices/4-0018/delay
chmod 0771 /sys/bus/i2c/devices/4-0018/delay
chown system system /sys/bus/i2c/devices/4-0018/enable
chmod 0771 /sys/bus/i2c/devices/4-0018/enable
# stk-als22x7
chown system system /sys/bus/i2c/devices/4-0010/enable
chmod 0771 /sys/bus/i2c/devices/4-0010/enable
# change permissions for Thermal sensor TMP105
chmod 0777 /sys/class/hwmon/hwmon0/device/temp1_max
chmod 0777 /sys/class/hwmon/hwmon0/device/temp1_max_hyst
# change permissions for Tiler driver
chown media media /dev/tiler
chmod 0666 /dev/tiler
# LEDs
chmod 0777 /dev/ilitek_ctrl
chmod 0777 /sys/class/leds/lcd-backlight/brightness
chmod 0666 /sys/class/leds/led-green/brightness
chmod 0666 /sys/class/leds/led-orange/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/led-green/brightness
chown system system /sys/class/leds/led-orange/brightness
# Set default maximum of 1008 on cpu0 (peformance settings will change this if set by user)
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1008000
#Give system ownership and permission to boost clock for specified timeout
#Note boost_timeout cannot be changed from application because of dynamic sysfs creation. It will have default value of 3 sec.
chown system system /sys/devices/system/cpu/cpu0/cpufreq/boost_cpufreq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/boost_cpufreq
# Set current permissions for charge protection
chown system system /sys/class/power_supply/usb/device/charge_command
chown system system /sys/class/power_supply/usb/device/charge_current
chown system system /sys/class/power_supply/usb/device/float_voltage
chown system system /sys/class/power_supply/usb/device/bad_battery
on post-fs
# wi-fi
setprop wifi.interface "wlan0"
setprop softap.interface "wlan0"
insmod /system/lib/modules/compat.ko
insmod /system/lib/modules/cfg80211.ko
insmod /system/lib/modules/mac80211.ko
insmod /system/lib/modules/wl12xx.ko
# symlink egl.cfg
symlink /sys/egl/egl.cfg /system/lib/egl/egl.cfg
on post-fs-data
mkdir /data/tmp 0777 system system
symlink /data/tmp /tmp
# make dir for trace
mkdir /cache/trace 0777 system system
chmod 0777 /cache/trace
# wifi
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
mkdir /data/smc 0770 drmrpc drmrpc
chown drmrpc drmrpc /data/smc/counter.bin
chown drmrpc drmrpc /data/smc/storage.bin
chown drmrpc drmrpc /data/smc/system.bin
# run mac script
start fixmac
# mount system ro
mount ext4 /dev/block/mmcblk0p9 /system ro remount
setprop vold.post_fs_data_done 1
on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
chmod 0666 /dev/pvrsrvkm
setprop ro.radio.noril yes
# fake some battery state
setprop status.battery.state Slow
setprop status.battery.level 5
setprop status.battery.level_raw 50
setprop status.battery.level_scale 9
service fixmac /system/bin/fix-mac.sh
class core
user root
group root
oneshot
disabled
service hwprops /sbin/hwprops
critical
disabled
oneshot
# initialize the SGX driver
service pvrsrvinit /system/vendor/bin/pvrsrvinit
class core
user root
group root
oneshot
disabled
###################################################
# MSHIELD SMC Daemon - component required to store persistent data coming
# from the SMC PA to the device persistent storage
###################################################
service tf_daemon /system/bin/tf_daemon \
-d -c /vendor/etc/smc_normal_world_android_cfg.ini
class main
user root
group root
oneshot
disabled
###################################################
# MSHIELD SMC PA Control - installs the SMC PA into the Secure Environment
###################################################
service smc_pa /system/bin/smc_pa_ctrl \
-c /vendor/etc/smc_normal_world_android_cfg.ini \
start /vendor/firmware/smc_pa.ift
class core
user root
group root
oneshot
# wifi services
service p2p_supplicant /system/bin/wpa_supplicant -e/data/misc/wifi/entropy.bin \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
-g@android:wpa_wlan0
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service wpa_supplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin \
-g@android:wpa_wlan0
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
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 dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service iprenew_bnep0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service hostapd_bin /system/bin/hostapd -d -e/data/misc/wifi/entropy.bin /data/misc/wifi/hostapd.conf
socket wpa_wlan0 dgram 660 wifi wifi
class main
disabled
oneshot
service fuse_sdcard0 /system/bin/sdcard -u 1023 -g 1023 -d /mnt/media_rw/sdcard0 /storage/sdcard0
class late_start
#on property:init.svc.smc_pa=stopped
# start tf_daemon
#service watchdog /sbin/watchdog
# user root
# oneshot
on property:sys.boot_completed=1