Chapter 5. Rebuilding the Kernel when using Myrinet without SGI ProPack

If you want to use the Myrinet drivers but you are not running SGI ProPack for Linux, you must rebuild the kernel in order to make the header files and modules match. You do not need to run the rebuilt kernel.

The following sections describe the following:

Standard Rebuild Procedure

To rebuild the header files and modules required for Myrinet drivers, do the following:

  1. Log in as root.

  2. Get the current kernel version number:

    # uname -r

  3. Set the current working directory to the desired kernel version:

    # cd /usr/src/kernel_version

  4. Copy the kernel configuration file corresponding to the kernel version:

    # cp configs/kernel-kernel_version.config .config

  5. Rebuild the kernel configuration files:

    # make oldconfig

  6. Rebuild the kernel source and modules:

    # rm -f include/linux/modules/*
    # make dep
    # make clean
    # make modules

  7. Rebuild the Myrinet RPM:

    # cd mnt/cdrom/SRPMS
    # export GM_BUILD_ROOT=/usr/src/kernel_version
    # rpm --rebuild --target architecture package_version.src.rpm

    Watch for the RPM name at the end of the build output. For example:

    /usr/src/redhat/rpms/i686/gm-smp-1.2-0.src.rpm

    This RPM target name will be an argument for the next step.

  8. Install the Myrinet RPM:

    # rpm -ihv package_version.architecture.rpm package

    For example:

    # rpm -ihv /usr/src/redhat/RPMS/i686/gm-smp-1.2-0.i686.rpm

Shortcut when the Source Matches the Running Kernel

If the kernel source matches the runing kernel, but you have rebuilt the kernel, you can use this shortcut:

  1. Log in as root.

  2. List the library modules:

    # ls /lib/modules/

  3. Get the current kernel version number:

    # uname -r

  4. Rebuild the Myrinet RPM:

    # cd mnt/cdrom/SRPMS
    # export GM_BUILD_ROOT=/usr/src/kernel_version
    # rpm --rebuild --target architecture package_version.src.rpm

    Watch for the RPM name at the end of the build output. For example:

    /usr/src/redhat/RPMS/i686/gm-smp-1.2-0.i686.rpm

    This RPM target name will be an argument for the next step.

  5. Install the Myrinet RPM:

    # rpm -ihv package_version.src.rpm package

For example, to build gm for an i686 architecture system:

# ls /lib/modules/
2.2.14-5.0  2.2.14-5.0smp
# uname -r
2.2.14-5.0smp
# cd mnt/cdrom/SRPMS
# export GM_BUILD_ROOT=/lib/modules/2.2.14-5.0smp
# rpm --rebuild --target i686 gm-smp-1.2-0.src.rpm
...
# rpm -ihv /usr/src/redhat/RPMS/i686/gm-smp-1.2-0.i686.rpm