author | Florian Pose <fp@igh-essen.com> |
Thu, 20 Apr 2006 13:19:36 +0000 | |
changeset 194 | c21e7c12dd50 |
parent 181 | 3e9155836bc7 |
child 197 | b9a6e2c22745 |
permissions | -rwxr-xr-x |
181
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
1 |
#!/bin/sh |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
2 |
|
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
3 |
#------------------------------------------------------------------------------ |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
4 |
# |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
5 |
# Realtime module install script |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
6 |
# |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
7 |
# $Id: install.sh 5 2006-04-07 13:49:10Z fp $ |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
8 |
# |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
9 |
#------------------------------------------------------------------------------ |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
10 |
|
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
11 |
# Fetch parameters |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
12 |
|
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
13 |
if [ $# -ne 2 ]; then |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
14 |
echo "Usage: $0 <MODULENAME> <KERNEL>" |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
15 |
exit 1 |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
16 |
fi |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
17 |
|
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
18 |
MODULENAME=$1 |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
19 |
KERNEL=$2 |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
20 |
|
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
21 |
MODULESDIR=/lib/modules/$KERNEL/kernel/drivers/rt |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
22 |
|
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
23 |
echo "Realtime installer" |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
24 |
echo " target: $MODULENAME" |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
25 |
echo " kernel: $KERNEL" |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
26 |
|
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
27 |
# Create target directory |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
28 |
|
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
29 |
if [ ! -d $MODULESDIR ]; then |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
30 |
echo " creating $MODULESDIR..." |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
31 |
mkdir $MODULESDIR || exit 1 |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
32 |
fi |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
33 |
|
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
34 |
# Install files |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
35 |
|
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
36 |
echo " installing $MODULENAME..." |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
37 |
if ! cp $MODULENAME.ko $MODULESDIR/$MODULENAME.ko; then exit 1; fi |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
38 |
|
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
39 |
# Calculate dependencies |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
40 |
|
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
41 |
echo " building module dependencies..." |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
42 |
depmod |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
43 |
|
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
44 |
# Finish |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
45 |
|
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
46 |
echo "done." |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
47 |
exit 0 |
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
48 |
|
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
49 |
#------------------------------------------------------------------------------ |