Difference between revisions of "GNURadio: Ubuntu Install"

From OnnoWiki
Jump to navigation Jump to search
Line 36: Line 36:
 
  libqwt5-qt4-dev libqwtplot3d-qt4-dev pyqt4-dev-tools \
 
  libqwt5-qt4-dev libqwtplot3d-qt4-dev pyqt4-dev-tools \
 
  libpcre3 libpcre3-dbg libpcre3-dev libpcrecpp0
 
  libpcre3 libpcre3-dbg libpcre3-dev libpcrecpp0
 
 
 
apt-get -y install gkrellm wx-common libwxgtk2.8-dev alsa-base autoconf xorg-dev gawk bison \
 
openssh-server emacs cvs octave3.2
 
 
apt-get -y install g77 usbview
 
 
apt-get install swig libqwt-dev
 
 
apt-get install libboost-dev
 
  
 
Jika ingin menginstall WxWidget yang lebih baru kita bisa melakukan
 
Jika ingin menginstall WxWidget yang lebih baru kita bisa melakukan
Line 71: Line 60:
 
     sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n libwxgtk2.8-dev libgtk2.0-dev
 
     sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n libwxgtk2.8-dev libgtk2.0-dev
  
 
+
Install secara manual SWIG
Install SWIG
 
  
 
  Download dari http://sourceforge.net/projects/swig/files/swig/
 
  Download dari http://sourceforge.net/projects/swig/files/swig/
Line 83: Line 71:
 
  make install
 
  make install
  
Install QWT
+
Install secara manul QWT
  
 
  Download dari http://sourceforge.net/projects/qwt/files/
 
  Download dari http://sourceforge.net/projects/qwt/files/
Line 105: Line 93:
 
  make install
 
  make install
  
 
Make check untuk melihat apakah gnuradio berfungsi secara benar. Hal ini dapat dilakukan tanpa USRP.
 
 
 
git clone http://gnuradio.org/git/gnuradio.git
 
 
cd gnuradio
 
export LD_LIBRARY_PATH=$BOOST_PREFIX/lib    # As per the instructions for installing Boost
 
 
./bootstrap
 
./configure --with-boost=$BOOST_PREFIX  # As per the instructions for installing Boost
 
make
 
 
Optionally: Run the GNU Radio software self-check; does not require a USRP.
 
 
make check
 
 
 
If any test or tests do not work, GNU Radio might still function properly, but it might be wise to look in the email archives for a fix or to write the email list. If writing to the email list, please include the OS type, OS version, and CPU type (e.g. via "uname -a"), anything special about the computer hardware, software versions (gcc, g++, swig, sdcc, etc) and how installed (standard or non-standard package, source). Now install GNU Radio for general use (default is in to /usr/local ):
 
 
sudo make install
 
  
 
Ubuntu uses udev for handling hotplug devices, and does not by default provide non-root access to the USRP. The following script is taken from directions, and sets up groups to handle USRP via USB, either live or hot-plug
 
Ubuntu uses udev for handling hotplug devices, and does not by default provide non-root access to the USRP. The following script is taken from directions, and sets up groups to handle USRP via USB, either live or hot-plug
Line 135: Line 102:
 
  sudo mv tmpfile /etc/udev/rules.d/10-usrp.rules
 
  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 include the newly created one. The following might work, but if it doesn't then rebooting the computer will.
+
Pada titik ini, Ubuntu telah di konfigurasi untuk tahu apa yang harus di kerjakan jika medeteksi USRP di USB tapi "udev" perlu me-reload rules untuk memasukan rules yang baru kita buat. Langkah berikut dapat dilakukan sehingga kita tidak perlu me-reboot komputer.
  
 
  sudo udevadm control --reload-rules
 
  sudo udevadm control --reload-rules
  
 
+
atau
or
 
  
 
  sudo /etc/init.d/udev stop
 
  sudo /etc/init.d/udev stop
 
  sudo /etc/init.d/udev start
 
  sudo /etc/init.d/udev start
  
 +
atau
  
or
+
sudo killall -HUP udevd
  
sudo killall -HUP udevd
 
  
 
You can check if the USRP is being recognized, by examining /dev/bus/usb after plugging in a USRP. Using the command:
 
You can check if the USRP is being recognized, by examining /dev/bus/usb after plugging in a USRP. Using the command:

Revision as of 05:50, 9 December 2010

Sumber: http://gnuradio.org/redmine/wiki/gnuradio/UbuntuInstall

Development Tool yang dibutuhkan:

  • g++
  • subversion
  • make
  • autoconf, automake, libtool
  • sdcc
  • guile
  • ccache

Library yang dibutuhkan untuk runtime dan proses compile

  • python-dev
  • FFTW 3.X (fftw3, fftw3-dev)
  • cppunit (libcppunit and libcppunit-dev)
  • Boost 1.35 (or later)
  • libusb and libusb-dev
  • wxWidgets (wx-common) and wxPython (python-wxgtk2.8)
  • python-numpy (via python-numpy-ext) (for SVN on or after 2007-May-28)
  • ALSA (alsa-base, libasound2 and libasound2-dev)
  • Qt (libqt3-mt-dev for versions earlier than 8.04; version 4 works for 8.04 and later)
  • SDL (libsdl-dev)
  • GSL GNU Scientific Library (libgsl0-dev >= 1.10 required for SVN trunk, not in binary repositories for 7.10 and earlier)

Update

sudo apt-get update

Instal untuk Maverick (10.10)

sudo apt-get -y install libfontconfig1-dev libxrender-dev libpulse-dev swig g++ automake libtool python-dev libfftw3-dev \
libcppunit-dev libboost-all-dev libusb-dev fort77 sdcc sdcc-libraries \
libsdl1.2-dev python-wxgtk2.8 subversion git-core guile-1.8-dev \
libqt4-dev python-numpy ccache python-opengl libgsl0-dev \
python-cheetah python-lxml doxygen qt4-dev-tools \
libqwt5-qt4-dev libqwtplot3d-qt4-dev pyqt4-dev-tools \
libpcre3 libpcre3-dbg libpcre3-dev libpcrecpp0

Jika ingin menginstall WxWidget yang lebih baru kita bisa melakukan

Edit /etc/apt/sources.list

   # wxWidgets/wxPython repository at apt.wxwidgets.org
   deb http://apt.wxwidgets.org/ DIST-wx main
   deb-src http://apt.wxwidgets.org/ DIST-wx main  

Contoh untuk gutsy

   # wxWidgets/wxPython repository at apt.wxwidgets.org
   deb http://apt.wxwidgets.org/ gutsy-wx main
   deb-src http://apt.wxwidgets.org/ gutsy-wx main  

Jalankan

   sudo apt-get update  

Install

   sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n
   sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n libwxgtk2.8-dev libgtk2.0-dev

Install secara manual SWIG

Download dari http://sourceforge.net/projects/swig/files/swig/
cp swig-2.0.1.tar.gz /usr/local/src/
cd /usr/local/src/
tar zxvf swig-2.0.1.tar.gz 
cd /usr/local/src/swig-2.0.1/
./configure
make
make install

Install secara manul QWT

Download dari http://sourceforge.net/projects/qwt/files/
cp qwt-5.2.1.tar.bz2 /usr/local/src/
cd /usr/local/src/
tar jxvf qwt-5.2.1.tar.bz2 
cd /usr/local/src/qwt-5.2.1/
qmake
make
make install

Install GNURadio

cp gnuradio-3.3.0.tar.gz /usr/local/src/
cd /usr/local/src/
tar zxvf gnuradio-3.3.0.tar.gz 
cd /usr/local/src/gnuradio-3.3.0/
./configure
make
make check
make install


Ubuntu uses udev for handling hotplug devices, and does not by default provide non-root access to the USRP. The following script is taken from directions, and sets up groups to handle USRP via USB, either live or hot-plug

sudo addgroup usrp
sudo usermod -G usrp -a <YOUR_USERNAME>
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

Pada titik ini, Ubuntu telah di konfigurasi untuk tahu apa yang harus di kerjakan jika medeteksi USRP di USB tapi "udev" perlu me-reload rules untuk memasukan rules yang baru kita buat. Langkah berikut dapat dilakukan sehingga kita tidak perlu me-reboot komputer.

sudo udevadm control --reload-rules

atau

sudo /etc/init.d/udev stop
sudo /etc/init.d/udev start

atau

sudo killall -HUP udevd


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


should result in one or more lines (one for each USRP) reading something like:

crw-rw---- 1 root usrp 189, 514 Mar 24 09:46 003


Each device file will be listed with group 'usrp' and mode 'crw-rw----'.

   * NOTE: If installing on Feisty or newer, the computer probably needs to be rebooted in order for the GNU Radio software to interface correctly with the USRP hardware. This does not seem to be necessary on Edgy.

Once you've verified that the USRP is available to Ubuntu, now it is time to verify that GNU Radio works with the USRP (if installed; if not, skip this). While "usrp_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, verify that all of the following work:

  • Python interface to the USRP; provides a rough estimate of the maximum throughput (quantized to a power of 2) between the host computer and the USRP.
cd gnuradio-examples/python/usrp
./usrp_benchmark_usb.py
  • C++ interface to the USRP; provides a good estimate of the maximum throughput (non-quantized) between the host computer and the USRP.
cd usrp/host/apps
./test_usrp_standard_tx
./test_usrp_standard_rx

Update the rest of the system, after which you might need or want to reboot:

sudo apt-get -y upgrade

Update the Linux distro, after which a reboot is required:

sudo apt-get -y dist-upgrade

Broken libtool on Debian and Ubuntu¶

Because Debian and Ubuntu apply a poorly implemented "enhancement" to the upstream version of libtool, they break the ability to test code and libraries prior to installing them. We think that testing before installation is a good idea. To work around their damage, be sure to include $PREFIX/lib (and $PREFIX/lib64 on 64-bit machines) in /etc/ld.so.conf.

If you don't include $PREFIX/lib in /etc/ld.so.conf, you will see errors during the linking phase of the build. There are several places it shows up. The first one is often during the build of mblocks. It's not an mblock problem. It's a Debian/Ubuntu problem.

Do this to work around this "feature": 1) Make a copy from the current ld.so.conf file and save it in a temp folder:

cp /etc/ld.so.conf /tmp/ld.so.conf

2) Add /usr/local/lib path to it :

echo /usr/local/lib >> /tmp/ld.so.conf

3) If you installed Boost (version 1_37_0 for example) manually, then add its library path to the file:

echo /opt/boost_1_37_0/lib >> /tmp/ld.so.conf

4) Delete the original ld.so.conf file and put the modified file instead:

sudo mv /tmp/ld.so.conf /etc/ld.so.conf

5) Do ldconfig:

sudo ldconfig


Referensi