From: Frank Mori Hess Date: Mon, 25 Jul 2005 02:10:39 +0000 (+0000) Subject: patch from abbotti@mev.co.uk (Ian Abbott): X-Git-Tag: branch-0_7-end~25 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9ef19d5c949829454f67ef1c50b60c416df71219;p=comedi.git patch from abbotti@mev.co.uk (Ian Abbott): The class_simple interface has been removed - mostly a renaming exercise. Comedi needs to use the new interface with some compatibility stuff for older kernels. The patch has been tested on 2.4.28, 2.6.12 and 2.6.13-rc1 and seems to work. --- diff --git a/INSTALL b/INSTALL index 411d1fb0..56b077d6 100644 --- a/INSTALL +++ b/INSTALL @@ -1,183 +1,236 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free +Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. (Caching is +disabled by default to prevent problems with accidental use of stale +cache files.) + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You only need +`configure.ac' if you want to change it or regenerate `configure' using +a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not support the `VPATH' +variable, you have to compile the package for one architecture at a +time in the source code directory. After you have installed the +package for one architecture, use `make distclean' before reconfiguring +for another architecture. + +Installation Names +================== + +By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PREFIX', the package will +use PREFIX as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the `--target=TYPE' option to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. -* Linux source: - -In order to compile the Comedi modules, you will need to have -a correctly configured Linux kernel source tree. The best -way to get one is to download a tarball from kernel.org and -compile your own kernel. Comedi should work with most 2.2, -2.4, and 2.6 Linux kernels. 2.6.x kernels older than 2.6.6 are -not supported. Support for 2.0.3x is not actively maintained, -but it should work and bugs will be fixed as they are reported. - -You can also prepare a kernel source tree that matches -the kernel you are currently running if you have its config file (in -the Debian distibution the config files for the kernel-image packages -are installed into the /boot directory). The following steps will -(almost) set up your kernel sources correctly. You will also need -write permission to the kernel source directory the first time you -run comedi's configure script, so you might want to unpack the kernel -source into a directory you own. - -1) Get a copy of the kernel source that matches the kernel you are - running. Unpack it and copy your kernel config file to '.config' - in the top directory of your kernel source. -2) You might need to edit the file 'Makefile' in the kernel source. - At the top of the Makefile, the variable EXTRAVERSION is defined. - If necessary, change it to match your kernel (for example, if the command - 'uname -r' produces "2.4.16-386" then your EXTRAVERSION should be - set as 'EXTRAVERSION=-386'. -3) Run 'make oldconfig' in your kernel source directory. -4) Run 'make dep' (for 2.6 kernels, do a 'make modules_prepare' instead - or even better a full 'make') in the kernel source directory and - you are done. - -Red Hat users note: Kernel sources that are distributed with Red -Hat Linux are not supported, because they are too heavily -modified. However, there is some information in -Documentation/comedi/redhat-notes on how to use Red Hat kernels. - -* RTAI support: - -If you want to use the real-time capabilities of Comedi with -RTAI, you need to compile and install RTAI first. If you -don't install the rtai kernel modules, you may get unresolved -symbols when installing the comedi kernel modules. - -* RTLinux support: - -If you want to use the real-time capabilities of Comedi with -RTLinux, you need to compile RTLinux (both the kernel and the -modules) first. Known working versions are 2.x and 3.0. - -* Configuration: - -Configure with './configure'. './configure --help' will give the -configuration options. If the configure script does not exist -(if you checked comedi out from cvs for example), it can -be generated by running './autogen.sh'. The autoconf, automake, -autoheader, etc. tools are required to generate the configure -script (automake version >= 1.7 recommended). The --with-linuxdir -option is particularly useful, as it allows you to specify -the location of your Linux kernel source directory. If -you are using an RT-patched kernel, the --with-rtaidir or ---with-rtlinuxdir options allow you to specify -the location of your RTAI or RTLinux source directory. - -* Compiling: - -Compile using 'make'. If this fails for some reason, send the -_entire_ build log to the mailing list. Without the build -log, it is impossible to find problems. - -* Installation: - -Install using 'make install' as root. This installs the files: - - /lib/modules/<>/comedi/comedi.o - /lib/modules/<>/comedi/kcomedilib.o - /lib/modules/<>/comedi/<>.o - -You need to create device files to access the hardware from a -user process. These can be created using 'make dev'. The following -special files will be created: - - /dev/comedi0 - /dev/comedi1 - /dev/comedi2 - ... - /dev/comedi15 - -* Comedilib: - -Now would be a good time to compile and install Comedilib. Comedi -and Comedilib are completely independent, so it doesn't matter -which is installed first. - -* Running Comedi: - -To use comedi, the driver module and the core Comedi modules must -be loaded into the kernel. This is done by a command similar to - - /sbin/modprobe <> - -If your module dependencies are set up correctly, this will load -both comedi.o and your driver. If you get unresolved symbols, check -the FAQ or the mailing list archives. Also look at the man pages -for modprobe and insmod. - -In order to configure a driver module to use a particular device -file (/dev/comediN) and a particular device, you need to use the -command 'comedi_config', which is part of the comedilib -distribution. Comedi_config is invoked using - - comedi_config /dev/comedi0