Discussion:
Enable network for the Intel 82551ER chip - pc386
João Paulo Scalão Martins
2012-03-23 14:14:40 UTC
Permalink
Hello guys,

I'm using the PC386 BSP on a Single Board Computer and I need to enable the
ethernet interface of this SBC, so I can create TCP/IP communication for my
project.

My SBC uses the Intel 82551ER ethernet chip. The PC386 BSP doesn't have the
specific driver for this chip, and I have some questions:

Does the ne2000 driver support this chip? How can I build the BSP with the
ne2000 driver? (the source folder of pc386 has a ne2000.c file, but it
seems that this file is not compiled in the building of pc386 - am I wrong?)

Thank you!

Regards from Brazil

Joao Paulo
Joel Sherrill
2012-03-23 14:44:25 UTC
Permalink
Post by João Paulo Scalão Martins
Hello guys,
I'm using the PC386 BSP on a Single Board Computer and I need to
enable the ethernet interface of this SBC, so I can create TCP/IP
communication for my project.
My SBC uses the Intel 82551ER ethernet chip. The PC386 BSP doesn't
This NIC is supported by the libbsdport collection of add-on drivers.

Check that out from git.
Post by João Paulo Scalão Martins
Does the ne2000 driver support this chip? How can I build the BSP with
the ne2000 driver? (the source folder of pc386 has a ne2000.c file,
but it seems that this file is not compiled in the building of pc386 -
am I wrong?)
No on ne2000.

It is compiled but only when networking is enabled.
Post by João Paulo Scalão Martins
Thank you!
Regards from Brazil
Joao Paulo
João Paulo Scalão Martins
2012-03-27 15:46:49 UTC
Permalink
Thank you, Mr. Joel.

I've downloaded the libbsdport from GIT, and I'm trying to implement the
drivers in my code, but I don't know how...

Do you know which file contains the 82551 driver? The folder
bsd_eth_drivers/if_em does not have this NIC driver, specifically.

Do I have to do the "make, make install" procedure for the libbsdport ? I
just don't know which folders I have to add to my "include path", neither
the headers files that contains the driver attach functions...

Best regards,

Joao
Joel Sherrill
2012-03-27 15:54:52 UTC
Permalink
Post by João Paulo Scalão Martins
Thank you, Mr. Joel.
I've downloaded the libbsdport from GIT, and I'm trying to implement
the drivers in my code, but I don't know how...
Do you know which file contains the 82551 driver? The folder
bsd_eth_drivers/if_em does not have this NIC driver, specifically.
if_fxp

$ grep 82551 */*.c
if_fxp/if_fxp.c: { 0x1059, -1, "Intel 82551QM Pro/100 M Mobile
Connection" },
if_fxp/if_fxp.c: { 0x1229, 0x0f, "Intel 82551 Pro/100 Ethernet" },
if_fxp/if_fxp.c: { 0x1229, 0x10, "Intel 82551 Pro/100 Ethernet" },
if_fxp/if_fxp.c: sc->revision == FXP_REV_82551_E || sc->revision
== FXP_REV_82551_F
if_fxp/if_fxp.c: || sc->revision == FXP_REV_82551_10) {
if_fxp/if_fxp.c: * If this is an 82550/82551, then we're using
extended
if_fxp/if_fxp.c: * the chip is an 82550/82551 or not.
if_fxp/if_fxp.c: { FXP_REV_82551_F, UCODE(fxp_ucode_d102e),
Post by João Paulo Scalão Martins
Do I have to do the "make, make install" procedure for the libbsdport
? I just don't know which folders I have to add to my "include path",
neither the headers files that contains the driver attach functions...
You have to run bootstrap from the top of the tree.

I configure and build using a script with this in it

rm -rf b-bsd
mkdir b-bsd
cd b-bsd
../libbsdport/configure CFLAGs="-O0 -g" \
--with-rtems-top=${prefix} \
--enable-std-rtems-installdirs \
--prefix=${prefix} >c.log 2>&1 && \
make >b.log 2>&1 && \
make install >i.log 2>&1
status=$?
echo $status

prefix is where I installed RTEMS
Post by João Paulo Scalão Martins
Best regards,
Joao
--
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill-***@public.gmane.org On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
Chris Johns
2012-03-27 22:33:09 UTC
Permalink
Post by João Paulo Scalão Martins
Thank you, Mr. Joel.
I've downloaded the libbsdport from GIT, and I'm trying to implement the
drivers in my code, but I don't know how...
Do you know which file contains the 82551 driver? The folder
bsd_eth_drivers/if_em does not have this NIC driver, specifically.
Do I have to do the "make, make install" procedure for the libbsdport ?
I just don't know which folders I have to add to my "include path",
neither the headers files that contains the driver attach functions...
The RTL project I am working ....

http://www.rtems.org/ftp/pub/rtems/people/chrisj/rtl/rtl-20111005.tar.bz2

has an 'init.c' file that supports the fxp interface on a PC from the
libbsdports library. It should help provide some of the configuration
glue you will need once you have built and installed the libbsdports
package.

Chris
João Paulo Scalão Martins
2012-03-30 13:34:06 UTC
Permalink
Thank you Chris!

I'm trying to use the fxp driver, but I didn't understand your init.c. As a
matter of fact, I don't know how to use the fxp driver, because I have not
found any fxp_driver_attach_function to put on the ifconfig struct !!!

I start writing some code, just this way:

*driver_t* libbsdport_netdriver_table[] =*
*{*
* &libbsdport_fxp_driver,*
* NULL*
*};*
*
*
When I compile the program, the compiler gives me an error "undefined
reference to libbsdport_fxp_driver". This error occurs in another .c file,
at the start of a function which doesn't have any relationship with the
libbsdport_netdriver_table !!!!
I checked the header <bsp/libbsdport_api.h> and the driver
libbsdport_fxp_driver is defined as extern. Sounds like the linker can not
found the real definition of the driver...


Best regards...

Joao
Wendell Silva
2012-03-30 14:10:32 UTC
Permalink
Hi Joao,

Have you checked the LDFLAGS in your makefile?
Something like this:
LDFLAGS = -lif_fxp -lbsdport
(copied from Chris' makefile.am file)

I hope it helps...

--Wendell

Em 30 de março de 2012 10:34, João Paulo Scalão Martins <
Post by João Paulo Scalão Martins
Thank you Chris!
I'm trying to use the fxp driver, but I didn't understand your init.c. As
a matter of fact, I don't know how to use the fxp driver, because I have
not found any fxp_driver_attach_function to put on the ifconfig struct !!!
*driver_t* libbsdport_netdriver_table[] =*
*{*
* &libbsdport_fxp_driver,*
* NULL*
*};*
*
*
When I compile the program, the compiler gives me an error "undefined
reference to libbsdport_fxp_driver". This error occurs in another .c file,
at the start of a function which doesn't have any relationship with the
libbsdport_netdriver_table !!!!
I checked the header <bsp/libbsdport_api.h> and the driver
libbsdport_fxp_driver is defined as extern. Sounds like the linker can not
found the real definition of the driver...
Best regards...
Joao
_______________________________________________
rtems-users mailing list
http://www.rtems.org/mailman/listinfo/rtems-users
--
Att.
Wendell P. Silva
+55 12 8114-8018
João Paulo Scalão Martins
2012-03-30 18:05:25 UTC
Permalink
The problem was solved by adding "-lif_fxp -lbsdport" in the LD_LIBS of my
MAKEFILE.

Now I have some TCP packets being exchanged between my RTEMS-Single Board
Computer and a Linux Desktop.

Thank you so much, Joel, Chris and Wendell!

Joao

Loading...