README on how to configure, build, install and use RTnet with Linux 2.4.25 ========================================================================== For cross development, please use the ELDK version 3.1.1. For further information check http://www.denx.de/wiki/DULG/ELDK. This README is for the TQM5200 evaluation board. I actually use an EEPRO100 PCI NIC to boot Linux and mount the root file system via NFS. Get and unfold sources: ----------------------- $ cd $ export WORKDIR=$PWD - DENX Linux 2.4.25 $ cd $WORKDIR $ git clone git://www.denx.de/git/linuxppc_2_4_devel.git $ export KERNELDIR=$PWD/linuxppc_2_4_devel - Xenomai 2.3.5 $ cd $WORKDIR $ wget http://download.gna.org/xenomai/stable/xenomai-2.3.5.tar.bz2 $ tar xjf xenomai-2.3.5.tar.bz2 $ export XENODIR=$PWD/xenomai-2.3.5 - RTnet SVN trunk (>= 0.9.10rc1): $ cd $WORKDIR $ svn co https://rtnet.svn.sourceforge.net/svnroot/rtnet/trunk $ export RTNETDIR=$PWD/trunk/rtnet Configure, build and install kernel and user space binaries: ------------------------------------------------------------ - Required environment settings $ export CROSS_COMPILE=ppc_6xx- $ export DESTDIR=/opt/eldk/ppc_6xx - Configure and build Xenomai patched kernel $ cd $KERNELDIR $ patch -p1 < /linuxppc_2_4_devel-wait-event.patch $ patch -p1 < /linuxppc_2_4_devel-fec.patch $ make TQM5200_config $ cd $XENODIR $ ./scripts/prepare-kernel.sh --linux=$KERNELDIR --arch=ppc --verbose $ cd $KERNELDIR $ make menuconfig ... check loadable module support ... ... disable FEC driver ... MPC5xxx I/O Options ---> [*] Use USE Motorola BestComm API Implementation [ ] FEC Ethernet ... enable EEPRO100 PCI driver ... Network device support ---> Ethernet (10 or 100Mbit) ---> [*] EISA, VLB, PCI and on board controllers <*> EtherExpressPro/100 support (eepro100, ... ... exit and save default configuration ... $ make dep $ make uImage $ cp -pv arch/ppc/boot/images/uImage /tftpboot - Configure, build and install Xenomai user space stuff $ cd $XENODIR $ ./configure --host=ppc-linux --prefix=/root/xenomai $ make $ make install - Configure, build and install RTnet $ cd $RTNETDIR $ patch -p1 < rt-mpc52xx-fec.patch $ ./configure --host=ppc-linux \ --with-linux=$KERNELDIR \ --with-rtext-config=$DESTDIR/root/xenomai/bin/xeno-config \ --disable-e1000 --disable-8139 --disable-8139too \ --enable-mpc52xx-fec --enable-eepro100 \ --prefix=/root/xenomai --enable-proxy $ make $ make install Load, configure and run RTnet on the target: -------------------------------------------- Check if the device file /dev/rtnet exists. If not, create it with: # mknod /dev/rtnet c 10 240 I use the following script to load the RTnet modules and to startup the network: # cat load-rtnet export RTNET=/root/xenomai moddir=$RTNET/modules export PATH=$PATH:$RTNET/sbin:$RTNET/bin:$RTNET/examples/xenomai/posix export LD_LIBRARY_PATH=$RTNET/lib insmod -m $moddir/rtnet.o > /root/insmod.log insmod -m $moddir/rtipv4.o >> /root/insmod.log insmod -m $moddir/rt_mpc52xx_fec.o >> /root/insmod.log rtifconfig rteth0 up 172.16.0.20 rtroute solicit 172.16.0.1 dev rteth0 rtifconfig rtroute Then you can use "rtping" to check the connection: # rtping 172.16.0.1 Testing: -------- For testing RTnet communication and response time, the example RTnet applications rtt_sender and rtt_responder are quite useful. You can make and install them as shown below: $ cd $RTNETDIR/examples/xenomai/posix/ $ make $ make install In $DISTDIR/rtt-examples are the corresponding programs for plain Linux.