The files in the src directory are covered by the IBM Public License
and the SUN ONC RPC license, with are included in the files
LICENSE.IBM and LICENSE.Sun in the same directory as this README.

There are two ways to build the AFS kernel module on the local system:
Building an RPM and Building Manually


  REBUILDING FROM SOURCE RPM
  --------------------------

The first (and preferred) way to build a kernel module is to build an
openafs-kernel RPM from the OpenAFS Source RPM.  To do this you can
just use "rpm --rebuild" from the Source RPM (SRPM) and specify that
you want to build a module and the target CPU.  For example:

  rpmbuild --rebuild --define "build_modules 1" --target=i686

You MUST specify the target CPU or it will not build the correct
module for your system.

For more information on all the various options for rebuilding your
kernel module via RPM, run:

  rpm -qi openafs

This will explain all your options for controlling your build.


  REBUILDING MANUALLY
  -------------------

The second method to build a kernel module is to build it manually
from source.  You really should just build the RPM, but if you really
don't want to you can do it this way instead.

To build the AFS kernel module on a local system, run:

    ./configure
    make

When it's done, the binary module will be src/MODLOAD-XXX/libafs-XXX.o
(or .ko), where "XXX" is your linux kernel version.  Note that it may
also compile as src/MODLOAD-XXX/openafs.ko.

You must manually install this module on your system.  To do this you
generally copy the file to /lib/modules/XXX/openafs.o:

    cp src/MODLOAD-XXX/libafs-XXX.o /lib/modules/XXX/openafs.o

Then you need to tell your system about the new kernel module by
running "depmod -ae XXX" to run the module dependencies for kernel
version "XXX".
