-
-
Save fallenangel3k/ca8ee7dc8cee84c3ee03a4eb6142d13c to your computer and use it in GitHub Desktop.
SoapySDR install script for raspberry PI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Building CubicSDR for Linux | |
# This script will successfully build CubicSDR under Debian Jessie on the Raspberry Pi3. | |
# Adapted from https://github.com/cjcliffe/CubicSDR/wiki/Build-Linux | |
# Larry Dighera June 7, 2016 | |
# [email protected] | |
# songritk Mar 24,2018 # fallenangel3k Nov 21,2020 | |
cd ~ | |
sudo apt-get install -y git build-essential automake cmake | |
sudo apt-get install -y libpulse-dev libgtk-3-dev | |
sudo apt-get install -y freeglut3 freeglut3-dev | |
sudo apt-get install -y libjpeg-dev libtiff-dev \ | |
libsdl1.2-dev libgstreamer-plugins-base0.10-dev \ | |
libgstreamer-plugins-base1.0-dev \ | |
libnotify-dev freeglut3 freeglut3-dev libsm-dev \ | |
libwebkitgtk-dev libwebkitgtk-3.0-dev libwebkit2gtk-4.0-dev \ | |
libxtst-dev | |
sudo apt-get install -y git-core | |
sudo apt-get install -y libusb-1.0-0-dev | |
sudo apt-get install -y librtlsdr-dev | |
sudo apt-get install -y libhamlib2 libhamlib-utils libhamlib++-dev libhamlib-dev libhamlib-doc python-libhamlib2 | |
sudo apt-get install -y libatomic1-arm* libboost-atomic-dev libatomic1-armhf libatomic-ops* | |
#sudo apt-get install -y yum | |
sudo echo "deb http://archive.raspbian.org/raspbian buster main" > /etc/apt/sources.list.d/gnuradio.list | |
sudo apt update -y | |
sudo apt upgrade -y | |
cat <<EOF >no-rtl.conf | |
blacklist dvb_usb_rtl28xxu | |
blacklist rtl2832 | |
blacklist rtl2830 | |
EOF | |
sudo mv no-rtl.conf /etc/modprobe.d/ | |
git clone git://git.osmocom.org/rtl-sdr.git | |
cd rtl-sdr | |
mkdir build && cd build | |
cmake ../ -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON | |
make | |
sudo make install | |
sudo ldconfig | |
cd ~ | |
sudo cp ./rtl-sdr/rtl-sdr.rules /etc/udev/rules.d/ | |
sudo apt-get install -y libasound-dev | |
sudo apt-get install -y libpulse-dev | |
sudo apt-get install -y gnuradio gnuradio-dev | |
mkdir cubicsdr && cd cubicsdr | |
git clone https://github.com/pothosware/SoapySDR.git | |
cd SoapySDR | |
mkdir build && cd build | |
cmake ../ -DCMAKE_BUILD_TYPE=Release | |
make | |
sudo make install | |
sudo ldconfig | |
cd ~ | |
git clone https://github.com/jgaeddert/liquid-dsp | |
cd liquid-dsp | |
./bootstrap.sh | |
#Set CFLAGS below to right architecture! | |
CFLAGS="-march=armv6zk -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -O3" | |
./configure --enable-fftoverride | |
make | |
sudo make install | |
sudo ldconfig | |
cd ~ | |
wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.4/wxWidgets-3.1.4.tar.bz2 | |
tar -xvjf wxWidgets-3.1.4.tar.bz2 | |
cd wxWidgets-3.1.4/ | |
mkdir -p ~/Develop/wxWidgets-staticlib | |
./autogen.sh | |
./configure --with-opengl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng --with-zlib --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webkit --disable-webview --disable-webviewwebkit --prefix=`echo ~/Develop/wxWidgets-staticlib` CXXFLAGS="-std=c++0x" | |
make -j2 && sudo make install && sudo ldconfig # took ages to compile on RPi0 | |
cd ~ | |
git clone https://github.com/thestk/rtaudio/ | |
cd rtaudio | |
./autogen.sh | |
make | |
sudo make install && sudo ldconfig | |
cd ~ | |
#sudo yum repolist all | |
#sudo yum install libatomic | |
cd ~ | |
git clone https://github.com/cjcliffe/CubicSDR.git | |
cd CubicSDR | |
echo 'SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -latomic")' >> CMakeLists.txt | |
mkdir build && cd build | |
cmake ../ -DUSE_HAMLIB=1 -DOTHER_LIBRARIES="-latomic" -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=~/Develop/wxWidgets-staticlib/bin/wx-config | |
make #takes ages to compile with a rasperry pi zero and threw multiple bus and/or segmentation erros .. remove -j2 and try | |
sudo make install #compiled binary is in x86 or x64 folder ... just in case | |
sudo ldconfig | |
cd ~ | |
git clone https://github.com/pothosware/SoapyRTLSDR.git | |
cd SoapyRTLSDR | |
echo 'SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -latomic")' >> CMakeLists.txt | |
mkdir build | |
cd build | |
cmake .. -DOTHER_LIBS=atomic -DCMAKE_BUILD_TYPE=Release | |
make | |
sudo make install | |
sudo ldconfig | |
#Now Start Your new and great CubicSDR! | |
CubicSDR | |
echo "Well DONE! Now everything should work, if you didn't receive any errors..." | |
#Have Fun & stay safe! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 26 (sudo echo "deb http://archive.raspbian.org/raspbian buster main" > /etc/apt/sources.list.d/gnuradio.list) will fail (permission denied) if not running as root. See https://techoverflow.net/2019/03/16/how-to-solve-permission-denied-error-when-trying-to-echo-into-a-file/