Repository navigation
Expand file tree
/
Copy pathBUILD_Soapy
More file actions
executable file
·143 lines (120 loc) · 4.26 KB
/
Copy pathBUILD_Soapy
File metadata and controls
executable file
·143 lines (120 loc) · 4.26 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#! /bin/tcsh
##########################################################################################
#
# Script to build SDR support
#
# As of Oct 2024, the latest Soapy is hosed up.
# These is some chatter that this is a result of having mulitple installs
# of soapy. I've done due diligence on this and it doesn't seem that's
# the issue. The best way to tell is by doning a fresh install of the OS
# so next time I end up doing that, well try.
# For now, use the older version that still works.
#
# Mint 21 - Installing from package manager still doesn't work but
# building from scratch seems ok.
# See requirements.txt for list of packages tried. This
# led to an "Illegal Instruction" crash so had to build
# from scratch:
# BUILD_Soapy
# BUILD_RTL
# BUILD_SDRplay
#
# Also tried this on RPi Bookworm but didn't work either. Not sure this is really true
# since I neglected the Blacklisting of the RTLSDR - need to retry this.
#
# This also seems ok for RPi Bullseye 64-bit
#
##########################################################################################
# Install building tools - make sure this works properly before proceeding!!!
if( 0 )then
echo " "
echo "--- Installing build tools ..."
echo " "
sudo apt update
sudo apt upgrade -y
#sudo apt autoremove
sudo apt-get -y install build-essential git cmake automake libpulse-dev \
libgtk-3-dev python3-dev swig python3-tk \
libusb-1.0-0-dev g++ python3-numpy
# Problem childen on RPi - not quite sure why we need these? Apparently, we don't!
# sudo apt-get -y install freeglut3 freeglut3-dev
exit
endif
# These should eliminate need to build everything but we'll see...
if( 0 )then
echo " "
echo "--- Trying out pre-built tools ..."
echo " "
sudo apt -y install python3-soapysdr soapysdr-module-rtlsdr
sudo apt -y install libsoapysdr-doc libsoapysdr-dev soapysdr-tools
rehash
echo " "
echo " --- Let's see if SoapySDRUtil works ..."
echo " "
which SoapySDRUtil
SoapySDRUtil --info
echo " "
echo " --- Let's see if we can find the RTL SDR ..."
echo " "
SoapySDRUtil --probe="driver=rtlsdr"
SoapySDRUtil --find
exit
endif
# Install SoapySDR
rehash
if( 1 )then
echo "\n------------------------------------ Installing SoapySDR ...\n"
mkdir ~/Dev
cd ~/Dev
#cmake --help-policy CMP0078
# NOTE - As of Oct 2024, the latest Soapy is hosed up.
# For now, use the older version that still works.
sudo make uninstall SoapySDR
#sudo rm -rf SoapySDR
#git clone https://github.com/pothosware/SoapySDR.git # First time
cd SoapySDR
#git pull origin master # Update
sudo rm -rf build
mkdir build
cd build
cmake ..
#make
#sudo make install
#sudo ldconfig
make -j4
sudo make install -j4
sudo ldconfig
# Permissions were a real problem when trying to get this to
# work on the RPi.
sudo chmod -R go+rx /usr/local/lib/SoapySDR
sudo chmod -R go+rx /usr/local/lib/pkgconfig
sudo chmod -R go+rx /usr/local/share/cmake
#sudo chmod -R go+rx /usr/local/lib/arm*
sudo chmod -R go+rx /usr/local/lib/aarch64-linux-gnu
sudo chmod -R go+rx /usr/local/lib/aarch64-linux-gnu/libSoapySDR*
sudo chmod -R go+rx /usr/local/lib/aarch64-linux-gnu/pkgconfig
#sudo chmod -R go+rx /usr/local/lib/arm*
rehash
echo " "
which SoapySDRUtil
SoapySDRUtil --info
#exit
endif
##########################################################################################
# SoapyRemote - not quite sure what this does or if we need it - probably not
# Its reported to allow sending IQ samples over TCP/IP but need to verify
if( 0 )then
echo "\n------------------------------------ Install SoapSDR Remote ...\n"
cd ~/Dev
sudo rm -rf SoapyRemote
git clone https://github.com/pothosware/SoapyRemote.git
cd SoapyRemote
rm -rf build
mkdir build
cd build
cmake ../ #-DCMAKE_BUILD_TYPE=Release
make
sudo make install
sudo ldconfig
exit
endif