configuring libbsd for em NIC driver

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Jun 26 07:10:35 UTC 2015


The currently supported platforms of libbsd Ethernet are:

o Altera Cyclone V
o Xilinx Zynq
o Freescale P1020
o Freescale MCF548x

Everything else needs some extra work. Depending on your prior knowledge 
of the system this is more or less time consuming.

On 26/06/15 01:42, Wu, Mark H. wrote:
> I've been trying to follow this direction and get it working, but I've run into a few hurdles.
>
> I've added a line into rtemsbsd/include/bsp/nexus-devices.h to include a line:
>
> SYSINIT_DRIVER_REFERENCE(em, pci);
>
> I'm not sure if this is the complete solution, since I haven't actually added the PCI bus as a child device to the nexus device. I'm also not sure if this should be included here, since not all pc386 devices will have an em device. A little clarification on this would be appreciated. Maybe I should just include that line in my application code (where I configure RTEMS)?
>
> Trying to rebuild the library using waf returned a lot of errors.
>
> The first set of errors was due to the fact that the e1000_i210.c file wasn't in the freebsd directory (but it was in the freebsd-org directory). So I moved it over, added the #include <machine/rtems-bsd-kernel-space.h> line that was common to all of the other files in the directory. I then added the file to wscript (where all of the other e1000 files were) to get it to compile.
>
> The next set of errors are undefined references to 'inl' and 'outl.' I'm not sure what to do about these. I see the functions declared in machine/cpufunc.h (in the freebsd directory), but I don't see any definitions of them anywhere. (There are inlined versions of them in machine/cpufunc.h, but it doesn't appear to be usinf those because of a #if.) I'm not sure where those functions are supposed to be defined, so I'm a bit stuck. I'm wondering if that's the reason that the e1000_i210.c file wasn't originally included?
>
> Any help would be appreciated.
>
> Mark.
>
>
>
> -----Original Message-----
> From: Sebastian Huber [mailto:sebastian.huber at embedded-brains.de]
> Sent: Wednesday, June 24, 2015 21:39
> To: Joel Sherrill
> Cc: devel at rtems.org; Wu, Mark H.
> Subject: Re: configuring libbsd for em NIC driver
>
>
> ----- Joel Sherrill <joel.sherrill at oarcorp.com> schrieb:
>> Hi
>>
>> As I posted, I have the pc386 up to the point where I can
>> run the non-network tests with one intermittent failure.
>>
>> I am pretty sure Mark wants the em driver found in
>> freebsd/sys/dev/e1000/ (em driver).
>>
>> FWIW it looks like qemu simulates a handful of useful
>> NICs. I would like to also be able to exercise them.
>>
>> qemu: Supported NIC models: ne2k_pci,i82551,i82557b,i82559er,rtl8139,e1000,pcnet,virtio
>>
>> This covers the em, fxp, rtl, and AMD PCNET Lance. That's
>> would cover a lot of the PC territory.
>>
>> So how does one configure this in the stack? And bring
>> it up enough to see that the NIC is found.
> You have to add a "pci" child device to the "nexus" device and make sure that the desired driver is referenced.  See also
>
> rtemsbsd/include/bsp/nexus-devices.h
>

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.




More information about the devel mailing list