Tux
Communication
Mailing lists
Documentation
User Manual
Target board info.
Target chip info.
Support
Linux support
Bugzilla
Downloads
STLinux
Updates
Search
Google


The web
stlinux.com
Getting Started
Booting the Kernel
Using DHCP
ST Logo
Previous   Contents   Next

DHCP is the Dynamic Host Configuration Protocol, and allows a networked machine to obtain its IP address and other information automatically. For a full description of DHCP please see the DHCP mini-HOWTO, or for implementation details RFC2131 gives the full specification.

If you normally use DHCP for obtaining IP addresses, than it may not be convenient to allocate a fixed IP address for the ST40 target. There are two possible solutions to this, kernel level configuration or user level configuration.

Kernel level auto-configuration

Using kernel level auto-configuration of the network interfaces has the advantage that that when the kernel has finished booting, it will already have a valid IP address, and so can mount an NFS root file system. This disadvantage of this technique is that the kernel only supports BOOTP level configuration. Most DHCP server can also be configured to respond to BOOTP requests, but you have to ask your network administrator to enable them. The other disadvantage is that BOOTP can only configure basic network parameters, and does not include things such as DNS servers.

To do this, then simply remove the definitions of TARGETIP, GWIP and NETMASK, from the script used previously, and change AUTOCONF to bootp.

User level auto-configuration

User level auto-configuration gives much more flexibility, but has the disadvantage that the system must have a root file system available when it has finished booting, which does not depend on the network being configured. This typically means a hard drive or a RAM or ROM disk.

The program used to make the DHCP requests and configure the network interface is 'pump'. To use it:

  1. The kernel mush be configured with packet socket configured (CONFIG_PACKET). All supplied LSP should have this enabled.
  2. The pump RPM must be installed. You can check by typing:
    rpm -qa | grep stm-sh4-pump
    
    If it is installed, you will see the version number. If it is not you will need to install it, and a package called popt which it depends upon:
    rpm -Uhv --ignorearch \
      /mnt/cdrom/Base/RPMS/stm-sh4-popt-1.6.3-1.sh4.rpm \
      /mnt/cdrom/Base/RPMS/stm-sh4-pump-0.8.3-1.sh4.rpm
    
    You may need to change the path to the RPMS directory, depending on your local configuration, and check that the version numbers have not changed since this was written.
  3. Add the following line to .../etc/network/interfaces:
    iface eth0 inet dhcp
    
    (this assumes the interface you are interested in is eth0, change to match your system)
  4. Create the file /etc/pump.conf and add the following (again assuming for eth0):
    retries 3
    device eth0 {
    	# nodns # add this to stop DNS configuration
    	# nonisdomain # add this to stop YP configuration
    }
    
Previous   Contents   Next
Valid HTML 4.01! Last updated: 2003/11/06 14:00:43
© Copyright STMicroelectronics Limited, 2005
Printer