blob: 7904e2d7a852f7e46a59765f44ccd29d0055d8e0 (
plain)
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
|
#!/bin/sh
# Color set for ANSI TERM
_R='\033[0;31;1m' #Red
_G='\033[0;32;1m' #Green
_Y='\033[0;33;1m' #Yellow
C_='\033[0m' #Color off
echo -e "[${_G}rc.emul : script start ${C_}]"
echo -e "[${_G}sshd start ${C_}]"
/etc/init.d/ssh start
echo -e "[${_G}chmod +x /opt/media for various apps ${C_}]"
chmod -R 777 /opt/media
echo -e "[${_G}make symbolic link ${C_}]"
ln -sf /mnt/mmc /sdcard
ln -sf /proc/mounts /etc/mtab
echo -e "[${_G}Setting power manager state value ${C_}]"
/usr/bin/vconftool set -t int memory/pm/state 1 -f
echo -e "[${_G}Initialize battery level ${C_}]"
#/usr/bin/vconftool set -t int memory/Battery/Level 5 -f
/usr/bin/vconftool set -t int memory/sysman/battery_status_low 4 -f
#echo -e "[${_G}Mount SD card ${C_}]"
#mount -o umask=000 /dev/mmcblk0 /mnt/mmc
#chmod 777 /opt/storage/sdcard
#MMC_MOUNT=`/bin/mount | grep mmc`
#if [ -n "$MMC_MOUNT" ]; then
# echo -e "[${_G}MMC storage detected ${C_}]"
# /usr/bin/vconftool set -t memory/sysman/mmc 1 -f
# /usr/bin/vconftool set -t int memory/filemanager/Mmc 2 -f
#fi
echo -e "[${_G}Mount host directory${C_}]"
test -d "/mnt/host" || mkdir "/mnt/host"
if grep "cifs=" /proc/cmdline ; then
cifs=`sed 's/^.*cifs=\([^, ]*\).*$/\1/g' /proc/cmdline`
opts=`sed 's/^.*cifs=\([^, ]*\),username=\([^, ]*\),password=\([^, ]*\).*$/username=\2,password=\3/g' /proc/cmdline`
cifs=`echo $cifs | tr [a-z] [A-Z]`
if mount -t cifs //10.0.2.2/$cifs /mnt/host -o $opts,file_mode=0777,dir_mode=0777; then
echo -e "[${_Y}Mount.cifs succeed${C_}]"
else
echo -e "[${_R}Mount.cifs fail!!!!${C_}]"
fi
fi
if grep "virtio-9p" /proc/cmdline ; then
if mount -t 9p -o trans=virtio fileshare /mnt/host -oversion=9p2000.L -o msize=65536; then
echo -e "[${_Y}Mount.9pfs succeed${C_}]"
else
echo -e "[${_R}Mount.9pfs fail!!!!${C_}]"
fi
fi
if grep -q "enable_cam" /proc/cmdline ; then
if grep -q "enable_cam=1" /proc/cmdline ; then
echo -e "[${_Y}Webcam is connected. We can use '/dev/video0' for camera.${C_}]"
else
echo -e "[${_Y}Webcam is not connected! We will remove '/dev/video0'.${C_}]"
rm -rf /dev/video0
fi
fi
echo -e "[${_G}to generate modules.dep and map files${C_}]"
depmod -a
#--move to rc3.d/S30brgihtness
#echo -e "[${_G}to change brightness's group${C_}]"
#chgrp system_bklight /sys/class/backlight/emulator/brightness
#chmod g+w /sys/class/backlight/emulator/brightness
#echo -e "[${_G}to change lcd_power's group${C_}]"
#chown -R root:system_bklight /sys/devices/virtual/lcd/emulator/lcd_power
#--
echo -e "[${_G}Initialize display setting value${C_}]"
#/usr/bin/vconftool set -t int db/setting/Brightness "24" -f
/usr/bin/vconftool set -t int db/sysman/lcd_backlight_normal "600" -f
echo -e "[${_G}For menu_screen booting..${C_}]"
/usr/bin/vconftool set -t int memory/startapps/sequence 1 -f
echo -e "[${_G}rc.emul : script end ${C_}]"
|