From: David Schleef Date: Wed, 13 Jun 2001 10:22:20 +0000 (+0000) Subject: Rewrote INSTALL and README X-Git-Tag: r0_7_60~163 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bdbbb6f6f51a24ca60cdcef929e31e8c410f5402;p=comedi.git Rewrote INSTALL and README --- diff --git a/INSTALL b/INSTALL index 8b3f0411..8b7c51fe 100644 --- a/INSTALL +++ b/INSTALL @@ -1,96 +1,144 @@ -Prerequisites: - - a machine capable of compiling Linux modules - - a correctly installed kernel source tree. Specifically, - you need to have the file /usr/src/linux/.config and - /usr/src/linux/include/linux/autoconf.h. If these are - not present, you can create them by compiling a new - kernel. Some distributions don't provide these by - default. - - a 2.2 or 2.4 series kernel. 2.0.38 may also work, but - it's not actively maintained. (But feel free to try it - and report problems.) - -Configure using 'make'. The first time you run make, it will take -you through configuration options similar to compiling a linux -kernel. If you need to run the configuration again, use 'make config'. -Red Hat users note: Red Hat does not ship with kernel headers -capable of compiling Comedi. You either need to install the -kernel source RPMs, or download a kernel tarball and build a -new kernel. - -Make the dependency list by running 'make' again. - -Compile using 'make'. If this doesn't work, make sure you have the -basic tools installed to compile. If you can successfully compile -other things, consult the author, as he has probably made a mistake. +* 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. Kernel sources that are distributed +with Red Hat Linux are not supported, because they are too +heavily modified. Comedi should work with most 2.2 and 2.4 +Linux kernels. 2.0.3x may also work, but support for this +is not actively maintained, but bugs will be fixed as they +are reported. + +* RTAI support: + +If you want to use the real-time capabilities of Comedi with +RTAI, you need to compile and install RTAI first. It is +necessary to use the rthal patch instead of the "copyto" +scripts. Known working versions are RTAI-1.6, RTAI-24.1.4, +and current RTAI CVS. Remember to enable Kcomedilib support, +since you will be accessing Comedi from other kernel modules. + +* RTLinux support: + +If you want to use the real-time capabilities of Comedi with +RTAI, you need to compile RTLinux (both the kernel and the +modules) first. Known working versions are 2.x and 3.0. +Remember to enable Kcomedilib support, since you will be +accessing Comedi from other kernel modules. + +* Configuration: + +Configure using 'make'. This will ask you the location of the +Linux kernel source tree. If it detects that you have a kernel +patched for RTAI or RTLinux, it will also ask you for the location +of the RTAI or RTLinux source directory. Then the configuration +script will ask questions for a couple general Comedi features +and then whether or not compile each driver. + +* 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/<>/misc/comedi.o - /lib/modules/<>/misc/kcomedilib.o - /lib/modules/<>/misc/<>.o + + /lib/modules/<>/misc/comedi.o + /lib/modules/<>/misc/kcomedilib.o + /lib/modules/<>/misc/<>.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/comedi3 -To use comedi, the driver module must be loaded into the kernel. -In general, this is done by a command similar to + /dev/comedi0 + /dev/comedi1 + /dev/comedi2 + /dev/comedi3 + +* 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 <> + /sbin/modprobe <> If your module dependencies are set up correctly, this will load -both comedi.o and your driver. See the man pages for modprobe -and insmod for more details. +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. -The default behavior when the module is loaded is to _not_ configure -it automatically, i.e., you have a device file (/dev/comedi0) associated -with a driver, but the driver is not associated with a device. To -associate a device file/driver with a device, you need to run the +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 /usr/sbin/comedi_config, which is part of the comedilib -distribution. This is also used to supply additional information, -such as I/O address, IRQ, and possibly DMA channels. The following -commands are examples: +distribution. Comedi_config is invoked using - /usr/sbin/comedi_config /dev/comedi0 dt282x 0x240,3 - /usr/sbin/comedi_config /dev/comedi1 ni_atmio 0x260,4 - /usr/sbin/comedi_config /dev/comedi2 dt2817 0x228 - /usr/sbin/comedi_config /dev/comedi0 ni_pcimio + /usr/sbin/comedi_config /dev/comedi0