Cross compile an OOT and install on target: Difference between revisions
Jump to navigation
Jump to search
Devnulling (talk | contribs) (Remove duplicate header) |
Devnulling (talk | contribs) (Fix formatting - html entities) |
||
(One intermediate revision by the same user not shown) | |||
Line 9: | Line 9: | ||
$ make | $ make | ||
$ sudo make install DESTDIR=~/mydevice</pre> | $ sudo make install DESTDIR=~/mydevice</pre> | ||
Note that we use the default install path of /usr/local here. So you will need to edit /etc/ld.so.conf to include /usr/local/lib and run ldconfig. This only needs doing once. This needs to be done on the device, not the build machine. | |||
Note that we use the default install path of <code>/usr/local</code> here. So you will need to edit <code>/etc/ld.so.conf</code> to include <code>/usr/local/lib</code> and run <code>ldconfig</code>. This only needs doing once. This needs to be done on the device, not the build machine. | |||
<pre>$ touch /etc/ld.so.conf | <pre>$ touch /etc/ld.so.conf | ||
$ echo /usr/local/lib | $ echo /usr/local/lib >> /etc/ld.so.conf | ||
$ ldconfig</pre> | $ ldconfig</pre> | ||
You will also need to set the PYTHONPATH. | |||
You will also need to set the <code>PYTHONPATH</code>. | |||
<pre>$ export PYTHONPATH=/usr/local/lib/python2.7/site-packages/</pre> | <pre>$ export PYTHONPATH=/usr/local/lib/python2.7/site-packages/</pre> | ||
If you want to install in /usr, you can use the CMAKE_INSTALL_PREFIX variable to do that. | |||
If you want to install in <code>/usr</code>, you can use the <code>CMAKE_INSTALL_PREFIX</code> variable to do that. |
Latest revision as of 01:03, 21 March 2017
Even if you already have GNURadio installed on the target and sdk, read Cross compile GNU Radio and install on target to get an understanding of the overall process.
To build an OOT module, use the basic procedure for building GNURadio
$ mkdir build-arm $ cd build-arm $ cmake -Wno-dev -DCMAKE_TOOLCHAIN_FILE=../../gnuradio/cmake/Toolchains/oe-sdk_cross.cmake \ -DENABLE_DOXYGEN=OFF ../ $ make $ sudo make install DESTDIR=~/mydevice
Note that we use the default install path of /usr/local
here. So you will need to edit /etc/ld.so.conf
to include /usr/local/lib
and run ldconfig
. This only needs doing once. This needs to be done on the device, not the build machine.
$ touch /etc/ld.so.conf $ echo /usr/local/lib >> /etc/ld.so.conf $ ldconfig
You will also need to set the PYTHONPATH
.
$ export PYTHONPATH=/usr/local/lib/python2.7/site-packages/
If you want to install in /usr
, you can use the CMAKE_INSTALL_PREFIX
variable to do that.