spinit_em
887 Bytes
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
#! /bin/sh
LD_LIBRARY_PATH=.
export LD_LIBRARY_PATH
SHMKEY=$$
#echo shmkey is $SHMKEY
$ROOT/usr/etc/driverd -v &
DRIVERD_PID=$!
#echo driverd pid is $DRIVERD_PID
if [ $# -ne 0 ]
then
$ROOT/usr/sbin/emulate -a "$*" -k $SHMKEY spin_em rom_em &
else
$ROOT/usr/sbin/emulate -k $SHMKEY spin_em rom_em &
fi
EMULATE_PID=$!
#echo emulate pid is $EMULATE_PID
$ROOT/usr/tv/bin/dbgif -kcdbr -e $EMULATE_PID &
DBGIF_PID=$!
echo dbgif pid is $DBGIF_PID
trap "killall emulate fineGrain; kill -9 $DRIVERD_PID $DBGIF_PID; ipcrm -M $$; exit" 1 2 3 15
#echo start fineGrain
#echo emulate pid is $EMULATE_PID dbgif pid is $DBGIF_PID
# fineGrain dso key pid_of_emulate
cd ui
fineGrain ../spintcl_em.so $$ $EMULATE_PID ../spintcl_em.so
echo "killing driverd, emulate and dbgif $DRIVERD_PID $EMULATE_PID $DBGIF_PID"
kill -2 $EMULATE_PID
kill -9 $DRIVERD_PID $DBGIF_PID
ipcrm -M $$
exit 0