This page provides some information about the OpenEmbedded project itself. For details on how GNU Radio uses OpenEmbedded, see our Embedded page.
OpenEmbedded (OE), http://openembedded.org, can be a useful tool for building and developing GNU Radio for embedded targets. OE is a collection of metadata, called recipes, describing build processes. The recipes are parsed and acted upon using a tool called bitbake.
Several embedded distros support collections of specific revisions of OE that are known to work together. In this guide we will set up a distroless environment for building and deploying images with GNU Radio.
The primary source for OE information on layers is http://layers.openembedded.org. First, enter a directory where you want oe work to reside, something like ~/code/oe is good. Now grab bitbake and a few useful OE layers.
git clone git://git.openembedded.org/bitbake git clone git://git.openembedded.org/meta-openembedded git clone git://git.openembedded.org/openembedded-core
There is currently in development a SDR-specific layer that will collect up various recipes for applications as well as GNURadio, and some starter image recipes. Some information is available on Meta-SDR
Building with OE
The bitbake tool requires many environment variables to function properly. To get started you need to source oe-init-build-env, located in openembedded-core. The two arguments you give are the desired location of your build directory and the location of your bitbake directory.
source openembedded-core/oe-init-build-env build bitbake
### Shell environment set up for builds. ### You can now run 'bitbake ' Common targets are: core-image-minimal core-image-sato meta-toolchain meta-toolchain-sdk adt-installer meta-ide-support You can also run generated qemu images with a command like 'runqemu qemux86'
You should now be inside of the build directory you specified. Modify the conf/local.conf file. The things to change are the MACHINE variable, and the parallelism options to match your processor.
Now modify the conf/bblayers.conf directory. In here the variable that defines where bitbake should look for layers is defined, add all of the layers you cloned earlier. An example is here. Make sure there is a \ character before linebreaks in a variable definition.
BBLAYERS ?= " \ /home/nathan/oe/oe-core/meta \ /home/nathan/oe/meta-openembedded/meta-oe \ /home/nathan/oe/meta-xilinx \ "
You are now set to build any recipe for your target. Just use the bitbake <recipe> command. A good first target is bitbake core-image-minimal, which resides in the openembedded-core layer.
Grabbing an SDK from OE
Running the self-extracting shell archive in tmp/deploy/sdk will generate the sdk you can use to compile GNU radio.
Enter target directory for SDK (default: /usr/local/oecore-x86_64): /opt/oecore-x86_64 You are about to install the SDK to "/opt/oecore-x86_64". Proceed[Y/n]? [sudo] password for nathan: Extracting SDK...
Using the SDK
Source the environment variable file wherever you extracted the SDK to. In the example that would be /opt/oecore-x86_64/environment-setup-armv7a-vfp-neon-oe-linux-gnueabi