Strategy
Many tutorials already exist, that cover building bladeRF drivers, Gnuradio, Osmocom and GQRX from source. The main difference here is, that I will NOT install the built packages into my system directories or modify system files. Instead I will keep them separately in a folder in my home directory and use a startup script, that temporarily sets up the environment using the software. That way I can just delete the folder, reboot and I have a “clean” system again.
Why should I go this way? Well, I like to experiment a lot, sometimes I’m working on several projects in parallel. That also includes messing up stuff. The described strategy offers the easiest way to clean up and start over again without reinstalling the operating system.
Let’s get started
I’m starting off with a fresh Ubuntu 13.10 (beta) here. First we install several packages that set up the build environment.
sudo apt-get install git g++ cmake cmake-curses-gui libboost-all-dev libfftw3-dev libcppunit-dev python swig python-numpy doxygen python-cheetah python-gtk2-dev libgsl0-dev qt-sdk libqwt-dev python-qt4-dev python-qwt5-qt4 jackd qjackctl libsdl1.2-dev liblog4cpp5-dev phonon-backend-gstreamer phonon-backend-vlc libusb-1.0-0-dev libtecla1-dev python-wxgtk2.8 wx2.8-headers libjack-jackd2-dev
Let’s build stuff. Run these steps without superuser priviledges and change the pathnames according to your system. You will notice, that I use ccmake instead of cmake. This is a convenient tool to inspect and edit the available build settings. You could also go with cmake using the apropriate command parameters.
Building gnuradio
git clone http://git.gnuradio.org/git/gnuradio.git cd gnuradio mkdir build cd build/ ccmake ../
Edit CMAKE_INSTALL_PREFIX: /home/matthias/downloads/sdr/installed
make make install
Building bladeRF libraries
git clone https://github.com/Nuand/bladeRF.git cd bladeRF/host mkdir build cd build/ ccmake ../
Edit CMAKE_INSTALL_PREFIX: /home/matthias/downloads/sdr/installed
Set INSTALL_UDEV_RULES to OFF
make make install
There might be errors about not beeing able to install some rules to a system directory. Ignore this for now.
Build RTL-SDR
git clone git://git.osmocom.org/rtl-sdr.git cd rtl-sdr mkdir build cd build/ ccmake ../
Edit CMAKE_INSTALL_PREFIX: /home/matthias/downloads/sdr/installed
Edit Gnuradio_DIR: /home/matthias/downloads/sdr/installed/lib/cmake/gnuradio
make make install
Build OsmocomSDR GnuRadio block
git clone git://git.osmocom.org/gr-osmosdr cd gr-osmosdr mkdir build cd build/ ccmake ../
Edit CMAKE_INSTALL_PREFIX: /home/matthias/downloads/sdr/installed
make make install
Building gqrx
git clone https://github.com/csete/gqrx mkdir build cd build PKG_CONFIG_PATH=/home/matthias/downloads/sdr/installed/lib/pkgconfig/ qmake-qt4 PREFIX=/home/matthias/downloads/sdr/installed ../ LD_LIBRARY_PATH=/home/matthias/downloads/sdr/installed/lib make make install
Finally
Ok, we are done compiling. If you examined the commands, then you propably guessed how to run the programs. However it is painfull to enter these long commands each time when you start the programs, so we create some nice scripts to ease the pain.