Overview
--------

The MPP drivers for Linux are packaged using DKMS.  DKMS allows both pre-compiled
binaries and source code to be packaged into an RPM.  This allows pre-compiled
binaries to be delivered for supported Linux distributions while still allowing the
driver to be built for custom kernels and newer distributions that may not be officially
supported, but will still work.  The generated DKMS RPMs will first try to use a
pre-compiled binary for the system they are being installed on and fall back to building
the driver from source on systems for which there is not a pre-compiled binary included.
In either case, the kernel source code is required since the driver's makefile includes
logic that causes it to exit if it is not present.

In order to generate the pre-compiled binaries, the MPP source code must be compiled on
each supported Linux distro.  This means that every supported distro must be available.
This is typically achieved by loading each version on virtual machines.  As mentioned
above, compiling the MPP driver requires kernel source code, so the build systems will
need to have it installed.

The scripts available along with these instructions are used to automate and simplify
the process as much as possible as well as providing error checking for missing binaries
among other things.

The basic process is to run the first script on each distro to compile the driver and
generate a tarball that can easily be imported to a separate Linux system that is used
as a central repository from which the final RPMs are built.  Once all tarballs are
copied to the repository system, the second script cleans up the current repository and
imports all of the tarballs thereby populating the repository with all pre-compiled
binaries and source code.  Finally, the third script generates the RPMs based on distro
family and driver versions (for example all RHEL4 binaries for each architecture are
packaged together in one RPM and all RHEL5 binaries are packaged together in a separate
RPM).


Steps
-----


1) Copy the "mpp_build" directory to each supported distribution and architecture.
   For example, RHEL4U7 32-bit, RHEL4U7 64-bit, RHEL4U8 32-bit, SLES10SP2, etc.

   ***NOTE***

   If the target system doesn't already have DKMS installed on it, the script will
   look for a dkms-*.noarch.rpm install package in the same directory it is executing
   and automatically install it.

   An error will be displayed if DKMS isn't installed and it can't find an install
   RPM in the same directory.


2) Run the "step_1_build_dkms_tarball.sh" script on each system and pass it to the
   rdac-LINUX-x.x.x.x-source.tar.gz file that contains the correct MPP driver source
   code received from LSI.


3) Copy the "linuxrdac-x.x.x.x-kernel-arch-tarball.dkms.tgz" files that was created by
   the script from the "tarballs" to some media where it can be transported to the Linux
   system that will be used as the main repository for all pre-compiled binaries that will
   be used to generate the RPMs.


4) Copy all tarballs created by the previous steps to the repository system.


5) From the REPOSITORY system, run "step_2_load_dkms_tarballs.sh" and pass it the path to
   the tarballs you previously copied over.


6) Review the status of built modules in the repository that is dumped at the end of the
   script to ensure it contains all of the pre-compiled binaries for supported kernel and
   architectures.


7) Run the "step_3_build_dkms_rpms.sh" script passing it the supported distributions (RHEL4U7
   RHEL4U8 SLES10SP2 etc).

   ***NOTE***

   This script will need to be modified if newer distributions are being added to identify the
   correct kernel versions and architectures for it.

   An error will be displayed if an unsupported distribution is specified or the DKMS repository
   does not contain the associated pre-compiled binaries for the requested distributions.



Example Session From Buzz 1.1:
------------------------------

From each linux distribution (RHEL4U7 32-bit, RHEL4U7 64-bit, RHEL4U8 32-bit, SLES10SP2 64-bit, etc):

 ./step_1_build_dkms_tarball.sh rdac_LINUX-09.03.0B06.0234.tar.gz


From the main repository system used to create the final RPMs:

 ./step_2_load_dkms_tarballs.sh tarballs
 ./step_3_build_dkms_rpms.sh RHEL4U7 RHEL4U8 RHEL5U2 RHEL5U3 RHEL5U4 SLES9SP4 SLES10SP2 SLES10SP3 SLES11
   