-
Notifications
You must be signed in to change notification settings - Fork 7
/
install_driver.sh
executable file
·46 lines (40 loc) · 1.32 KB
/
install_driver.sh
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
#!/bin/bash
echo "### Module For QUANT HD USER FACING BY @Prabhat_Proxy ###"
echo " Special Thanks to Giuliano69 for the driver :)"
echo ""
echo "building"
echo ""
cd src/uvc
rm -rf *.o *.ko *.mod* *.symvers *.order
COMPILER_VERSION=$(grep -o 'x86_64-linux-gnu-gcc-[0-9]*' /proc/version | head -n 1)
if [[ -z $COMPILER_VERSION ]]; then
make -C /lib/modules/$(uname -r)/build M=$(pwd)
else
echo "$COMPILER_VERSION"
echo ""
make -C /lib/modules/$(uname -r)/build M=$(pwd) CC="$COMPILER_VERSION"
fi
if [ -e uvcvideo.ko ]
then
echo "Compiled Successfully"
echo "copying module to root."
echo ""
sudo rm -rf /usr/lib/modules/uvcvideo.ko
sudo rm -rf /usr/bin/loaduvc.sh
sudo cp -r uvcvideo.ko /usr/lib/modules/uvcvideo.ko
cd ../..
sudo cp loaduvc.sh /usr/bin/loaduvc.sh
echo ""
echo "2) copying service to systemd."
sudo cp loaduvc.service /etc/systemd/system/loaduvc.service
echo ""
echo "3) enabling service."
sudo systemctl enable loaduvc.service
sudo systemctl start loaduvc.service
echo ""
echo "If their are no errors then your camera will start working!"
else
echo "failed to compile module! check docs and report any error"
fi
echo ""
echo "report any issue on github repo https://github.com/PrabhatProxy/Quanta-HD-User-Facing-0x0408-0x4035_linux/issues "