Instructions on how to create and install the driver binary RPMs





Requirements:

1. gcc compiler

You'll need to compile the drivers from the source code. The gcc C compiler is required. Note that this compiler is not installed by default on most systems. Often it has to be explicitly installed when first installing your OS, or by other means (like the compiler RPM package) afterward.

2. Kernel source tree for compiling driver

To compile the drivers, you will need the kernel source on your machine. (Or more specifically, the kernel headers) You may need to specify during install of the OS that the kernel source should be put onto your machine. If this is not available, you may need to get the kernel source from other means, such as a source RPM for the particular kernel.

The driver source code on the RHEL 4.0 distribution cannot be installed by default. You will need to install the devel RPMs available on the 3rd CD in order to compile the drivers. 
Uniprocessor support, for example, requires the installation (for 32-bit) of kernel-devel-2.6.9-5.EL.i686.rpm. This does not place all the source code of the kernel on the drive, but rather only the header files of the kernel. The driver only requires these header files to compile properly. For RHEL 2.1 and 3.0, you can install the kernel source in the initial install by specifying to install the package for kernel development, or similar options on other operating systems.

3. rpm utility

The rpm utility is needed to install the software. This is available on most 
systems.

4. rpmbuild utility

This is needed to create the binary RPM file from the source RPM. If your system does not have rpmbuild, use rpm -bb to create the binary. SLES 8 does not have rpmbuild, but equivalently uses rpm -bb.





Creating the binary RPM:

Log in as root. Download the source RPM to your drive.

Install the source RPM by running rpm -ivh mptlinux-<version>-<release>.<arch>.src.rpm. Replace version, release, and architecture (arch) with those of the driver you want to install.

The following files should be placed on your system:

For Red Hat users:
	/usr/src/redhat/SOURCES/mptlinux-<version>-<release>.<arch>.tar.gz
	/usr/src/redhat/SPECS/mptlinux-<version>-<release>.<arch>.spec
	
For SuSE users:
	/usr/src/packages/SOURCES/mptlinux-<version>.tar.gz
	/usr/src/packages/SPECS/mptlinux.spec
	
Next, you need to build the binary RPM to create and compile the drivers:

1. cd into the directory where the mptlinux.spec file was installed. On Red Hat 
this is /usr/src/redhat/SPECS. On SuSE this is /usr/src/packages/SPECS.

2. Use the rpmbuild utility to build the binary RPM. This is done by the command 
rpmbuild -bb mptlinux.spec, which should be executed from the directory where the mptlinux.spec file is in. SLES 8 users should replace rpmbuild with just rpm.

3. When the build is finished the RPM will be located, on Red Hat, at /usr/src/redhat/RPMS/i386 or, on SuSE, /usr/src/packages/RPMS/i386. If you are creating the binary RPM on another architecture, substitute i386 with your architecture. (Run a uname -m to get the architecture) Sometimes, however, even if the architecture is (for example) i686 it will still appear in the i386 directory.





Installing the drivers from the created binary RPM:

After the binary RPM is created, it can then be installed. Use this command to install the RPM, assuming you are in the directory where the RPM was created in:

rpm -ivh mptlinux-<version>-<release>.<arch>.rpm

To uninstall, use:

rpm -e mptlinux-<version>-<release>

This will delete all the driver files installed from the RPM and replace them with the older ones, as well as restore the old initrd image and update dependencies.

