GRLIB driver library
====================
The purpose of the GRLIB Driver package is for Cobham Gaisler to provide
Linux drivers for GRLIB cores that does not really benefit from being part
of the official kernel tree. SpaceWire for example does not have a driver
model.

Drivers can be built outside of the kernel source tree as modules or
within the kernel by installing the drivers into the kernel sources tree.
Currently Makefiles for building outside of the kernel tree is not included,
so for the time being please install the driver sources into the kernel.

After installing the package into the kernel source tree a menu named
"GRLIB Drivers" will appear in the bottom of the "Device Drivers" directory
in the kernel configuration GUI. The Kernel Configuration GUI is invoked
as normal, for LEON e.g.
 [linux/]$ make ARCH=sparc CROSS_COMPILE=sparc-linux- xconfig

See manual for more information.

Drivers included in Package
===========================
 * GRSPW2 Kernel Library (for custom kernel driver, or GRSPW Driver)
 * GRSPW2 Driver (Char device accessible from Linux user space)
 * GRSPW-ROUTER APB Register Driver
 * MAPLIB, Device memory handling. Enables a user to memory map blocks of
   linear memory that can be used by device drivers for DMA access. GRLIB 
   Drivers that implement zero-copy to user-space and between device nodes
   though user-space require the MAPLIB char driver.


Requirements
============
The GRLIB Drivers package is built against one specific Linux release, it
is expected that drivers may fail to build or does not function properly
if used under another Linux version. The kernel that must be used is taken from
www.kernel.org and may require patching using the Cobham Gaisler
"unofficial LEON patches" distributed until they are included in the official
kernel tree.

Please check which GIT commit version is required in the VERSION file.


Installing GRLIB Drivers to Kernel source tree
==============================================
Copy the this directory into the linux/drivers directory and
name it grlib, then add the newly added grlib directory to the Linux build
files (drivers/Makefile) and to the kernel configuration GUI (drivers/Kconfig)
by applying the patch an appropriate add_grlib_tree-X.Y.patch from the linux
source code base directory, e.g.
 $ cd linux
 $ patch -p1 < drivers/grlib/add_grlib_tree-5.10.patch
