Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-updates > by-pkgid > 552991dab4dccc6d38ee3e99b9796d19 > files > 3

kernel-doc-4.4.92-1.mga5.noarch.rpm


Third-Party Kernel Source Module Support, or
an easy way to add modules to your kernel build.



Vendors quite often add additional drivers and features to the kernel
which require nothing more than modifying Kconfig, Makefile, and
adding one or more files to a sub-directory.  As a single discrete task,
this is not a problem.  However, using patches to add modules to the
kernel very often results in patch conflicts, resulting in needless time
wastage as developers regenerate an otherwise working kernel patch.

This is designed as a solution to these problems.  It is NOT designed as
a replacement for the kernel build system, but merely as a tool for
vendors and system administrators to ease the pain of patch management.

The key feature of this system is the distinct lack of patches.  Drivers
are installed via unpacking a tarball.



Adding a directory to the build (usually from a tarball)
--------------------------------------------------------
If a directory exists inside the 3rdparty sub-directory that contains a
proper Makefile, it can be added to the build.  It also needs a
Kconfig file.

	cd /usr/src/linux-2.4.3/3rdparty
	bzcat /tmp/my-driver2.tar.bz2 | tar xf - # creates "my2" dir


Limitations
-----------
There are some limitations to this system.  This system is only
designed to support a very common case.  If you find yourself running
into limitations (kernel build experts can spot them right off),
then you should probably be patching the kernel instead of using
mkbuild.pl for that particular module.

FIXME: actually list the limitations



Other notes
-----------
Link order is controlled by the order of mkbuild.pl executions.

"make mrproper" will erase Makefile.meta, and empty Kconfig, Makefile,
and Makefile.drivers.

IMPORTANT NOTE: Because this feature modifies the kernel's makefiles and
configuration system, you MUST complete all mkbuild.pl runs before
running any "make" command.

Building in the 3rdparty dir
----------------------------

If you use modules that:
	- are contained in one subdir with the name of the module
	- has a Makefile
	- has a Kconfig file

The system calls the ./mkbuild.pl script.  It will search for
subdirectories, and will try to build each of them as a module.
Things to note:

       The dependencies will be done in a module called:

       3rdparty/<module_dir_name>/<module_name>

depending of CONFIG_<module_name_in_uppercase>.

<module_name> is the value of O_TARGET/L_TARGET.