Instructions for ML403 Build


(And current framework tweaks)

To fully follow these instructions, a couple things are needed:
  • Linux machine for software development
  • Windows machine with Xilinx ISE and EDK 10.1.03.
  • Trac login for this website
    • Select Register at the top of this page and complete the form. Email ossie at vt dot edu with your trac user ID to have your access enabled.
  • ML403 Eval Board
  • Serial Cable, most likely a null modem cable
  • a CompactFlash? card
  • Hyperterminal, gtkterm, etc. on one of the machines.
  • (optional) Ethernet cable for ML403

Partitioning the CompactFlash? Card


Three partitions will need to be created for the CF card. These will hold the root file system, ACE image and swap space. More instructions will be added.

Base System Build


Within Xilinx EDK, create a base system build. Set up the software options for the device tree and generate the xilinx.dts as well as the BIT image. Instructions for this section will be added.

Building the Cross Compiler


The following instructions describe how to cross compile a linux kernel for the PowerPC 405. This discussion centers around the use of Crosstools, a simple utility for creating a Cross-Compiler. This cross compiler will be needed when compiling the linux kernel, OSSIE, omniORB (CORBA) and any other software targeted for the PowerPC.

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


Linux on PowerPC 405 Installation


Rename the xilinx.dts file from EDK to virtex405-ml403.dts and place it within the kernel source in arch/powerpc/boot/dts directory.

The kernel must first be configured before compiling it. The kernel configure used in this development is given here: .config. Replace the .config file in the top level directory of the kernel source. Otherwise, to configure a kernel from scratch find the top level directory of the kernel and enter the following command: $ make xconfig ARCH=powerpc



Now that the kernel is configured, compile it: $ make simpleImage.virtex405-ml403 ARCH=powerpc CROSS_COMPILE=powerpc-405-linux-gnu-



The resulting simpleImage.virtex405-ml403.elf image must then be copied from arch/powerpc/boot to a machine running the Xilinx toolset. Copy this ELF image into a directory with the download.bit image produced by EDK and a .opt file. Create a .opt file for use in this build by opening a text editor and adding the following lines: -jprog
-board ml403
-target ppc_hw
-hw download.bit
-elf simpleImage.virtex405-ml403.elf
-ace system.ace



Open the EDK Shell, and move into this directory and run the following command: $ xmd -tcl genace.tcl -opt ml403Genace.opt



This will generate an ACE image which can then be placed on the CompactFlash? card.

Download OSSIE Source


Download the source through subversion: $ cd /home/USER
$ svn co https://ossie.wireless.vt.edu/repos/ossie/ossiedev/trunk ossie-trunk



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



The static library containing the FPGA Controller may be named differently, so open C_Makefile to verify the name of the driver. These files are a good place to start if you would like to test the interface to the FPGA independent of OSSIE or start building your own driver. Examples of OSSIE components that interface with the FPGA are give here:
TxDemo, CostasLoop

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/


Running OSSIE


The file system is in a state of transition and currently only supports a flat directory structure. Therefore, symbolic links will need to be added to overcome this limitation. The capability to allow sub-directories lies in the file manager list() function, where recursion is not used. There is a single line which needs to be uncommented to allow recursion, but this fix needs to be verified with the rest of the framework and tools.

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



Only a single waveform (SAD and DAS files) can be listed within any node directory as c_wavLoader crashes with more than one waveform. This will be fixed in the future.

Run c_wavLoader $ cd /sdr
$ c_wavLoader





注:ML403(原文出处,翻译整理仅供参考!)