install.sh
938 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/bash
#
# script to install the BBRDB driver loadable module
# and required files
#
# this script must be run as 'root'
#
KVERSION=`uname -r`
DRIVER=$KVERSION/bbrdb.o
MODMAP=/lib/modules/$KVERSION/modules.usbmap
echo Running linux kernel version is $KVERSION
if [ ! -f $DRIVER ]; then
echo $DRIVER: not found
echo No driver binary available for linux kernel $KVERSION;
exit 1;
fi
cp -f $DRIVER /lib/modules/$KVERSION/kernel/drivers/usb
if grep bbrdb $MODMAP > /dev/null; then
echo bbrdb spec already in modules.usbmap;
else
echo Adding bbrdb spec to $MODMAP;
cat modules.usbmap.append >> $MODMAP;
fi
/sbin/depmod -a
if [ -c /dev/usb/bbrdb0 ]; then
echo /dev entries already exist;
else
echo Creating /dev entries;
mknod /dev/usb/bbrdb0 c 180 160;
mknod /dev/usb/bbrdb1 c 180 161;
mknod /dev/usb/bbrdb2 c 180 162;
mknod /dev/usb/bbrdb3 c 180 163;
chmod 666 /dev/usb/bbrdb?;
fi
/sbin/rmmod bbrdb
/sbin/insmod bbrdb