Skip to contentSkip to conversation

net/eth.c drivers/net/rtl8019.c eth_xxx function name dunplication

U-Boot qq 2 participants 2 messages Jan 4, 2011

lore
Share & tools
lore

qq

author
#0 lore raw

Hello,everybody,in RedHat 9.0,i compiled u-boot v2010.12-rc3 with arm-linux-tools-20070808
On link stage,print some errors:

... ... ... ... -lgcc -Map u-boot.map -o u-boot
net/libnet.o: In function `eth_halt':
/home/code/uboot_v2010.12-rc3/net/eth.c:375: multiple definition of `eth_halt' drivers/net/libnet.o:/home/code/uboot_v2010.12-rc3/drivers/net/rtl8019.c:44:
first defined here
/usr/local/bin/arm-linux-ld.real: Warning: size of symbol eth_halt' changed from 16 in drivers/net/libnet.o to 52 in net/libnet.o net/libnet.o: In function eth_rx':
/home/code/uboot_v2010.12-rc3/net/eth.c:393: multiple definition of `eth_rx' drivers/net/libnet.o:/home/code/uboot_v2010.12-rc3/drivers/net/rtl8019.c:44:
first defined here
/usr/local/bin/arm-linux-ld.real: Warning: size of symbol eth_rx' changed from 132 in drivers/net/libnet.o to 48 in net/libnet.o net/libnet.o: In function eth_init':
/home/code/uboot_v2010.12-rc3/net/eth.c:335: multiple definition of `eth_init' drivers/net/libnet.o:/home/code/uboot_v2010.12-rc3/drivers/net/rtl8019.c:93:
first defined here
/usr/local/bin/arm-linux-ld.real: Warning: size of symbol eth_init' changed from 236 in drivers/net/libnet.o to 208 in net/libnet.o net/libnet.o: In function eth_send':
/home/code/uboot_v2010.12-rc3/net/eth.c:385: multiple definition of `eth_send' drivers/net/libnet.o:/home/code/uboot_v2010.12-rc3/drivers/net/rtl8019.c:235:
first defined here
/usr/local/bin/arm-linux-ld.real: Warning: size of symbol eth_send' changed from 192 in drivers/net/libnet.o to 56 in net/libnet.o /usr/local/bin/arm-linux-ld.real: u-boot: warning: allocated section .bss' not in segment
common/libcommon.o:(.data+0x764): undefined reference to `environment'
make: *** [u-boot] Error 139

These words show me that net/eth.c has "eth_send" and drivers/net/rtl8019.c also has "eth_send" function as the same name.
My board use RTL8019AS ethernet controller,s3c44b0 CPU.
i couldn`t figure out what is wrong with the code and how to fix it,Thanks a lot for any suggestion
MrGates

#1 lore raw
Quoted 5 lines · qq

These words show me that net/eth.c has "eth_send" and drivers/net/rtl8019.c also has "eth_send" function as the same name.
My board use RTL8019AS ethernet controller,s3c44b0 CPU.
i couldn`t figure out what is wrong with the code and how to fix it,Thanks a lot for any suggestion

It seems to me that the rtl8019 driver was never updated according to the eth_device stucture (I think it was the introduction of CONFIG_NET_MULTI).

Network drivers must not expose global functions, and instead of that they must set their callbacks in a struct eth_device and register itself with eth_register().

Anyway, I do not find any board in actual u-boot code using this driver. It seems to me like dead code...

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================