F.5 Adding or Updating LAN Drivers

As LAN card manufacturers develop and release new LAN adapters, they usually release new or updated drivers as well. Sometimes the new LAN card functions properly with an earlier driver, and sometimes the earlier driver does not recognize the new LAN card and refuses to load. Occasionally, the older driver does load, but the LAN card exhibits serious performance problems. To obtain the full performance capabilities of a new LAN card, you should use the new driver.

The following sections explain how to obtain or compile drivers:

If you need to load your drivers with specific parameters, see Section F.5.3, Loading Drivers with Parameters.

F.5.1 Obtaining Drivers

New LAN drivers should be obtained from the manufacturer. Most LAN card manufacturers have drivers available for free downloading from their Web site. Some drivers are available from www.scyld.com/network, and the source to the Broadcom BCM5700 driver can be downloaded from http://www.broadcom.com/drivers/downloaddrivers.php.

If a manufacturer has a binary driver compiled specifically for the kernel version used by ZENworks, you can obtain the driver and use one of the update methods to add the driver. If the driver is not for this specific version, you must obtain the source and compile it for this version. For more information, see Section F.5.2, Building Drivers.

F.5.2 Building Drivers

Nearly all Linux drivers are distributed in source code form and need to be compiled before they can be used. Follow the manufacturer’s instructions included with the new driver to build the driver module. Many drivers can be built in such a way that they are built into the kernel itself; however, we recommend that LAN drivers be built as external kernel modules.

When building your LAN drivers, make sure that your build machine uses the same kernel as the imaging environment. If you have a LAN driver that doesn’t load in your imaging environment, it usually means that you have a mismatch between your build environment and the imaging environment.

You can find the current kernel version of your Linux environment using the following command:

uname -r

However, you might need to modify the results from the uname command to get your kernel versions to match. For more information, see Section F.6, Using Uname.

To build your drivers:

Obtaining the Linux Source Code Tree

To compile a module, you need the Linux source code tree that contains the configuration matching the ZENworks kernel. To obtain the necessary source code, do the following:

To use the Linux source code tree:

  1. Obtain the current kernel version of the Imaging distro:

    1. Boot any device in the Management Zone into the ZENworks Imaging Maintenance mode.

    2. Run the uname -r command.

      This displays the kernel version of the Imaging distro.

  2. From the Novell Downloads Web site, download the kernel source RPM for the kernel version obtained in Step 1.b.

    The kernel source RPM filename is in the following format:

    kernel-source-kernel_version.i586.rpm

    For example, kernel-source-2.6.27.29-0.1.i586.rpm is the souce code for the kernel version 2.6.27.29-0.1-default.

  3. Install the downloaded kernel source RPM.

    The RPM is installed to the /usr/src directory, and the following subdirectories are created:

    • /usr/src/linux-Kernel_source_version

    • /usr/src/linux-Kernel_source_version-obj

    For example, the following directories are created when you install kernel-source-2.6.27.29-0.1.i586.rpm :

    • /usr/src/linux-2.6.27.29-0.1

    • /usr/src/linux-2.6.27.29-0.1-obj

  4. To create a link to the source tree:

    1. To change to the /usr/src directory, enter:

      cd /usr/src
      
    2. If there is a Linux soft link in the directory, delete it.

    3. Create the new Linux soft link, such as:

      ln -s linux-2.6.27.29-0.1 linux
      

You now have the Linux kernel source tree and soft link ready for compiling the module. Continue with Compiling the Module.

Compiling the Module

To manually compile the module:

  1. Install the source.

    Follow the manufacturer’s instructions to install the source.

    Normally, the module source is in a directory under /usr/src. Module source files usually come in the form of a gzipped tar file (.tar.gz or .tgz). The file might also be a bzipped file (.bz2).

  2. To compile the source:

    1. Change directories to the source.

    2. If you modified uname to change to the proper kernel version, issue a make command.

  3. When you have your module compiled for ZENworks, take the generated .ko module file (make sure you select the proper module name and not a work .ko file) and install it by using the driver update method or placing it in the initrd file system.

F.5.3 Loading Drivers with Parameters

If there is a module that you want to load during the linuxrc processing time, and if linuxrc does not recognize that it needs to be loaded or you want to specify the load parameters, you can enter a line in the linuxrc.config or /info file. This file then needs to be updated in the initrd file system.

You might need to load a LAN driver module with specific parameters. You can do this with a line like:

insmod="moduleName parm=xxx"

This type of line is most commonly used to load a LAN driver with specific parameters, such as full duplex or specific speed.