[U-Boot-Users] EP885C Port Compilation Problems

Hello everyone,
I am trying to port U-Boot to an EP885C development board in order to practice porting before I have to port to a board that my company is in the process of building. I know that Yuli Barcohen will soon release a patch that ports to the EP885C, but I felt that I had to plow ahead before I get that patch as a reference for porting.
I began by making the directories suggested in the faq and changing values for what board specifications I could determine. I am sure that I am missing some important values, but I wanted to test compilation. Upon doing so, I received the following errors as the compiler attempted to build u-boot.map:
****************************************************************************** net/libnet.a(net.o)(.text+0x11c): In function `ArpRequest': /shared/streamblade/test/wdhaine/workdir/u-boot-1.1.2/net/net.c:217: undefined reference to `eth_send' net/libnet.a(net.o)(.text+0x11c):/shared/streamblade/test/wdhaine/workdir/ u-boot-1.1.2/net/net.c:217: relocation truncated to fit: R_PPC_PLTREL24 eth_send net/libnet.a(net.o)(.text+0x2a8): In function `NetLoop': /shared/streamblade/test/wdhaine/workdir/u-boot-1.1.2/net/net.c:287: undefined reference to `eth_halt' net/libnet.a(net.o)(.text+0x2a8):/shared/streamblade/test/wdhaine/workdir/ u-boot-1.1.2/net/net.c:287: relocation truncated to fit: R_PPC_PLTREL24 eth_halt net/libnet.a(net.o)(.text+0x2b0):/shared/streamblade/test/wdhaine/workdir/ u-boot-1.1.2/net/net.c:291: undefined reference to `eth_init' net/libnet.a(net.o)(.text+0x2b0):/shared/streamblade/test/wdhaine/workdir/ u-boot-1.1.2/net/net.c:291: relocation truncated to fit: R_PPC_PLTREL24 eth_init net/libnet.a(net.o)(.text+0x38c):/shared/streamblade/test/wdhaine/workdir/ u-boot-1.1.2/net/net.c:457: undefined reference to `eth_rx' net/libnet.a(net.o)(.text+0x38c):/shared/streamblade/test/wdhaine/workdir/ u-boot-1.1.2/net/net.c:457: relocation truncated to fit: R_PPC_PLTREL24 eth_rx net/libnet.a(net.o)(.text+0x404):/shared/streamblade/test/wdhaine/workdir/ u-boot-1.1.2/net/net.c:515: undefined reference to `eth_halt' net/libnet.a(net.o)(.text+0x404):/shared/streamblade/test/wdhaine/workdir/ u-boot-1.1.2/net/net.c:515: relocation truncated to fit: R_PPC_PLTREL24 eth_halt net/libnet.a(net.o)(.text+0x494):/shared/streamblade/test/wdhaine/workdir/ u-boot-1.1.2/net/net.c:463: undefined reference to `eth_halt' net/libnet.a(net.o)(.text+0x494):/shared/streamblade/test/wdhaine/workdir/ u-boot-1.1.2/net/net.c:463: relocation truncated to fit: R_PPC_PLTREL24 eth_halt net/libnet.a(net.o)(.text+0x648): In function `NetStartAgain': /shared/streamblade/test/wdhaine/workdir/u-boot-1.1.2/net/net.c:551: undefined reference to `eth_halt' net/libnet.a(net.o)(.text+0x648):/shared/streamblade/test/wdhaine/workdir/ u-boot-1.1.2/net/net.c:551: relocation truncated to fit: R_PPC_PLTREL24 eth_halt net/libnet.a(net.o)(.text+0x73c): In function `NetSendPacket': /shared/streamblade/test/wdhaine/workdir/u-boot-1.1.2/net/net.c:604: undefined reference to `eth_send' net/libnet.a(net.o)(.text+0x73c):/shared/streamblade/test/wdhaine/workdir/ u-boot-1.1.2/net/net.c:604: relocation truncated to fit: R_PPC_PLTREL24 eth_send net/libnet.a(net.o)(.text+0x8b0): In function `NetSendUDPPacket': /shared/streamblade/test/wdhaine/workdir/u-boot-1.1.2/net/net.c:653: undefined reference to `eth_send' net/libnet.a(net.o)(.text+0x8b0):/shared/streamblade/test/wdhaine/workdir/ u-boot-1.1.2/net/net.c:653: relocation truncated to fit: R_PPC_PLTREL24 eth_send net/libnet.a(net.o)(.text+0xc60): In function `NetReceive': /shared/streamblade/test/wdhaine/workdir/u-boot-1.1.2/net/net.c:1280: undefined reference to `eth_send' net/libnet.a(net.o)(.text+0xc60):/shared/streamblade/test/wdhaine/workdir/ u-boot-1.1.2/net/net.c:1280: relocation truncated to fit: R_PPC_PLTREL24 eth_send net/libnet.a(net.o)(.text+0xcf0):/shared/streamblade/test/wdhaine/workdir/ u-boot-1.1.2/net/net.c:1251: undefined reference to `eth_send' net/libnet.a(net.o)(.text+0xcf0):/shared/streamblade/test/wdhaine/workdir/ u-boot-1.1.2/net/net.c:1251: relocation truncated to fit: R_PPC_PLTREL24 eth_send make: *** [u-boot] Error 1 ******************************************************************************
If someone could help me determine how to make the build process find the eth functions (I see that their code is located in net/eth.c) I would be very appreciative. I am not very knowledgeable about relocation.
Also, if Yuli is reading this, even if your patch is incomplete, any reference material that you could provide to help me replicate your port would be greatly appreciated.
In eager anticipation, Will Haines

In message loom.20050711T205419-648@post.gmane.org you wrote:
net/libnet.a(net.o)(.text+0x11c): In function `ArpRequest': /shared/streamblade/test/wdhaine/workdir/u-boot-1.1.2/net/net.c:217: undefined reference to `eth_send'
...
If someone could help me determine how to make the build process find the eth functions (I see that their code is located in net/eth.c) I would be very
You enabled network support but did not select an ethernet driver.
Best regards,
Wolfgang Denk

Wolfgang Denk <wd <at> denx.de> writes:
You enabled network support but did not select an ethernet driver.
Thank you for the pointer in the right direction. I thought that CONFIG_ETHER_ON_FEC1 would do the trick. It seems that I am wrong. Is there an ethernet driver selection configuration option that I am missing? I can't seem to find one in the README. Thank you again for the help.
Will

In message loom.20050711T225456-175@post.gmane.org you wrote:
Thank you for the pointer in the right direction. I thought that CONFIG_ETHER_ON_FEC1 would do the trick. It seems that I am wrong. Is there an
This just selects which port gets used *iff* you add the FEC thernet driver.
ethernet driver selection configuration option that I am missing? I can't seem to find one in the README. Thank you again for the help.
Try: #define CONFIG_FEC_ENET
Best regards,
Wolfgang Denk

In message loom.20050711T231942-515@post.gmane.org you wrote:
Try: #define CONFIG_FEC_ENET
Thank you very much for the help.
#define FEC_ENET
did the trick. At least I can compile now.
No, this is wrong. This is an internal #define which you are not supposed to touch. YOu should only ever touch CFG_ and CONFIG_ stuff.
As mentioned before, you should add "#define CONFIG_FEC_ENET" to your board config file.
Best regards,
Wolfgang Denk

Wolfgang Denk <wd <at> denx.de> writes:
As mentioned before, you should add "#define CONFIG_FEC_ENET" to your board config file.
I am not sure why, but when I add "#define CONFIG_FEC_ENET" I still get the undefined reference errors. I understand that FEC_ENET is internal; to avoid using it, do you have any other suggestions for defining an ethernet controller?
Will

I fixed the problem. I was missing a bit more than just CONFIG_FEC_ENET. Thank you for steering me away from the quick fix.
Will

In message loom.20050711T235740-776@post.gmane.org you wrote:
I fixed the problem. I was missing a bit more than just CONFIG_FEC_ENET. Thank you for steering me away from the quick fix.
I guess you were missing the board specific port configration stuff in "include/commproc.h", right? Because this is where FEC_ENET gets defined when appropriate.
Best regards,
Wolfgang Denk
participants (2)
-
Will Haines
-
Wolfgang Denk