Installing GnuRadio from source on Debian Jessie

It's easy!

Fortunately, there are now new packages in Debian Testing/Unstable (reportedly working well) and Ubuntu 16.04. There are backports in Jessie too, but only on the amd64 architecture.

Please see GnuRadio, Volk and RaspberryPi 2 if you are compiling on Raspbian.

You need 1.2 GB RAM for linking. This means that you cannot link it on Raspberry Pi 2 or CubieBoard. Use local swap, NBD swap or cross-compiling (FIXME) for it (scroll down for more info).

After installation is complete, run volk_profile (or volk_profile -i 512 on slow machines). It will benchmark and select the best vectorized kernels for your machine. Speedups of 150-190 % have been reported.

grcc s broken in current master, patch and more info here.
This patch for gr-osmosdr works around current bug in gnuradio: https://gnuradio.org/redmine/issues/775
diff --git a/grc/gen_osmosdr_blocks.py b/grc/gen_osmosdr_blocks.py
index d29de3e..822dbb8 100644
--- a/grc/gen_osmosdr_blocks.py
+++ b/grc/gen_osmosdr_blocks.py
@@ -457,6 +457,7 @@ def parse_tmpl(_tmpl, **kwargs):
 
 max_num_mboards = 8
 max_num_channels = max_num_mboards*4
+max_num_channels = 4
 
 import os.path
 
### rtl-sdr
sudo apt-get install git build-essential cmake libusb-1.0-0-dev
## Ubuntu 14.04:
sudo apt-get install libasound2-dev

git clone git://git.osmocom.org/rtl-sdr
cd rtl-sdr/
mkdir build
cd build
#cmake .. -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON
cmake ..
make
sudo make install
cd ../..

echo "blacklist dvb_usb_rtl28xxu rtl2830 rtl2832" > /etc/modprobe.d/rtl.conf

### gnuradio
# basic
sudo apt-get install python-cheetah libboost-all-dev swig2.0 python-pkgconfig liborc-0.4-dev libfftw3-dev libasound2-dev libzmq-dev libgsl0-dev python-sphinx libcppunit-dev libgsm1-dev python-numpy libgsl0-dev python-mako
# On Debian Sid, install libgsl-dev instead of libgsl0-dev
# to get documentation
sudo apt-get install doxygen
# to get Qt4 GUI blocks
sudo apt-get install python-qt4 libqt4-dev python-qwt5-qt4
# to get GTK GUI blocks
sudo apt-get install python-wxgtk3.0

## Ubuntu 14.04:
sudo apt-get install python-cheetah libboost-dev libboost-all-dev libfftw3-dev swig
# for GUI (optional)
sudo apt-get install libxml2-dev libzmq3-dev python-gtk2-dev python-numpy libxml++2.6-dev python-lxml\
 libwxgtk3.0-dev python-qwt5-qt4 pyqt4-dev-tools python3-pyqt4 python-gtk2

git clone http://git.gnuradio.org/git/gnuradio.git
cd gnuradio/

git submodule init
git submodule update
cd volk
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..

mkdir build
cd build
cmake -DENABLE_DOXYGEN=OFF ..
# There is currently conflict with UHD and Boost in Debian Sid. Use -DENABLE_GR_UHD=OFF
# if you don't need UHD and have problems with linking.
make
# if you have enought RAM (8GiB +) you can make it much faster
# make -j 4
sudo make install
cd ../..

### Optional: bladeRF
git clone https://github.com/Nuand/bladeRF.git
cd bladeRF/host
mkdir build
cd build
cmake ..
make -j 2
sudo make install
cd ../../..

### Optional: hackrf
git clone https://github.com/mossmann/hackrf
cd hackrf/host
mkdir build
cd build
cmake ..
make -j 2
sudo make install
cd ../../..

### osmosdr
git clone git://git.osmocom.org/gr-osmosdr
cd gr-osmosdr/
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..

### optional: airspy
git clone https://github.com/airspy/host/
mv host airspy
cd airspy/
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..

### gqrx
sudo apt-get install qt5-qmake

git clone git://github.com/csete/gqrx.git
cd gqrx
qmake .
make


### dsd
git clone git://github.com/szechyjs/mbelib.git
cd mbelib
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..

wget -O itpp-latest.tar.bz2 http://sourceforge.net/projects/itpp/files/latest/download?source=files
tar xjf itpp-latest.tar.bz2
cd itpp-*
mkdir build && cd build
cmake ..
make -j
sudo make install

sudo apt-get install libsndfile1-dev fftw3-dev liblapack-dev portaudio19-dev
git clone git://github.com/szechyjs/dsd.git
cd dsd
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..

### multimon-ng
sudo apt-get install libpulse-dev
git clone git://github.com/EliasOenal/multimon-ng.git
cd multimon-ng
mkdir build
cd build
qmake ../multimon-ng.pro PREFIX=/usr/local
make
sudo make install

Low memory fun

It is not possible to link it on systems with 1 GB RAM. Unfortunately, this is what most ARM boards have.

Except for nbd swap, you can try mounting the filesystem on some other machine. But it's probably not ARM and cross-compiling is PITA (you need for example the entire armhf Boost!). You can run ARM code in Qemu software emulator. This is going to be slow. Do

cp /usr/bin/qemu-arm-static /mnt/foo/usr/bin

and then just chroot there and run compilation as usual.

Prebuilt binaries

I will occasionally release prebuilt binaries (rtl-sdr + gnuradio). They are compiled with -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 and were tested on Debian Jessie on Radxa Rock Pro and Orange Pi PC. RaspberryPi should have the very same architecture.

http://jenda.hrach.eu/brm/rad/gnuradio-arm/

 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki