
Comedi has a mailing list.  Send "subscribe comedi" to
majordomo@stm.lbl.gov to subscribe.

If you are upgrading from a previous version, see the upgrade notes
below.

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.0, 2.2, or 2.3 series kernel.  Some development
	  kernels may not work, since I don't keep very good
	  track of them.

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'.

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.

Install using 'make install' as root.  This installs the files:
	/lib/modules/<<kernel version>>/misc/comedi.o
	/usr/sbin/comedi_config
	/usr/lib/libcomedi.so.0.3
	/usr/include/comedi.h
	/usr/include/comedilib.h
If you chose to install in /usr/local instead, it will, of course,
install in /usr/local instead of /usr.  The module is still installed
in /lib.

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

	/sbin/insmod /lib/modules/misc/comedi.o

The module must now be told what hardware you have, each board's I/O
address, IRQ, and possibly DMA.  The following commands work for me:

	/usr/sbin/comedi_config /dev/comedi0 dt282x 0x240,3
	/usr/sbin/comedi_config /dev/comedi1 atmio-E 0x260,4
	/usr/sbin/comedi_config /dev/comedi2 dt2817 0x228

Try a '/usr/sbin/comedi_config -h' for information on how to use
this utility.  IRQs can be automatically detected for some hardware,
although this is not recommended, for the same reasons as other
hardware.

You will probably want to put appropriate insmod and comedi_config commands
into a script that will be executed at boot, such as /etc/rc.d/rc.local.

To write programs that use comedi, look at examples in the demo/ and
the documentation in the doc/ directory.


Upgrading:

From versions prior to 0.6.0, you will need to edit and recompile
all programs that use comedi or comedilib, since the names of
functions and ioctls have changed.  See doc/new_060 for migration
information.

From versions prior to 0.5.0, you will need to recompile all programs
that use comedi or comedilib, since the interface to both of these has
changed.  No changes should need to be made to the source of the
programs.  The format for parameters of comedi_config has changed.

From versions prior to 0.4.0, you will need to run 'make dev' again
to recreate /dev/comedi*, since the major number has changed.

