UHD and GNURadio installation from sources with PyBombs » History » Version 11
ROQUE, Damien, 01/21/2015 01:51 PM
1 | 1 | ROQUE, Damien | h1. UHD and GNURadio installation |
---|---|---|---|
2 | 1 | ROQUE, Damien | |
3 | 3 | ROQUE, Damien | The UHD(Universal Hardware Driver) driver deploy a USRP(Universal Software Radio Peripheral) device. The development environment GNURadio is also recommended in order to provide several signal processing building blocks operating in a pseudo-real-time fashion. |
4 | 1 | ROQUE, Damien | |
5 | 4 | ROQUE, Damien | This documentation explains how to install both "UHD":http://code.ettus.com/redmine/ettus/projects/uhd/wiki and "GNURadio":http://gnuradio.org from the sources with the help of the "PyBombs":http://gnuradio.org/redmine/projects/pybombs/wiki script. The following prerequisites are assumed in the following: |
6 | 4 | ROQUE, Damien | * a GNU/Linux operating system ; |
7 | 4 | ROQUE, Damien | * a user account with administror rights (through sudo) ; |
8 | 4 | ROQUE, Damien | * an Internet connection (if necessary, set @http_proxy@ and @https_proxy@ environment variables appropriately). |
9 | 2 | ROQUE, Damien | |
10 | 3 | ROQUE, Damien | h2. Downloading and configuring PyBombs |
11 | 3 | ROQUE, Damien | |
12 | 3 | ROQUE, Damien | 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): |
13 | 1 | ROQUE, Damien | <pre> |
14 | 2 | ROQUE, Damien | git clone https://github.com/pybombs/pybombs.git |
15 | 2 | ROQUE, Damien | </pre> |
16 | 2 | ROQUE, Damien | |
17 | 3 | ROQUE, Damien | Run first the configuration of PyBombs as unprivileged user. |
18 | 2 | ROQUE, Damien | <pre> |
19 | 2 | ROQUE, Damien | cd pybombs && ./pybombs config |
20 | 2 | ROQUE, Damien | </pre> |
21 | 2 | ROQUE, Damien | |
22 | 3 | ROQUE, Damien | 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). |
23 | 2 | ROQUE, Damien | <pre> |
24 | 2 | ROQUE, Damien | Username for GIT access |
25 | 2 | ROQUE, Damien | gituser [damien]: |
26 | 2 | ROQUE, Damien | Install Prefix |
27 | 2 | ROQUE, Damien | prefix [/home/damien/target]:/usr/local |
28 | 2 | ROQUE, Damien | Order in which to attempt installations when available, options are: src, rpm, deb |
29 | 2 | ROQUE, Damien | satisfy_order [deb,src]: |
30 | 2 | ROQUE, Damien | Comma separated list of package names to assume are already installed |
31 | 2 | ROQUE, Damien | forcepkgs []: |
32 | 2 | ROQUE, Damien | Comma separated list of package names to always build from source |
33 | 2 | ROQUE, Damien | forcebuild [gnuradio,uhd,gr-air-modes,gr-osmosdr,gr-iqbal,gr-fcdproplus,uhd,rtl-sdr,osmo-sdr,hackrf,gqrx,bladerf,airspy]: |
34 | 2 | ROQUE, Damien | Time the monitor thread waits (in seconds) before retrying downloads |
35 | 2 | ROQUE, Damien | timeout [30]: |
36 | 2 | ROQUE, Damien | CMAKE_BUILD_TYPE args to pass to cmake projects, options are: Debug, Release, RelWithDebInfo, MinSizeRel |
37 | 2 | ROQUE, Damien | cmakebuildtype [RelWithDebInfo]: |
38 | 2 | ROQUE, Damien | Build doxygen while compiling packages? options are: ON, OFF |
39 | 2 | ROQUE, Damien | builddocs [OFF]: |
40 | 2 | ROQUE, Damien | C Compiler Executable [gcc, clang, icc, etc] |
41 | 2 | ROQUE, Damien | cc [gcc]: |
42 | 2 | ROQUE, Damien | C++ Compiler Executable [g++, clang++, icpc, etc] |
43 | 2 | ROQUE, Damien | cxx [g++]: |
44 | 2 | ROQUE, Damien | Concurrent make threads [1,2,4,8...] |
45 | 2 | ROQUE, Damien | makewidth [4]: |
46 | 2 | ROQUE, Damien | done |
47 | 2 | ROQUE, Damien | Settled on prefix: /usr/local |
48 | 1 | ROQUE, Damien | |
49 | 2 | ROQUE, Damien | [Errno 13] Permission denied: '/usr/local/lib64' |
50 | 2 | ROQUE, Damien | Error! Configured install prefix requires root privileges. Please re-run as sudo |
51 | 2 | ROQUE, Damien | </pre> |
52 | 2 | ROQUE, Damien | |
53 | 3 | ROQUE, Damien | Rerun the configuration with @sudo@ and the intruction should end gracefully. |
54 | 2 | ROQUE, Damien | <pre> |
55 | 2 | ROQUE, Damien | sudo ./pybombs config |
56 | 2 | ROQUE, Damien | </pre> |
57 | 2 | ROQUE, Damien | |
58 | 3 | ROQUE, Damien | Optionally, it is possible to define a maximum number a concurrent workers (it will be used by @make@). |
59 | 2 | ROQUE, Damien | <pre> |
60 | 1 | ROQUE, Damien | sudo ./pybombs config makewidth 2 |
61 | 1 | ROQUE, Damien | </pre> |
62 | 2 | ROQUE, Damien | |
63 | 2 | ROQUE, Damien | h2. Installing UHD and GNURadio from the sources |
64 | 1 | ROQUE, Damien | |
65 | 3 | ROQUE, Damien | Run the installation of UHD and GNURadio with the following instruction (it might take one to several hours). |
66 | 8 | ROQUE, Damien | |
67 | 8 | ROQUE, Damien | warning. If you are using a proxy, you should configure sudo in order to "preserve environment variables":http://stackoverflow.com/questions/8633461/how-to-keep-environment-variables-when-using-sudo |
68 | 8 | ROQUE, Damien | |
69 | 2 | ROQUE, Damien | <pre> |
70 | 3 | ROQUE, Damien | sudo ./pybombs install uhd gnuradio |
71 | 2 | ROQUE, Damien | </pre> |
72 | 5 | ROQUE, Damien | |
73 | 5 | ROQUE, Damien | The duration of the installation depends mainly of the following parameters: |
74 | 5 | ROQUE, Damien | * throughput of the Internet connection ; |
75 | 5 | ROQUE, Damien | * frequency and number of CPU cores ; |
76 | 5 | ROQUE, Damien | * number of prerequisite packages installed on your system. |
77 | 6 | ROQUE, Damien | |
78 | 10 | ROQUE, Damien | At the end of a successful installation, update the library links. |
79 | 10 | ROQUE, Damien | <pre> |
80 | 10 | ROQUE, Damien | sudo ldconfig |
81 | 10 | ROQUE, Damien | </pre> |
82 | 10 | ROQUE, Damien | |
83 | 11 | ROQUE, Damien | h2. Updating packages installed using PyBombs |
84 | 11 | ROQUE, Damien | |
85 | 11 | ROQUE, Damien | Several packages installed thanks to PyBombs are under active development (e.g. UHD and GNURadio). In order to update the whole installation, run the following instruction. |
86 | 11 | ROQUE, Damien | |
87 | 11 | ROQUE, Damien | <pre> |
88 | 11 | ROQUE, Damien | sudo ./pybombs update |
89 | 11 | ROQUE, Damien | </pre> |
90 | 11 | ROQUE, Damien | |
91 | 11 | ROQUE, Damien | If only specific packages should be updated, they can be explicitly mentionned. |
92 | 11 | ROQUE, Damien | <pre> |
93 | 11 | ROQUE, Damien | sudo ./pybombs update uhd gnuradio |
94 | 11 | ROQUE, Damien | </pre> |
95 | 11 | ROQUE, Damien | |
96 | 11 | ROQUE, Damien | At the end of the installation, do not forget to update the library links. |
97 | 11 | ROQUE, Damien | <pre> |
98 | 11 | ROQUE, Damien | sudo ldconfig |
99 | 11 | ROQUE, Damien | </pre> |
100 | 11 | ROQUE, Damien | |
101 | 7 | ROQUE, Damien | h2. UHD configuration |
102 | 1 | ROQUE, Damien | |
103 | 7 | ROQUE, Damien | h3. Update the firmware database |
104 | 7 | ROQUE, Damien | |
105 | 7 | ROQUE, Damien | In order to make sure that the firmwares are up-to-date, you can run the following instruction. |
106 | 7 | ROQUE, Damien | <pre> |
107 | 7 | ROQUE, Damien | sudo "/usr/local/lib/uhd/utils/uhd_images_downloader.py" |
108 | 7 | ROQUE, Damien | </pre> |
109 | 7 | ROQUE, Damien | |
110 | 7 | ROQUE, Damien | h3. Setting up real-time scheduling |
111 | 7 | ROQUE, Damien | |
112 | 7 | ROQUE, Damien | Since the UHD needs a high priority of execution, it is recommended to add the following line to @/etc/security/limits.conf@. |
113 | 6 | ROQUE, Damien | <pre> |
114 | 6 | ROQUE, Damien | @usrp - rtprio 99 |
115 | 6 | ROQUE, Damien | </pre> |
116 | 6 | ROQUE, Damien | |
117 | 6 | ROQUE, Damien | Hence, it necessary to create the group @usrp@ and add to this group any user willing to use the USRP hardware. |
118 | 6 | ROQUE, Damien | <pre> |
119 | 9 | ROQUE, Damien | sudo groupadd usrp |
120 | 9 | ROQUE, Damien | sudo adduser <my-login> usrp |
121 | 1 | ROQUE, Damien | </pre> |
122 | 9 | ROQUE, Damien | |
123 | 9 | ROQUE, Damien | The system is now ready for adding an USRP (see documentation for the appropriate model...). |