-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinux_setup.sh
More file actions
108 lines (91 loc) · 2.88 KB
/
Copy pathlinux_setup.sh
File metadata and controls
108 lines (91 loc) · 2.88 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/bin/bash
# GRC Block setup is based on this discussion: https://lists.gnu.org/archive/html/discuss-gnuradio/2017-03/msg00083.html
#wget https://raw.githubusercontent.com/DonLakeFlyer/VHFCollarCompanion/master/rpi_setup.sh
echo "*** Install git"
sudo apt-get install git -y
echo "*** Create repos directory"
cd ~
if [ ! -d repos ]; then
mkdir repos
fi
cd ~/repos
echo "*** Clone VHFPulseDetect"
cd ~/repos
if [ ! -d VHFPulseDetect ]; then
git clone https://github.com/DonLakeFlyer/VHFPulseDetect.git
cd VHFPulseDetect
git config credential.helper store
fi
echo "*** rPi Setup (y/n)"
read answer
if [ "$answer" != "${answer#[Yy]}" ] ;then
echo "*** Setup WiFi Connections: STE:y PDC:n (y/n)"
cd ~/repos/VHFCollarCompanion
read answer
if [ "$answer" != "${answer#[Yy]}" ] ;then
sudo cp wpa_supplicant_ste.conf /etc/wpa_supplicant/wpa_supplicant.conf
else
sudo cp wpa_supplicant_pdc.conf /etc/wpa_supplicant/wpa_supplicant.conf
fi
echo "*** Settings CPUs to performance mode"
# https://github.com/DavidM42/rpi-cpu.gov
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
cd ~
wget https://raw.githubusercontent.com/DavidM42/rpi-cpu.gov/master/install.sh && sudo chmod +x ./install.sh && sudo ./install.sh --nochown && sudo rm install.sh
cpu.gov -g performance
echo "** Setup GRC Block Location"
if [ -z ${GRC_HIER_PATH+x} ]; then
sudo sh -c 'echo "GRC_HIER_PATH=/home/pi/repos/VHFCollarCompanion" > /etc/environment'
fi
echo "*** Install OSX APF support"
sudo apt-get install netatalk -y
else
echo "** Setup GRC Block Location"
if [ -z ${GRC_HIER_PATH+x} ]; then
sudo sh -c 'echo "GRC_HIER_PATH=/home/parallels/repos/VHFPulseDetect/gnuradio" > /etc/environment'
fi
fi
echo "*** VHF Drone setup (y/n)"
read answer
if [ "$answer" != "${answer#[Yy]}" ] ;then
sudo apt-get install python-pip -y
sudo apt-get install libxml2-dev libxslt-dev python-dev -y
sudo pip install -U pymavlink
sudo pip install pyserial
fi
echo "** Install GNU Radio"
sudo apt-get install gnuradio -y
echo "** Install osmosdr block"
sudo apt-get install gr-osmosdr -y
echo "*** Install tools for build Custom GNU Radio blocks"
sudo apt-get install cmake libairspy0 libairspy-dev swig -y
echo "*** Git setup"
git config --global user.email "don@thegagnes.com"
git config --global user.name "DonLakeFlyer"
echo "*** Install Pulse Sender block"
cd ~/repos
if [ ! -d gr-VHFPulseSender ]; then
git clone https://github.com/DonLakeFlyer/gr-VHFPulseSender.git
cd gr-VHFPulseSender
git config credential.helper store
mkdir build
cd build/
cmake ../
make
sudo make install
sudo ldconfig
fi
echo "*** Install Pulse Detect block"
cd ~/repos
if [ ! -d gr-VHFPulseDetect ]; then
git clone https://github.com/DonLakeFlyer/gr-VHFPulseDetect.git
cd gr-VHFPulseDetect
git config credential.helper store
mkdir build
cd build/
cmake ../
make
sudo make install
sudo ldconfig
fi
cd ~/repos/VHFCollarCompanion