Installation instructions for omnibook module
=============================================

 This file explains how to install omnibook module from its sources.

 This package is designed to be built with Linux kernel 2.4.x
 (2.4.17 - 2.4.22 were tested).

Step 1

  You must have full configured source for the Linux kernel which you
  want to use for the omnibook module. Note that omnibook module is part
  of the kernel, so there is necessary to resolve all symbol dependencies
  between the used kernel and omnibook code. Partly installed kernels
  (for example from distributor makers) can be unuseable for this action.

  You need same C compiler to kernel was compiled with (eg. gcc3 for gcc3 
  compiled kernels) and GNU make.

  (from Gabriele Vivinetto <gabriele.mailing@rvmgroup.it>)
  You also need the entire kernel source tree installed (eg. under
  /usr/src/linux). You need that the correct symlink
  /lib/modules/x.y.z/build -> where_your_kernel_source_installed is set
  (where x.y.z is yor running kernel version that can be printed typing
  uname -r).
  You must have built a kernel within your installed kernel source tree.
  If you haven't made it before it is sufficient to enter /usr/src/linux
  and type
	make mrproper
	make clean
	make config
  If you don't do this you'll receive a lot of error messages when building
  the modules and you can't obtain omnibook.o.
  
  The "Debian trick"
  (from Gabriele Vivinetto <gabriele.mailing@rvmgroup.it>)

  If you have to compile the module under Debian woody 3 you need an extra
  step.
  Kernel version for woody with kernel 2.4 is 2.4.18-bf2.4 (could be printed
  with uname -r)
  Edit /usr/src/linux/Makefile and add the value for the variable EXTRAVERSION
  =-bf2.4 in the fourth line of the file.
  If you don't do this, you will compile a module that has version 2.4.18 not
  2.4.18-bf2.4 and connot be used.
  If you correctly modify the Makefile, the module has the correct version of
  the running kernel 2.4.18-bf24 and could be loaded.

  To build the module simply run `make' in the directory of omnibook module
  sources. It will build omnibook.o kernel module.

Step 2

  Run `make install' as the super-user. This will install omnibook.o kernel
  module into modules directory of your currently running kernel
  (usually in /lib/modules/version_of_your_kernel) and runs `depmod -a' to
  rebuild module dependency database.
  You may install and load the module with `make load' command. In this case
  you may skip Step 3.

Step 3

   Load the installed module with `insmod omnibook' command. It will
   enables the OmniBook features on your machine.
   To unload module issue an `rmmod omnibook' command. It will disable the
   OmniBook features and unload the module.

Step 4 (optional)

   Edit your startup scripts (eg. /etc/rc.local or /etc/rc.modules) or
   create an initial ramdisk (initrd) to load this module at boot time.

Step 5 (optional)

   You may integrate omnibook stuff into your kernel source by `make kpatch'
   command. It will patch your kernel source tree.
   Note: it depends on your kernel version and may fail.
   If you want to patch another kernel source you may use the following
   command:
      make "KSRC=/path/to/your/kernel/source" kpatch

Step 6 (optional)

  Run `make clean'. This will remove all objects and binary files, leaving
  the source. If you have no need for the source, you may simply delete it.
  Note that you have to keep the source to be able to do a `make uninstall'
  or you have to unistall the module manually.
  Note: It does not remove omnibook stuff from your kernel sources.
