Skip to contentSkip to conversation

scb9328 breakage (CONFIG_NET_MULTI and eth_get_dev)

U-Boot-Users Andrew Dyer 2 participants 2 messages Feb 24, 2007

lore
Share & tools
lore
#0 lore raw

I have a board similar to the scb9328 that I'm working on a port to. I tried compiling a recent version of u-boot for the scb9328 target and it fails with a linker error (see below). The source was pulled from git on Feb. 10, 2007. compiler is from arm ELDK-4.0

Adding a define for CONFIG_NET_MULTI in the board config file makes the compile succeed. I don't actually have an scb9328 (or my new board yet) so I can't test it.

Is CONFIG_NET_MULTI pretty much mandatory? If so, why even have it as an option?

here's the error message:

make[1]: Leaving directory /home/adyer/Projects/u-boot/common' UNDEF_SYM=arm-linux-objdump -x lib_generic/libgeneric.a board/scb9328/libscb9328.a cpu/arm920t/libarm920t.a cpu/arm920t/imx/libimx.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/nand/libnand.a drivers/nand_legacy/libnand_legacy.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a |sed -n -e

's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
                cd /home/adyer/Projects/u-boot && arm-linux-ld

-Bstatic -T /home/adyer/Projects/u-boot/board/scb9328/u-boot.lds -Ttext 0x08f00000 $UNDEF_SYM cpu/arm920t/start.o \
--start-group lib_generic/libgeneric.a
board/scb9328/libscb9328.a cpu/arm920t/libarm920t.a cpu/arm920t/imx/libimx.a lib_arm/libarm.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/nand/libnand.a drivers/nand_legacy/libnand_legacy.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a --end-group -L /home/adyer/usr/bin/../lib/gcc/arm-linux/4.0.0 -lgcc \
-Map u-boot.map -o u-boot
common/libcommon.a(cmd_net.o): In function `net_check_device':
/home/adyer/Projects/u-boot/common/cmd_net.c:157: undefined reference to `eth_get_dev'
make: *** [u-boot] Error 1

Signature · 2 lines
Hardware, n.:
        The parts of a computer system that can be kicked.
#1 lore raw

Andrew,

Quoted 15 lines · --- Andrew Dyer

I have a board similar to the scb9328 that I'm working on a port to.
I tried compiling a recent version of u-boot for the scb9328 target
and it fails with a linker error (see below). The source was pulled
from git on Feb. 10, 2007. compiler is from arm ELDK-4.0

Adding a define for CONFIG_NET_MULTI in the board config file makes
the compile succeed. I don't actually have an scb9328 (or my new
board yet) so I can't test it.

Quoted 5 lines

Is CONFIG_NET_MULTI pretty much mandatory? If so, why even have it as
an option?

Yeah, for most recent ethernet devices it's more-or-less mandatory. If you look in 'net/eth.c' you'll see that many of the newer drivers only have their code within the confines of #ifdef CONFIG_NET_MULTI. This code needs an overhaul, and for other reasons too, but as with much of U-boot it has to be done very carefully to ensure backwards-compatibility.

regards,
Ben