« Previous -
Version 17/128
(diff) -
Next » -
Current version
Michael Dickens, 03/24/2007 02:47 pm
For Ubuntu 6.06 LTS and 6.10 you should ''NOT'' need to compile many dependencies from source (except possibly SWIG, but it's quite simple - see below). ''EVERYTHING'' (except possibly SWIG) is available as a package. The install should be trivial if you use synaptic to select and install the packages.
Some packages you will need to install if not already installed:
- Development Tools (need for compilation) * g++ * subversion * make * autoconf, automake, libtool * sdcc (from "universe" - NOTE: This version is currently "1.3.28-1.1ubuntu1"; GNU Radio ''requires'' 1.3.31 or newer)
- Libraries (need for runtime and for compilation) * python-dev * FFTW 3.X (fftw3, fftw3-dev) * cppunit (libcppunit and libcppunit-dev) * Boost (libboost and libboost-dev) * libusb and libusb-dev * wxWidgets (wx-common) and wxPython (python-wxgtk2.6) (Note that these are in "universe" so you need to enable that repository) * python-numeric * ALSA (alsa-base, libasound2 and libasound2-dev)
- Other useful packages * usbview (from "universe") * octave (from "universe")
- SWIG
* Download swig at least version 1.3.31 and follow the standard
{{{
$ ./configure
$ make
$ sudo make install
}}}
process to install SWIG.
You can install these packages by using synaptic. Use the latest versions of all packages you install unless otherwise noted.
Ubuntu uses udev for handling hotplug devices, so follow these [wiki:UdevConfig directions] (or those provided below) to configure non-root access to the USRP.
Linking ErrorsIf you experience linking errors or problems running test programs, try {{{
$ cp /etc/ld.so.conf /tmp/ld.so.conf
$ echo /usr/local/lib >> /tmp/ld.so.conf
$ sudo mv /tmp/ld.so.conf /etc/ld.so.conf
$ sudo ldconfig
}}} Install Scripts
The following are scripts to take most users through a GNU Radio install on a typical Ubuntu install, with the hope that it provides enough guidance such that you can get GNU Radio up and running on your Ubuntu box. These were tested on Ubunutu 6.10.
Manually uncomment all repositories to include "universe" and "multiverse" via
{{{
sudo <EDITOR> /etc/apt/sources.list
}}}
The uncommented lines of the file "/etc/apt/sources.list" should read something like:
{{{
deb http://us.archive.ubuntu.com/ubuntu/ edgy main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ edgy-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ edgy-security main restricted universe multiverse
}}}
Update the local dpkg cache:
{{{
sudo apt-get update
}}}
Install required packages
{{{
sudo apt-get -y install g++ pkg-config automake1.9 libtool python-dev fftw3-dev libcppunit-dev libboost-dev sdcc libusb-dev libasound2-dev python-wxgtk2.6 subversion
}}}
Install optional packages, if desired; some might already be installed from the previous command:
{{{
sudo apt-get -y install gkrellm wx-common libwxgtk2.6-dev python-numeric-ext python-numarray-ext alsa-base autoconf xorg-dev libsdl1.2-dev g77 gawk bison openssh-server emacs cvs usbview octave
}}}
Get, Compile, Install SWIG
{{{
wget http://superb-east.dl.sourceforge.net/sourceforge/swig/swig-1.3.31.tar.gz
tar zxf swig-1.3.31.tar.gz
cd swig-1.3.31
./configure
make
sudo make install
cd ..
}}}
Install gnuradio
{{{
svn co http://gnuradio.org/svn/gnuradio/trunk gnuradio
cd gnuradio
./bootstrap
./configure
make
sudo make install
cd ..
}}}
Setup groups to handle USRP via USB, either live or hot-plug
{{{
sudo addgroup usrp
sudo addgroup <YOUR USERNAME> usrp
echo 'ACTION=="add", BUS=="usb", SYSFS{idVendor}=="fffe", SYSFS{idProduct}=="0002", GROUP:="usrp", MODE:="0660"' > tmpfile
sudo chown root.root tmpfile
sudo mv tmpfile /etc/udev/rules.d/10-usrp.rules
}}}
At this point, Ubuntu is configured to know what to do if/when it detects the USRP on the USB, except that "udev" needs to reload the rules to install the newly created one. The following ''might'' work, but if it doesn't the rebooting the computer will.
{{{
sudo /etc/init.d/udev stop
sudo /etc/init.d/udev start
}}}
You can check if the USRP is being recognized, by examining /dev/bus/usb after plugging in a USRP. Using the command:
{{{
$ ls -lR /dev/bus/usb | grep usrp
}}}
might result in a single line reading something like:
{{{
crw-rw---- 1 root usrp 189, 514 Mar 24 09:46 003
}}}
The device file will be with group 'usrp' and mode 'crw-rw----'.
Once you've verified that the USRP is availbale to Ubuntu, now it is time to verify that GNU Radio works with the USRP (if installed; if not, skip this). While "benchmark_usb" might not return a full 32 MB/s of throughput, the script should at least run properly; if not, either GNU Radio didn't make correctly or the USRP isn't accessible. From the "gnuradio" directory:
{{{
make check
cd gnuradio-examples/python/usrp
./benchmark_usb.py
}}}
Update the rest of the system, after which you might need to reboot:
{{{
sudo apt-get -y upgrade
}}}
Update the Linux distro, after which a reboot is required:
{{{
sudo apt-get -y dist-upgrade
}}}