User Tools

Site Tools


oot_modules

**This is an old revision of the document!**

GNURadio OOT modules

GNURadio “Out Of Tree” (OOT) modules are custom gnuradio components (C/C++ or python blocks, associated gnuradio-companion block metadata) which are not part of the “default” installation of GNURadio. They can also rely on specific libraries.

Most of the time you don't want to install these blocks, metadata, libraries, etc. in “system” locations, for various reasons:

  • You don't want to take the risk of messing with the GNURadio core installation
  • You want to be able to remove an OOT module easily
  • Your OOT module is a prototype or is work in progress, or you want to be able to have several versions of an OOT module to test different things, so you want your OOT modules to be cleanly separated from GNURadio and from each other, and you want to be able to remove them easily (ideally, just by removing one directory)
  • You don't have root privileges

This can be done by installing an OOT module in its own directory, a directory where you have write access as a user.

But then you need to tell several components where to find your OOT blocks.

Component which you need to tell about the location of your OOT module Environnement variable to set to tell that component
The operating system dynamic linker, for C/C++ GNURadio stuff, or even for libraries written in any language, and that your OOT module might use $LD_LIBRARY_PATH
Python $PYTHONPATH
The operating system loader $PATH
The OS man pages, in case your OOT module or a lib it relies on provides some documentation in man format $MANPATH
The PkgConfig infrastructure, in case you later need a build system using PkgConfig to be able to find your OOT module (to build something which relies on your OOT module) $PKG_CONFIG_PATH
CMake, in case you later need CMAKE to be able to find your OOT module (to build something which relies on your OOT module) $CMAKE_MODULE_PATH
GNURadio Companion, so that it finds your blocks $GRC_BLOCKS_PATH

Here is a simple script which does all that. You just need to set the correct path of where you want to install your OOT module, then source this script (by typing source <name-of-script>) or include it directly in ~/.bash_profile, or ~/.profile or ~/.bashrc:

OOT_MODULE_INSTALL_PREFIX=<path of OOT module installation>

export PYTHONPATH="$OOT_MODULE_INSTALL_PREFIX/lib/python2.7/dist-packages${PYTHONPATH:+:${PYTHONPATH}}"
export LD_LIBRARY_PATH="$OOT_MODULE_INSTALL_PREFIX/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
export PATH="$OOT_MODULE_INSTALL_PREFIX/bin${PATH:+:${PATH}}"
export MANPATH="$OOT_MODULE_INSTALL_PREFIX/share/man${MANPATH:+:${MANPATH}}"
export PKG_CONFIG_PATH="$OOT_MODULE_INSTALL_PREFIX/lib/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
export CMAKE_MODULE_PATH="$OOT_MODULE_INSTALL_PREFIX/lib/cmake${CMAKE_MODULE_PATH:+:${CMAKE_MODULE_PATH}}"
export GRC_BLOCKS_PATH="$OOT_MODULE_INSTALL_PREFIX/share/gnuradio/grc/blocks${GRC_BLOCKS_PATH:+:${GRC_BLOCKS_PATH}}"
oot_modules.1568366491.txt.gz · Last modified: 2019/09/13 11:21 by mimbert

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki