-------------------------------------------------------------------------------
PRODUCT INFORMATION
-------------------------------------------------------------------------------

This package contains the Kontron JIDA32 driver for Linux as well as the 
required interface libraries and some demo applications.

Product Version: JIDAR117_L116


Full information about the JIDA32 package and the usage of the JIDA32 interface
can be found in the file Jida32.pdf.
For build and installation instructions, please read the following sections. 

-------------------------------------------------------------------------------
BUILD AND INSTALLATION INSTRUCTIONS
-------------------------------------------------------------------------------

Please note that the JIDA32 package does not include full sources. Instead, pre-
compiled objects are provided that can be used to build a JIDA32 package for 
a certain environment (GCC, kernel, libc).

In order to handle GCC version incompatibilities and different kernel module 
build environments, the package includes different branches:
                                                
                               -- GCC_2.x.x -- KERNEL_2.2.x_2.4.x
                              |
                              |                
JIDA32R116_L114 - JIDA_USER -                 
                              |                - KERNEL_2.2.x_2.4.x
                              |               |
                               -- GCC_3.x.x --
                                              |
                                               - KERNEL_2.6.x

Note: You can use the GCC_3.x.x subdirectory for GCC 4.x.x compiler versions.

Under each brach four subdirectories can be found:

JidaDrv	 :	Includes the necessary source, library and build files to create 
            the JIDA32 kernel driver module (jida.ko for kernels 2.6.x, jida.o
            for kernels 2.2.x and 2.4.x).

JidaLib  :	Includes the necessary source, library and build files to create 
		the JIDA32 interface library (libjida.so, libjida.a).

JidaTst  :	Includes the necessary source and build files to create a simple
		JIDA32 test application (jidatst). 

JWdogTst :	Includes the necessary source and build files to create a simple 
		watchdog test application (jwdogtst).

In order to build the JIDA32 kernel driver module (jida.ko/jida.o), you must 
install the complete kernel sources for the destination kernel under
/usr/src/linux or alternatively provide an environment variable KERNELDIR that
contains the path of the kernel sources.
kernel sources.
After installation of the sources please configure, build and install the 
respective kernel and modules on your system.
Having done so, please reboot and start the system using the new kernel.

In order to build the JIDA32 kernel driver, interface library and test
applications, go to the
./JIDAR116_L114/JIDA_USER/'GCC_VERSION'/'KERNEL_VERSION' directory and  
enter 'make all'.

In order to automatically copy the created files to their destination
directories please enter 'make install' afterwards.
This will copy the following files:

jida.ko		to	/lib/modules/$(KERNELRELEASE)/extra/	(for kernel 2.6.x)
  or
jida.o		to 	/lib/modules/$(KERNELRELEASE)/misc/		(for kernel 2.2.x/2.4.x)

libjida.so +
libjida.a	to	/usr/lib/

jidatst +
jwdogtst	to	/usr/bin/

Jida.h +
JWinDefs.h	to 	/usr/include/

You can provide a prefix for the above named directories with the 
INSTALL_MOD_PATH environment variable, if you want to install the files into
an alternative root file system. (Note: kernel 2.6.x only)

After successfull build and installation you should run the sample application 
jidatst, which will display the following message:

JIDA system driver is incompatible or not installed.
Would you like to install it? (yes or no)

If you answer this question with 'yes' or 'y', the device node /dev/jida will
be created and the driver module loaded.
Afterwards some basic JIDA32 test calls will be performed which display their 
results on the screen. If you see this output, the JIDA32 interface is
operational.

Note: JIDA won't be detected automatically on kernel startup. You have to
      load it by yourself. You can either use the JidaDllInstall function to do
      it or use "modprobe jida" before starting your application.
      Most Linux distributions provide other possibilities to automatically
      load kernel modules.
      For Debian simply add a line with "jida" to the /etc/modules file.

UDEV note: If you are using udev with a 2.6 kernel the device node will
           automatically be created. The default major/minor will be 10/250
           which is reserved for local use. If this is conflicting with your
           own driver you can redefine the minor id to something else by
           providing the minor=x parameter when loading the module.
                Example: modprobe jida minor=254

If you have problems running JIDA please check if the device node /dev/jida is
created with the correct major/minor number and is accessible by the active
user. Since version JIDAR115_L113 we are using 10/250 for device nodes if a
kernel of the 2.6.x branch is used. JIDA drivers for older kernels or JIDA32
revisions use 99/0 for the device node.
