Flavor.txt

Synopsis - If kernel headers used in compiling the running kernel,
differ from those used subsequently in compiling an auxilliary module,
say a modem driver, than the driver and the kernel are said to be 
of different FLAVORS. Most commonly, the "mis-flavored" driver will
not function.  Manifestations will be:
"unresolved symbols" during the dependencies test:
$ depmod -a
and/or failure of the driver to load into the kernel upon:
$ insmod driver
While forcing can sometimes be effective:
$ insmod -f driver
this may crash the System. If you have an encountered these problems,
Read on for details and corrective actions. This text is Not an
adequate course.  This is much more detail in documentation systems.
  
For a single release of the kernel-sources, such as kernel-source-2.4.17,
many different kernels with optimization to hardware environments can be
compiled.  Kernel headers are intermediates in the process of compiling
kernels and the version matched kernel modules seated in /lib/modules/ .
In the sequence of generating kernel+modules:
  make mrproper
  make menuconfig OR make Xconfig
  make dep
  make clean
  make bzImage ( or alternate kernel forms/packages) and modules too.
The step
  make menuconfig OR make Xconfig
generates a readable configuration file:  /usr/src/linux/.config
and other /usr/src/linux/.filenames
which dictate the outcome of subsequent steps. The
  make dep
generates the kernel header FILENAMES.h within /usr/src/linux/include/linux/

The particular header set thus generated is but ONE possible "descendant"
of the kernel-sources-2.4.17.  Kernels+modules generated during a subsequent
  make bzImage  
are both version matched and "flavor" matched. 

Some Linux distros do Meritoriusly provide a kernel-header package matching 
their stock kernels, for each of the Flavors of the stock kernels. Others do
Not are leave their Users the task of generating their own from sources.
The problem that Newbies often encounter is the following: 
     the default configuration with which
     the kernel sources come equipped may
DIFFER FROM that used to compile the Distros stock kernel.
Then while kernel-headers will be indeed generated by:
    make dep
they will not be FLAVOR matched with the running kernel,
nor will the modem driver needed for communications.

This problem has occurred mostly in two cases for modem users.
For the Red Hat Linux distribution,
there are multiple kernel config files stored in:
   /usr/src/linux/configs
corresponding to a few different stock kernels.
There have been several cases in which the choice of the wrong
config file has been used to specify the kernel-headers.
Compiling the drivers with ./build_module succeeded including the test:
  depmod -e lt_modem
  depmod -e lt-modem lt_serial
But there is a subsequent failure during ./autoload,
which includes a tesst:  depmod -a

The cure for these failures is to properly Flavor match 
the running kernel with the kernel headers used 
in compiling the modem drivers.  This in turn requires
the correct choice of kernel config file to specify the headers,
if the headers are assembled from kernel sources are the Users PC.
See Compile-fail.txt for further details .

The second most common case is when a boot loader is used, such as Loadlin.exe,
with the boot kernel itself located outside the Linux boot partition.
When a new kernel is installed, it MUST also be copied to the
location where it will be accessed by the bootloader. 
See the Loadlin/boot_loader documentation for details.
Additionally the kernel headers used in compiling the kernel
must be used in compiling matching  modem drivers.

2001 February 06

