-
Notifications
You must be signed in to change notification settings - Fork 2
/
BUILD_Soapy
executable file
·110 lines (87 loc) · 3.16 KB
/
BUILD_Soapy
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
#! /bin/tcsh
# Script to build SDR support
# 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( 1 )then
sudo apt update
sudo apt upgrade -y
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
# 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( 1 )then
sudo apt -y install python3-soapysdr soapysdr-module-rtlsdr
sudo apt -y install libsoapysdr-doc libsoapysdr-dev soapysdr-tools
rehash
which SoapySDRUtil
SoapySDRUtil --info
exit
endif
# Install SoapySDR
rehash
if( 1 )then
echo "\n------------------------------------ Installing SoapySDR ...\n"
mkdir ~/Dev
cd ~/Dev
#cmake --help-policy CMP0078
sudo make uninstall SoapySDR
sudo rm -rf SoapySDR
git clone https://github.com/pothosware/SoapySDR
cd SoapySDR
sudo rm -rf build
mkdir build
cd build
cmake ..
make
sudo make install
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
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