About Us
Museum

Ecos synth networking

From RFID Guardian

Contents

Synthetic base build

  • build the application ecosynth
  • See
    • ~ECOS/ecos-cvs/packages/hal/synth/arch/current/doc/
    • ~ECOS/ecos-cvs/packages/hal/synth/arch/current/host; run configure in directory ~ECOS/ecos-build/synth/ecosynth/hal:
$ ~ECOS/ecos-cvs/packages/hal/synth/arch/current/host/configure \
     --prefix=~ECOS/ecos-build/synth/bin
$ make && make install

Synthetic network build

  • build the intermediate application rawether
  • See
    • ~ECOS/ecos-cvs/packages/devs/eth/synth/ecosynth/current/doc/
    • ~ECOS/ecos-cvs/packages/devs/eth/synth/ecosynth/current/host; run configure in directory ~ECOS/ecos-build/synth/ecosynth/eth:
$ ~ECOS/ecos-cvs/packages/devs/eth/synth/ecosynth/current/host/configure \
     --prefix=~ECOS/ecos-build/synth/bin
$ make && sudo make install

The latter step is necessary because the executable created (rawether) needs to be setuid-root.

Linux setup for Synthetic network stuff

We use dhcp to assign an IP address to our eCos synth app

  • See Sergei Gavrikov's instructions: [[1]] and [[2]]
  • But some things didn't work for me so I try to repeat what I did:
$ sudo apt-get install uml-utilities # for tunctl
$ sudo apt-get install dhcp3-server

Add to /etc/network/interfaces

iface tap0 inet manual
   up tunctl -t tap0
   up ip l set up dev tap0
   up ip a add 10.1.1.1/24 brd + dev tap0
   down ip l set down dev tap0
   down tunctl -d tap0

Edit /etc/default/dhcp3-server to contain

INTERFACES="tap0"

Edit /etc/dhcp3/dhcpd.conf and add

# For the eCos synth server thingy, we configure an ethertap
subnet 10.1.1.0 netmask 255.255.255.0 {
   range 10.1.1.20 10.1.1.30;
}

Make rutger owner of tap0 so we can run the binary as rutger, not as root:

$ sudo tunctl -u rutger -t tap0
$ sudo chown rutger:rutger /dev/net/tun

Bring up tap0

$ sudo ifup tap0

Restart dhpc3-server

$ sudo /etc/init.d/dhcp3-server restart

Create a binding for ethertap tap0 in file ~ECOS/ecos-build/synth/my.tdf (now in SVN):

my.tdf --
synth_device ethernet {
   eth0 ethertap tap0
}

Synth application

Add to your PATH the directory ~ECOS/ecos-build/synth/bin/libexec

Open up the 10.1.1.x range in /etc/hosts.allow:

ALL 10.1.1. # ethertap

Run ping test as

$ cd ~ECOS/ecos-build/synth
$ ./linux_install/tests/net/common/current/tests/ping_test -nw -io -t my.tdf

Synth framebuffer support

$ cd ~ECOS/ecos-build/
$ ~ECOS/ecos-cvs/packages/devs/framebuf/synth/current/host/configure --prefix=./bin
$ cd ~ECOS/ecos-build/synthecosynth/framebuffer
$ make && make install
$ export ECOS_REPOSITORY=~ECOS/ecos-cvs/packages
$ export PATH=$PATH:~ECOS/ecos-build/synth/bin/libexec