How to build ASL driver module after a kernel update

ASL provides the following driver modules that can be used under Red Hat Enterprise Linux 5 or CentOS 5.x:

When a new kernel has been updated using Yum or Red Hat Network, one of the following events might occur:

  1. If the new kernel does not include support for the disk controller, the kernel will panic when trying to mount the root filesystem.
  2. If the new kernel does not include support for the network controller, network access will no longer be available.

To prevent these problems, it is important to rebuild the driver module immediately after updating the kernel, and before rebooting the system.

To build a new driver module for Red Hat Enterprise Linux 5 or CentOS 5.x, use the following steps:

  1. If necessary, install or update the kernel-devel package corresponding to the updated kernel.
  2. Install the device driver source RPM from the ASL RHEL5/CentOS 5.x Device Driver CD.
  3. Build the new driver
  4. Reboot the system to use the new driver

The latest ASL RHEL5/CentOS 5.x Device Driver CD can be downloaded here:

http://updates.aslab.com/isos/RHEL5

The kernel-devel package for most current kernel can be installed via yum:

# yum install kernel-devel

For older CentOS kernels, the kernel-devel package can be downloaded from:

http://vault.centos.org

Depending on which choices were made during installation, some additional packages may be required. For a system configured without any development tools, the following will be necessary:

# yum install rpm-build
# yum update glibc
# yum install gcc

After installing the development packages, perform the following steps. This example rebuilds the 64-bit 3Ware 9xxx driver for the EL5 2.6.18-92.1.13.el5 kernel:

# mount /dev/cdrom /media
# rpm -ivh /media/SRPMS/3w-9xxx2.6*.src.rpm
# cd /usr/src/redhat/SPECS
# /media/SRPMS/builddriver.sh 3w-9xxx2.6.spec 2.6.18 92.1.13.el5
# rpm -ivh /usr/src/redhat/RPMS/x86_64/3w-9xxx2.6*.x86_64.rpm
# new-kernel-pkg --mkinitrd --depmod --install 2.6.18-92.1.13.el5
# umount /media

Note: The kernel version 2.6.18-92.1.13.el5 is used solely for example purposes. When necessary, replace it with the appropriate kernel version.