Skip to contentSkip to conversation

EP885C Port Compilation Problems

U-Boot-Users Will Haines 2 participants 9 messages Jul 11, 2005

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 4 lines · In message <[email protected]> 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'

...

Quoted 2 lines

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

Signature · 8 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
This was an  amazing  creation  using  small  squares  of  compressed
vegetable  matter on which letters were made by means of small carbon
particles from a stylus, giving an effect similar to the  traditional
word-processor  screen. It seemed amazingly portable and I never once
saw him have to change the batteries.
        - Terry Pratchett & Stephen Briggs, _The Discworld Companion_
#2 lore raw
Quoted 3 lines · 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

#3 lore raw
Quoted 3 lines · In message <[email protected]> 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.

Quoted 2 lines

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

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
No one may kill a man.  Not for any purpose.  It cannot be condoned.
	-- Kirk, "Spock's Brain", stardate 5431.6
#4 lore raw
Quoted 1 line · Wolfgang Denk <wd <at> denx.de> writes:

Try: #define CONFIG_FEC_ENET

Thank you very much for the help.

#define FEC_ENET

did the trick. At least I can compile now.

Will

#5 lore raw
Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 2 lines

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

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
How many QA engineers does it take to screw in a lightbulb? 3:  1  to
screw it in and 2 to say "I told you so" when it doesn't work.
#6 lore raw
Quoted 2 lines · 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

#8 lore raw
Quoted 2 lines · In message <[email protected]> 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

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A Puritan is someone who is deathly afraid that  someone,  somewhere,
is having fun.