This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Ethernet driver for linux synthetic target available
>>>>> "Andrew" == Andrew Lunn <andrew.lunn@ascom.ch> writes:
Andrew> On Wed, Aug 07, 2002 at 09:47:48PM -0400, Nikolay V. Pyatkov wrote:
>>
>> Dear ecos-maintainers
>>
>> I have an alpha version of the Ethernet driver for the linux synthetic
>> target. It consist of to parts :
>>
>> - an epk for ecos
>> - a linux kernel module
>>
>> So far I was able to configure the ecos kernel with Open BSD
>> stack and add my driver using ecosaddming. I use 'manual' IP
>> address/mask/ESA setup from my application. The target wakes
>> up, sends out an arp packet and responds to arps and pings from
>> my host. The tcpdump running on the host recognizes all this
>> traffic which to me means the driver works. Sure it needs more
>> testing.
Andrew> Sounds good.
>> I would like to release it to public if there is any interest.
Andrew> Yes, definitely. Its something that a lot of people ask
Andrew> for. You will need to sign a copywrite assignment. You can
Andrew> find this at http://sources.redhat.com/ecos/assign.html
Actually, this is unfortunate. Another project I have been working on
recently is generic I/O support for the synthetic target. This has now
reached the point where I can do ethernet I/O, and I am looking at
serial support next.
With my approach, a synthetic target application spawns an auxiliary
program ecosynth during startup. ecosynth is essentially just a
slightly extended Tcl interpreter, and the main work is done by Tcl
scripts. That makes it all easier to extend and customize. Optionally
ecosynth provides a GUI interface, allowing emulation of things like
buttons and displays.
During initialization, my eCos ethernet driver will send a request off
to ecosynth to load a script ethernet.tcl. ecosynth reads a target
definition file which controls how this gets mapped on to the
underlying Linux hardware, e.g. the eCos device eth0 could be mapped
on to a spare Linux ethernet device eth1, and the eCos device eth1
could be mapped on to the Linux ethertap device tap3. Subsequently,
sending a packet involves forwarding this packet to ecosynth, to be
handled by the ethernet.tcl script. For incoming packets the
ethernet.tcl script will call a Tcl command synth::raise_interrupt,
which causes a SIGIO signal to be sent to the synthetic target
application. In due course this will cause the ISR for the eCos
ethernet driver to be invoked.
(There is actually a complication for ethernet, in that under Linux
you cannot normally access raw ethernet devices or ethertap devices
from user mode. I do not want the synthetic target application or
ecosynth to run with root privileges, so there is actually another
process rawether, installed suid root, which does the low-level
I/O.)
I had planned to spend a couple more weeks on this, adding a few more
devices and making sure that the basic structure was sound, doing some
more serious testing, and writing initial documentation. However I
suppose I could release something earlier.
Bart
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss