Debian PCMCIA Card Services

                        Debian PCMCIA Card Services
                                README File

                       Brian Mays <brian@debian.org>

This is the Debian GNU/Linux prepackaged version of the PCMCIA card
services package.

By default, debian/rules will set the kernel-specific options from the
kernel source tree in /usr/src/linux.  If this is not desirable, execute
`make config' in the pcmcia-cs root directory to interactively configure
the package.

You need to have a complete linux source tree for your kernel, not just an
up-to-date kernel image, to compile the PCMCIA package.  The PCMCIA modules
contain some references to kernel source files.  While you may want to
build a new kernel to remove unnecessary drivers, installing PCMCIA does
not require you to do so.

To recompile the PCMCIA kernel modules:

     The process of recompiling a kernel and the PCMCIA modules has been
     greatly simplified by Debian's kernel-package package (available in
     Debian's main distribution).  This package contains the make-kpkg
     utility, which is used to create the kernel related Debian packages.
     It is highly recommended that you use this utility.

     If you are using make-kpkg:

     1)   Ensure that the pcmcia-cs source tree is in a subdirectory of the
          /usr/src/modules directory.  Use a symbolic link to the actual
          source tree if you must.  Note that the pcmcia-source package
          contains a tar file, /usr/src/pcmcia-cs.tar.gz, which when
          unpacked in the /usr/src directory (e.g., using tar xzf) places
          the pcmcia-cs source tree in the correct location.  Older
          versions of the pcmcia-source package contained the entire
          source, rather than a tar file, in /usr/src/modules/pcmcia-cs.

     2)   As root, go to the the base of the kernel source tree (usually
          the /usr/src/linux directory).  If you are building a kernel that
          is custom configured to your specifications, go ahead and
          configure the kernel with `make config,' `make menuconfig,' or
          `make xconfig.'

     3)   To build a new kernel-image package, execute:
               make-kpkg --revision number kernel_image
          This will generate a kernel-image-<kernel version> deb file in
          the parent directory.  Here number (the argument supplied after
          the --revision flag) is a version number for your custom built
          kernel.  You may also do this on the fly by setting the
          DEBIAN_REVISION environmental variable.  It is important that you
          choose the revision number in such a way that a generic kernel-
          image package will not override the custom package while using
          dselect (or `dpkg -BOGiE').  I recommend a two-level scheme where
          the major level starts with a letter.  One such scheme is your
          (short) host name followed by a dot (.) and a number.  For
          example, if your machine is named myhost, you would use
          --revision myhost.1 in the command line.  If you had to rebuild
          your custom kernel, you would use --revision myhost.2 and so on.
          See /usr/doc/kernel-package/README.gz for more information on
          revision numbers.

     3)   To build the PCMCIA modules, execute:
               make-kpkg --revision number modules_image
          where number is the same revision number used to build the
          kernel-image package in the previous step. This will generate a
          pcmcia-modules-<kernel version> deb file in the parent directory.

     4)   Install the two newly created deb files (you can use `dpkg -i
          file').

     If you are not using make-kpkg:

     If your kernel is compiled with CONFIG_MODVERSIONS enabled, for kernel
     symbol version checking, the configure script will check for the
     existence of /usr/include/linux/modversions.h, the symbol version
     database.  This is created by running `make dep' (in addition to `make
     config) in the kernel source tree.

     1)   Ensure that the kernel source tree is in the /usr/src/linux
          directory and ensure that it is configured (execute `make config
          dep' in the /usr/src/linux directory).

     2)   Unpack the pcmcia-cs sources and go to the root directory
          (/usr/src/modules/pcmcia-cs in the pcmcia-source package).

     3)   Execute as root `debian/rules binary-modules.'  This will
          generate a pcmcia-modules-<kernel version> deb file in the parent
          directory.

     Note: The location of the kernel source tree may be specified by
     supplying the KSRC variable as a command line option.  For example, if
     the kernel source is located in /usr/local/src/kernel-2.0.0, the
     proper command would be
          debian/rules KSRC=/usr/local/src/kernel-2.0.0 binary-modules

To recompile the PCMCIA utility programs:

     This should not be necessary, since the generic pcmcia-cs package
     supplied by Debian should be compatible with all pcmcia-
     modules-<kernel version> packages (including custom built packages)
     with the same version number.  However, if you need to build a
     complete set of PCMCIA modules and utilities--to use a newer upstream
     version, for example--you can use the following procedure:

     1)   Ensure that the kernel source tree is in the /usr/src/linux
          directory and ensure that it is configured (execute `make config
          dep' in the /usr/src/linux directory).

     2)   Unpack the pcmcia-cs sources and go to the root directory
          (/usr/src/modules/pcmcia-cs in the pcmcia-source package).

     3)   Execute as root `debian/rules binary-cs.'  This will generate the
          pcmcia-cs deb file.

     Note: The location of the kernel source tree may be specified by
     supplying the KSRC variable as a command line option.  For example, if
     the kernel source is located in /usr/local/src/kernel-2.0.0, the
     proper command would be
          debian/rules KSRC=/usr/local/src/kernel-2.0.0 binary-cs