UHD and GNURadio installation from sources with PyBombs » History » Version 8

« Previous - Version 8/15 (diff) - Next » - Current version
ROQUE, Damien, 01/06/2015 04:12 PM


UHD and GNURadio installation

The UHD driver deploy a USRP device. The development environment GNURadio is also recommended in order to provide several signal processing building blocks operating in a pseudo-real-time fashion.

This documentation explains how to install both UHD and GNURadio from the sources with the help of the PyBombs script. The following prerequisites are assumed in the following:
  • a GNU/Linux operating system ;
  • a user account with administror rights (through sudo) ;
  • an Internet connection (if necessary, set http_proxy and https_proxy environment variables appropriately).

Downloading and configuring PyBombs

PyBombs is an unified installation system for GNURadio and its "out-of-tree" modules (including hardware drivers). We first download it through Git with an unprivileged user (but with sudo permissions):

git clone https://github.com/pybombs/pybombs.git

Run first the configuration of PyBombs as unprivileged user.

cd pybombs && ./pybombs config

The output should be something like this. Notice that since we chose /usr/local as installation prefix, the configuration fails at the end of the process (it is normal).

Username for GIT access
gituser [damien]:
Install Prefix
prefix [/home/damien/target]:/usr/local
Order in which to attempt installations when available, options are: src, rpm, deb
satisfy_order [deb,src]:
Comma separated list of package names to assume are already installed
forcepkgs []:
Comma separated list of package names to always build from source
forcebuild [gnuradio,uhd,gr-air-modes,gr-osmosdr,gr-iqbal,gr-fcdproplus,uhd,rtl-sdr,osmo-sdr,hackrf,gqrx,bladerf,airspy]:
Time the monitor thread waits (in seconds) before retrying downloads
timeout [30]:
CMAKE_BUILD_TYPE args to pass to cmake projects, options are: Debug, Release, RelWithDebInfo, MinSizeRel
cmakebuildtype [RelWithDebInfo]:
Build doxygen while compiling packages? options are: ON, OFF
builddocs [OFF]:
C Compiler Executable [gcc, clang, icc, etc]
cc [gcc]:
C++ Compiler Executable [g++, clang++, icpc, etc]
cxx [g++]:
Concurrent make threads [1,2,4,8...]
makewidth [4]:
done
Settled on prefix: /usr/local

[Errno 13] Permission denied: '/usr/local/lib64'
Error! Configured install prefix requires root privileges. Please re-run as sudo

Rerun the configuration with sudo and the intruction should end gracefully.

sudo ./pybombs config

Optionally, it is possible to define a maximum number a concurrent workers (it will be used by make).

sudo ./pybombs config makewidth 2

Installing UHD and GNURadio from the sources

Run the installation of UHD and GNURadio with the following instruction (it might take one to several hours).

warning. If you are using a proxy, you should configure sudo in order to preserve environment variables

sudo ./pybombs install uhd gnuradio
The duration of the installation depends mainly of the following parameters:
  • throughput of the Internet connection ;
  • frequency and number of CPU cores ;
  • number of prerequisite packages installed on your system.

UHD configuration

Update the firmware database

In order to make sure that the firmwares are up-to-date, you can run the following instruction.

sudo "/usr/local/lib/uhd/utils/uhd_images_downloader.py" 

Setting up real-time scheduling

Since the UHD needs a high priority of execution, it is recommended to add the following line to /etc/security/limits.conf.

@usrp            -       rtprio          99

Hence, it necessary to create the group usrp and add to this group any user willing to use the USRP hardware.

groupadd usrp
adduser <my-login> usrp