-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_pinav.sh
39 lines (32 loc) · 1.05 KB
/
install_pinav.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
#!/bin/bash
#setup usb gadget functionality
#echo "dtoverlay=dwc2" | sudo tee -a /boot/config.txt
#echo "dwc2" | sudo tee -a /etc/modules
#echo "libcomposite" | sudo tee -a /etc/modules
#enable console on serial
#systemctl enable getty@ttyGS0.service
#copy libusbgx libraries
cp libusbgx/libusbgx.a /usr/local/lib
cp libusbgx/libusbgx.la /usr/local/lib
cp libusbgx/libusbgx.lai /usr/local/lib
cp libusbgx/libusbgx.so /usr/local/lib
cp libusbgx/libusbgx.so.2 /usr/local/lib
cp libusbgx/libusbgx.so.2.0.0 /usr/local/lib
ldconfig
#copy executables
cp bin/navpair /usr/bin
cp bin/sixpair /usr/bin
cp bin/pinav_usb /usr/bin
cp bin/pinav_bridge_daemon /usr/bin
#make the executables... well... executable
chmod +x /usr/bin/navpair
chmod +x /usr/bin/sixpair
chmod +x /usr/bin/pinav_usb
chmod +x /usr/bin/pinav_bridge_daemon
#copy misc files
cp misc/pinav.ini /boot
cp misc/pinav_usb.service /etc/systemd/system
cp misc/pinav_bridge_daemon@.service /etc/systemd/system
cp misc/99-pinav_bridge_daemon.rules /etc/udev/rules.d
#enable pinav service
systemctl enable pinav_usb