Overo Tobi Ethernet

From Gumstix User Wiki

Jump to: navigation, search

Some Overo boards do not properly bring up the eth0 wired Ethernet interface when booting up with the Tobi expansion board. The result is that the Overo will not have a working wired Ethernet connection after booting, even though you may have eth0 properly configured in /etc/network/interfaces. The problem appears to be caused by a version mismatch between the dhclient and ifupdown packages on the Overo images.

Contents

Software

Official Overo pre-built Linux images or developer images have support for wired Ethernet networking and DHCP.

Configuring eth0

Edit /etc/network/interfaces to enable eth0:

 auto eth0
 iface eth0 inet dhcp

The above configuration should already be there, you would just have to uncomment it.

Boot Messages

After you have eth0 configured, reboot your Overo. You should see the following messages during boot:

Configuring network interfaces... net eth0: SMSC911x/921x identified at 0xd08cc000, IRQ: 336
eth0      no wireless extensions.

Internet Systems Consortium DHCP Client V3.1.2p1
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Usage: dhclient [-1dqrx] [-nw] [-p <port>] [-s server]
                [-cf config-file] [-lf lease-file][-pf pid-file] [-e VAR=val]
                [-sf script-file] [interface]

If you did not get this software from ftp.isc.org, please
get the latest from ftp.isc.org and install that before
requesting help.

If you did get this software from ftp.isc.org and have not
yet read the README, please read it before requesting help.
If you intend to request help from the dhcp-server@isc.org
mailing list, please read the section on the README about
submitting bug reports and requests for help.

Please do not under any circumstances send requests for
help directly to the authors of this software - please
send them to the appropriate mailing list as described in
the README file.

exiting.
Failed to bring up eth0.
done.

Even though you have eth0 configured properly, ifup fails to bring up the eth0 interface.

Apparent Version Mismatch Problem

The above errors during boot appear to be caused by some kind of version mismatch between the dhclient and ifupdown packages installed in the Overo images.

The ifupdown package source code has a file named inet.defn. Here are lines 76 through 81 from that file:

76:  up
77:    [[ifconfig %iface% hw %hwaddress%]]
78:    dhclient3 -pf /var/run/dhclient.%iface%.pid -lf /var/lib/dhcp3/dhclient.%iface%.leases %iface% \
79:        if (execable("/sbin/dhclient3"))
80:    dhclient -v -pf /var/run/dhclient.%iface%.pid -lf /var/lib/dhcp/dhclient.%iface%.leases %iface% \
81:        elsif (execable("/sbin/dhclient"))

As you can see, if dhclient3 is not found on the system, then at line 80 dhclient is invoked with the -v flag. This is the problem, because the Overo image has /sbin/dhclient, not /sbin/dhclient3. The dhclient version on the Overo image does not support the -v flag, and this is why the error message appears during boot, and the eth0 interface does not get initialized.

Solution

It is possible to manually run dhclient from the command line after you log into the Overo. This should make eth0 get an IP address from DHCP. This solution is fine for development, but it is not acceptable for an embedded computer that is supposed to boot up and get on the network without supervision.

The solution is to create a symlink to trick ifup:

ln -s /sbin/dhclient3 /sbin/dhclient

This way, the inet.defn code will see that dhclient3 is present, and (via the symlink) it will call dhclient without the troublesome -v flag.

Now when you boot the Overo, you should no longer get the error messages. Instead, eth0 should successfully get an IP address via DHCP and you should have a working wired Ethernet connection.

Personal tools