[ECOS] Re: Ethernet driver code for ecos

Nick Garnett nickg@ecoscentric.com
Wed May 28 21:18:00 GMT 2003


"Sibbald, Alister" <Alister.Sibbald@LloydsTSB.co.uk> writes:

> Nick,
> 
> I hope you don't mind the imposition of a direct email. I am currently
> trying to get ecos up and running on a Gigabyte motherboard.

You should always at least CC messages to ecos-discuss. This then
makes any discussion available to other users, so that they may chip
in, or learn something. It also puts it into the archives for future
reference.

Although I have not done it yet, I also reserve the right to just
ignore direct emails :-)

> One problem I
> am having is that it is not finding an ethernet interface ( I have compiled
> redboot for a gigabit ethernet controller ). The Gigabyte board uses the
> Intel 82540 EM controller, which appears ( despite the numbering ) to be the
> next intel generation ( as they put it "fourth generation" ) of controllers
> on from the 82544 chip that you seem to have ported the code to.
>

If the 82540 is backward compatible with the 82544 then maybe all you
need to do is to add the appropriate device id to
find_82544s_match_func().  You may need to take a look at the 82540
data sheet to determine the level of compatibility. If the device id
is not listed in the documentation then you need to run the pci1 test,
which will tell you the ids of all the devices on all the PCI busses.

> My question is twofold:
> 
> *	Given that I am mainly interested in developing an application to
> run obn ecos, rather than hacking device drivers, is the effort likely to be
> required to get the code working for this such that I would be better off
> simply purchasing an appropriate ethernet adapter ( with an 82544 chip ) and
> basing my work on that?

I usually reckon on about 10 days to get a previously unknown ethernet
device up and running. Perhaps less if it has strong similarities to
something else.

> *	Could you give me any pointers on how to approach a port ( from your
> 82544 code to the 82540 ) is appropriate.

Even if the 82540 is different from the 82544, I would expect the
general structure and behaviour of the device to be similar. If you
really have to write a new device driver, basing it on the 82544
driver is the right thing to do. Bring it up in RedBoot first, and put
plenty of debug printfs in -- see the 82544 driver for examples.


-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss



More information about the Ecos-discuss mailing list