Version 30 (modified by mcarrick, 4 years ago)

updating instructions for linking against C driver

Instructions for ML403 Build

(And current framework tweaks)

Download OSSIE Source

Download the source through subversion:

$ cd /home/USER
$ svn co https://ossie.wireless.vt.edu/repos/ossie/ossiedev/trunk ossie-trunk

PowerPC 405 Installation

(The following instructions describe how to cross compile a linux kernel for the PowerPC 405 residing on the Virtex4. This discussion centers around the use of Crosstools, a simple utility for creating a Cross-Compiler. Later, we will describe how to cross-compile the software dependencies of OSSIE, such as CORBA and the Boost FileSystem?.)

Make sure that you have the following utilities already installed on your machine before moving forward:

$ sudo apt-get install bison
$ sudo apt-get install flex

Download Crosstools-0.43

$ wget http://kegel.com/crosstool/crosstool-0.43.tar.gz
$ tar -xzvf crosstool-0.43.tar.gz
$ cd crosstool-0.43

Create the directory where the cross-compiler will be installed

$ sudo mkdir /opt/crosstool
$ sudo chown $USER.$USER /opt/crosstool

Append the 'powerpc-405.dat' file with the following options:

TARBALLS_DIR=~/downloads   # where it will save source tarballs
RESULT_TOP=/opt/crosstool  # where it will install the tools
GCC_LANGUAGES="c,c++"      # which languages it will make compilers for

Now, build gcc-4.1.1 and glibc-2.3.6 for the PowerPC

$ eval `cat powerpc-405.dat gcc-4.1.0-glibc-2.3.6.dat` sh all.ah --notest

Build the system/ossie directory:

$ cd ossie-trunk/system/ossie
$ ./reconf
# ./configure --prefix=/opt/crosstool/gcc-4.1.1-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/ --host=powerpc-405-linux-gnu
# make "CXXFLAGS=-DBOOST_1_34"
# make install

Build the system/standardinterfaces directory:

$ cd ossie-trunk/system/standardinterfaces
$ ./reconf
# ./configure --prefix=/opt/crosstool/gcc-4.1.1-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/ --host=powerpc-405-linux-gnu OSSIE_LIBS=/opt/crosstool/gcc-4.1.1-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/lib/
# make "CXXFLAGS=-I/opt/crosstool/gcc-4.1.1-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/include/"
# make install

Build system/nodebooter:

$ cd ossie-trunk/system/nodebooter
$ ./reconf
# ./configure --prefix=/opt/crosstool/gcc-4.1.1-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/ --host=powerpc-405-linux-gnu
# make "CXXFLAGS=-I/opt/crosstool/gcc-4.1.1-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/include/ -L/opt/crosstool/gcc-4.1.1-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/lib/"

Build system/c_wavLoader:

$ cd ossie-trunk/system/c_wavLoader
$ ./reconf
# ./configure --prefix=/opt/crosstool/gcc-4.1.1-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/ --host=powerpc-405-linux-gnu
# make "CXXFLAGS=-I/opt/crosstool/gcc-4.1.1-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/include/ -L/opt/crosstool/gcc-4.1.1-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/lib/"

Cross Compiling Components or Devices:
(That do not require linking against a C driver library)

$ cd ossie-trunk/components/COMPONENT
$ ./reconf
# ./configure --prefix=/opt/crosstool/gcc-4.1.1-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/ --host=powerpc-405-linux-gnu "CXXFLAGS=-lossiecf -lossieidl -lossieparser -lomniORB4 -lomniDynamic4 -lomnithread"
# make "CXXFLAGS=-I/opt/crosstool/gcc-4.1.1-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/include/ -L/opt/crosstool/gcc-4.1.1-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/lib/"

Cross Compiling Components or Devices:
(That link against a C driver library)

First compile the C driver into a static library:

# make -f C_Makefile

Run reconf and configure on the component:

$ ./reconf
# ./configure --prefix=/opt/crosstool/gcc-4.1.1-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/ --host=powerpc-405-linux-gnu "CXXFLAGS=-lossiecf -lossieidl -lossieparser -lomniORB4 -lomniDynamic4 -lomnithread"

Open Makefile to link against the static library, and find the following line:

LIBS = -lstandardInterfaces -lomniDynamic4 -lomnithread -lomniORB4  -L/usr/local/lib -lossieidl -lossieparser -lossiecf

Add -L. -lFPGAController to the end of the line:

LIBS = -lstandardInterfaces -lomniDynamic4 -lomnithread -lomniORB4  -L/usr/local/lib -lossieidl -lossieparser -lossiecf -L. -lFPGAController

Run make:

# make "CXXFLAGS=-I/opt/crosstool/gcc-4.1.1-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/include/ -L/opt/crosstool/gcc-4.1.1-glibc-2.3.6/powerpc-405-linux-gnu/powerpc-405-linux-gnu/lib/"

Rename the component to specify the architecture: (For example TxDemo? -> TxDemo?_powerpc)

$ mv COMPONENT COMPONENT_arch

Manually copy the binary to the CompactFlash? drive:

# cp COMPONENT_arch /media/CF_ROOT_FILE_SYSTEM/sdr/bin/

x86 Installation

(Assumes all dependencies have been installed, sudo access, etc.)

Install OSSIE

$ cd /home/USER/ossie-trunk
$ python build.py

Copy Multiple Implementation executables:
(This step to be replaced when building for ml403)

$ cd /sdr/bin/
$ cp GPP GPP_powerpc
$ cp TxDemo TxDemo_powerpc
$ cp TxDemo TxDemo_v4
$ cp ChannelDemo ChannelDemo_powerpc
$ cp RxDemo RxDemo_powerpc

Running OSSIE

Create Symbolic Link for nodeBooter

$ cd /sdr/domain/
$ ln -s ../../sdr/ sdr

Run nodeBooter

$ nodeBooter -D -d nodes/default_ml403_node/DeviceManager.dcd.xml

Set up /sdr for c_wavLoader

$ cd /sdr/nodes/default_ml403_node/
$ ln -s ../../xml/ xml
$ ln -s ../../waveforms/ml403_ossie_demo/ml403_ossie_demo_DAS.xml ml403_ossie_demo_DAS.xml
$ ln -s ../../waveforms/ml403_ossie_demo/ml403_ossie_demo.sad.xml ml403_ossie_demo.sad.xml

(Due to the fact that the file manager list() call is not recursive, waveforms that are desired to be run must have symbolic links for both the DAS and SAD files into the waveform directory. Currently only a single waveform can be listed within the default_ml403_node directory, as more than one crashes c_wavLoader. This is a kluge, for sure. But it goes back to the age old debate over the directory structure.)

Run ossie_demo waveform

$ cd /sdr
$ c_wavLoader