root/ossiedev/branches/mcarrick/user-guide-0.8.3/Installation.tex @ 11055

Revision 11055, 13.7 KB (checked in by mcarrick, 15 months ago)

adding more dependencies for ubuntu 11.10 liset

Line 
1% ------------------------------------------------------------------
2%
3%   TITLE: OSSIE 0.8.3 Installation Guide
4% AUTHORS: Mike Ekoniak, Matt Carrick, Drew Cormier, Christopher Covington,
5%          Carl B. Dietrich, Joseph Gaeddert, Benjamin Hilburn,
6%          C. Ian Phelps, Shereef Sayed, Jason Snyder, Haris Volos
7% CREATED:
8% REVISED:
9% 23Mar11 IB Minor typo fixes.
10%     URL: http://ossie.wireless.vt.edu/
11%
12% ------------------------------------------------------------------
13
14\newpage
15\section{Installation}
16\label{section:installation}
17For users that do not have access to a Linux system, or are unfamiliar with Linux, we recommend
18that you use our pre-built VMWare images.  These images have OSSIE pre-installed on them, and are
19ready to use out-of-the-box. Using an OSSIE VMware image is described in
20Section~\ref{section:installation:vmware}.
21
22Although we do not yet provide and support binary installation packages for more Linux
23distributions, compiling OSSIE from source on them should be possible.
24
25To install OSSIE from source, follow the below instructions to install the OSSIE dependencies,
26and then compile and install the source code.
27
28\subsection{Installing OSSIE from Source}
29\label{section:installation:source}
30
31This section assumes that the user is familiar with basic
32Linux commands such as {\tt cd} and {\tt ls} and has sudo
33access or root access.
34
35If you have an older version of OSSIE installed, then you will need to delete the contents of {\tt /sdr/}.
36\begin{lstlisting}[]
37 $ rm -rf /sdr/*
38\end{lstlisting}
39
40Ubuntu is the main supported operating system for OSSIE, and Ubuntu 11.04, 10.10 and 10.04 all
41have a different list of dependencies that must be installed. After following the instructions
42for your respective operating system, jump to
43Section~\ref{section:installation:source:dependencies:configomni} to continue the install.
44
45\subsubsection{Installing Dependencies on Ubuntu 11.10}
46\begin{lstlisting}[]
47 $ sudo apt-get -y install libtool automake g++ omniorb libomniorb4-dev omniidl \
48        libboost-all-dev libgnuradio-usrp-dev libgnuradio-usrp2-dev libpulse-dev \
49        libsndfile-dev python-omniorb omniidl-python
50\end{lstlisting}
51
52\subsubsection{Configure omniORB}
53\label{section:installation:source:dependencies:configomni}
54All of the dependencies have been installed and one of the dependencies,
55omniORB, needs to be configured. This configuration is done through the
56modification of a file, either {\tt /etc/omniORB.cfg} or
57{\tt /etc/omniORB4.cfg}, depending on the version of the omniORB dependency.
58
59Open the file as root, and search for the following line:
60\begin{lstlisting}[]
61 InitRef = NameService=corbaname::my.host.name
62\end{lstlisting}
63Uncomment the line by deleting the pound or hash character `\#' and change
64it to:
65\begin{lstlisting}[]
66 InitRef = NameService=corbaname::127.0.0.1
67\end{lstlisting}
68Before running the framework you will need to start the naming service. If you
69installed omniORB from source, you have to follow the instructions in
70Appendix~\ref{appendix:omninamessh}. When installing from yum
71{\tt omniNames} will automatically start when you restart your machine. Refer
72to Appendix~\ref{appendix:services} for instructions on how to start the
73omniNames service without restarting your machine or set whether the service
74starts automatically at boot.
75\footnote{You may also manually start a source-compiled tarball package of
76omniNames {\tt omniNames} with the script described in
77Appendix~\ref{appendix:omninamessh}}
78
79At this time it is a good idea to restart your machine.
80
81\subsubsection{Installing Portions of GNU Radio}
82\label{section:installation:source:dependencies:gnuradio}
83OSSIE uses a small subset of GNU Radio to communicate with and configure the USRP. The
84following steps will walk through installing portions of GNU Radio 3.4.2.
85
86Install GNURadio's dependencies:
87\begin{lstlisting}[]
88 $ sudo apt-get install -y swig sdcc libusb-dev libfftw3-dev \
89libcppunit-dev libbz2-dev guile-1.8-dev
90\end{lstlisting}
91
92To install GNURadio 3.4.2 from source:
93\begin{lstlisting}[]
94 $ wget http://gnuradio.org/redmine/attachments/download/279/gnuradio-3.4.2.tar.gz
95 $ tar -xvf gnuradio-3.4.2.tar.gz
96 $ cd gnuradio-3.4.2/
97 $ ./configure
98 $ make
99 $ sudo make install
100\end{lstlisting}
101
102At this point, GNU Radio and its dependencies have been installed. Now setup the
103proper permissions for the USRP. As root, create a group which will have access
104to the USRP:
105
106\begin{lstlisting}[]
107 $ sudo /usr/sbin/groupadd usrp
108\end{lstlisting}
109
110Add users to the group which need access to the USRP:
111
112\begin{lstlisting}[]
113 $ sudo /usr/sbin/usermod -G usrp -a USERNAME
114\end{lstlisting}
115
116Now that users will have access to the USRP, read and write access to the device
117must be created. As root, create the file {\tt /etc/udev/rules.d/10-usrp.rules} in
118a text editor:
119
120\begin{lstlisting}[]
121 $ sudo gedit /etc/udev/rules.d/10-usrp.rules
122\end{lstlisting}
123
124Add the following text to the file:
125
126\begin{lstlisting}[]
127 ACTION=="add", BUS=="usb", SYSFS{idVendor}=="fffe", \
128 SYSFS{idProduct}=="0002", GROUP:="usrp", MODE:="0660"
129\end{lstlisting}
130
131The text above is displayed on two lines due to the contraints on page size, however
132the text must appear on a single line, without the backslash, in the file for the
133access to the USRP to work properly. You may also add the following comment lines to
134the file for future reference:
135
136\begin{lstlisting}[]
137 # rule to grant read/write access on USRP to group named usrp.
138 # to use, install this file in /etc/udev/rules.d/ as
139 # 10-usrp.rules
140\end{lstlisting}
141
142The USRP interface has now been created. As an optional test, connect the USRP
143to the computer and run the following command:
144
145\begin{lstlisting}[]
146 $ ls -lR /dev/bus/usb
147\end{lstlisting}
148
149The users root and usrp should now be listed under the user groups.
150
151If you are using the USRP2, it is necessary to have a gigabit ethernet interface and
152intruct the kernel to allow raw socket access to the ethernet port:
153\begin{lstlisting}[]
154 $ sudo chmod u+s /usr/local/bin/usrp2_socket_opener
155\end{lstlisting}
156
157This step is necessary every time you reinstall GNU Radio.
158
159
160\subsubsection{Install OSSIE}
161\label{section:installation:source:ossiecf}
162You are now ready to build and install OSSIE. 
163Note that installing by hand requires some knowledge of OSSIE, Linux, and software development.
164
165Download the latest tarball from
166\href{http://ossie.wireless.vt.edu/download/tarballs/\ossieversion/}{http://ossie.wireless.vt.edu/download/tarballs/\ossieversion/}
167\\ and unpack {\tt ossie-\ossieversion.tar.gz}.
168\begin{lstlisting}[]
169 $ wget http://ossie.wireless.vt.edu/download/tarballs/0.8.3/ \
170   ossie-0.8.3.tar.gz
171 $ tar -xvf ossie-0.8.3.tar.gz
172\end{lstlisting}
173
174By default, the installation directory of the OSSIE platform is {\tt /sdr}. In order to install new
175source code and binaries into this directory without root permissions, you need to create and change
176the ownership of {\tt /sdr}.
177\begin{lstlisting}[]
178 $ sudo mkdir /sdr
179 $ sudo chown -R username.username /sdr
180\end{lstlisting}
181where {\tt username} is your user name.
182
183\subsubsection{Using Autoconf}
184\label{section:installation:source:ossiecf:autoconf}
185
186\begin{lstlisting}[]
187 $ cd ossie-0.8.3
188 $ ./configure --prefix=/sdr --libdir=/usr/local/lib/ \
189   --includedir=/usr/local/include/ --with-boost --with-boost-filesystem
190 $ make
191 $ sudo make install
192\end{lstlisting}
193
194If successful, the prompt should say:
195\begin{lstlisting}[]
196*********************************************************
197
198  Complete installation of OSSIE 0.8.3 finished!
199
200*********************************************************
201\end{lstlisting}
202
203If you prefer, or require, a different root directory, then change the '--prefix' flag to your appropriate absolute path.
204If you require the OSSIE libraries to be installed to a different location, then change the '--libdir' flag to your appropriate absolute path.
205For further 'configure' options, use {\tt configure --help}.
206
207If configure fails, use {\tt aptitude search <dependency name>} to find any missing packages.
208
209\subsubsection{Updating System Libraries}
210\label{section:installation:source:ossiecf:ldconfig}
211Once the OSSIE libraries are installed, they need to be linked.
212As root edit the file {\tt /etc/ld.so.conf}, adding the line
213\begin{lstlisting}[]
214 /usr/local/lib
215\end{lstlisting}
216Now run:
217\begin{lstlisting}[]
218 $ sudo /sbin/ldconfig
219\end{lstlisting}
220
221OSSIE should now be successfully installed on your system. You can skip to
222Section~\ref{section:runningwaveforms} to learn how to run waveforms.
223
224\subsection{Installation of OSSIE Eclipse Feature}
225\label{section:installation:alloefinstall}
226Installation of the OSSIE Eclipse Feature (OEF) requires the installation of OSSIE, Java, and Eclipse.
227
228\subsubsection{Installing Java}
229\label{section:installation:javainstall}
230Eclipse is written in Java, so you must have it installed to run Eclipse and OEF.
231We recommend using Sun's Java Development Kit. As of this writing, the GNU Compiler for Java (GCJ) will not work.
232
233\subsubsection{Installing Java on Ubuntu}
234\label{section:installation:javaubuntu}
235
236Open /etc/apt/sources.list in an editor and add the following lines to the end of the file:
237\begin{lstlisting}[]
238 deb http://archive.canonical.com/ubuntu lucid partner
239 deb-src http://archive.canonical.com/ubuntu lucid partner
240\end{lstlisting}
241
242In a terminal, enter the following lines:
243\begin{lstlisting}[]
244 $ sudo apt-get update
245 $ sudo apt-get install sun-java6-jdk
246\end{lstlisting}
247
248\subsubsection{Installing Eclipse}
249\label{section:installation:eclipseinstall}
250Install the Eclipse IDE for Java Developers. Go to the \href{http://www.eclipse.org/downloads/}{Eclipse Download Center} and download an Eclipse distribution for your platform.
251
252Eclipse is distributed as a tarball archive that you can unpack to location of your choice. Pick a location that is appropriate for your platform and
253simply unpack the contents. There is no self-installer, just unpack the distribution. Do not install Eclipse in a directory that has spaces anywhere
254in its full path name.
255
256\subsubsection{Installing OEF}
257\label{section:installation:oefinstall}
258Now that the dependencies have been installed, OEF can be installed.
259
260Move into the unpacked eclipse directory, and start eclipse:
261\begin{lstlisting}[]
262$ cd /path/to/eclipse
263$ ./eclipse
264\end{lstlisting}
265
266After Eclipse starts, on the toolbar select {\tt Help}, {\tt Install New Software}.
267In the new window, select the ``Work with'' textbox and enter the URL: {\tt http://ossie.wireless.vt.edu/eclipse/}
268and select Add. Give a name, e.g., ``OEF''.
269
270The window will then add the URL, OSSIE, OSSIE Waveform Developer
271Feature to the list of available software. Place a check in the box next to OSSIE
272Waveform Developer Feature and click Next. Eclipse will show a window with more details, select Finish to complete the installation process.
273
274%Eclipse will bring up a window which will
275%resolve any dependencies and then start the install guide.
276
277%When the install window opens, make sure OSSIE Waveform Developer Feature is selected and click Next.
278
279%Accept the GNU license agreement and select Next. Eclipse will then begin to download the necessary files, which may take a few minutes.
280Allow Eclipse to restart when it prompts to do so. After it restarts, the OSSIE Eclipse Feature will be installed.
281
282Select the OSSIE perspective within Eclipse. On the toolbar, select {\tt Window},
283{\tt Open Perspective}, {\tt Other}. In the new window, select OSSIE which will then
284open the OSSIE perspective. On the toolbar, select {\tt File}, {\tt New}, {\tt OSSIE Waveform},
285or {\tt OSSIE Component} to start developing.
286
287These same instructions used for installing OEF can be used later to update it to newer versions.
288
289\subsection{Using a VMware Image on Any Platform}
290\label{section:installation:vmware}
291A VMware image of OSSIE \ossieversion\ pre-installed on a Linux operating system is available at \\
292\href{http://ossie.wireless.vt.edu/trac/wiki/Downloads}{http://ossie.wireless.vt.edu/trac/wiki/Downloads}.
293All that is needed to run the virtual image is the VM­Ware Player, available
294for free from \href{http://www.vmware.com/download/player/}{http://www.vmware.com/download/player/}.
295Versions of the player are available for both Windows and Linux.
296
297Install VMware Player on your system, unzip the virtual image and open it.
298For full instructions on installing and using VMware player, please
299consult the VMWare Player User Guide~\cite{vmware:web}.
300
301It is recommended that you keep a copy of the zipped virtual image so that you do
302not need to download the image a second time to start with a fresh copy. Changes
303that you make from within the image will alter it, and in the event of drastic
304unwanted changes, starting afresh is easy if you have an extra copy of the image
305on your hard drive.
306
307% \subsection{Via Ebuild on Gentoo Linux}
308% Support for installation via Gentoo's Portage package management system has not
309% yet been thoroughly tested but ebuilds do exist.
310%
311% To access the ebuilds, install and configure layman if you haven't already:
312% \begin{figure}
313% \begin{lstlisting}[]
314% # emerge layman
315% # echo "source /usr/portage/local/layman/make.conf" >> /etc/make.conf
316% \end{lstlisting}
317% \end{figure}
318%
319% Then, add ossie-overlay to your locally-stored overlays:
320% \begin{figure}
321% \begin{lstlisting}[]
322% # layman -a -o https://ossie.wireless.vt.edu/repos/ossie/experimental/scripts/gentoo/ossie-overlay.xml
323% \end{lstlisting}
324% \end{figure}
325%
326% You can then proceed with installing OSSIE:
327% \begin{figure}
328% \begin{lstlisting}[]
329% # emerge -av ossie
330% \end{lstlisting}
331% \end{figure}
332%
333% After sucessful compiliation of the OSSIE framework and its dependencies, skip
334% to section X.
335
336%\subsection{Embedded Platforms}
337%While installation on embedded platforms is not officially supported in the
338%0.6.2 release, work has been done (MENTION WORK) on porting OSSIE to embedded
339%platforms and we are interested in promoting more work in this area.
340
341
Note: See TracBrowser for help on using the browser.