From: Richard Ebling <email@example.com>
From: "Daniel B. Haun" <firstname.lastname@example.org>
These notes currently apply to the 2.2.X kernels. Ymmv on 2.4.x
As bugz, 'features', and new devices are added to Linux, the 'standard' method of applying them is to simply upgrade the kernel to the latest release. Ala 2.2.14 to 2.2.18 etc. This is covered well in Kantoine's recompiles.
Between each release of the kernel, obviously, some work has been carried out on either fixing A driver, or creating a new one for a new 'device'.
The absolute bottom line is:
Merging foreign source.
There is nothing illegal or wicked in doing this, you are simply one step ahead of the kernel developers.
The steps here are indicative of how to merge new source code into the /usr/src/linux/driver tree.
The intention is, _when_ you recompile your kernel, your updated or new source code for A driver is automatically included.
The example shown is for a fictitious network card called zap.
the driver tree begins at /usr/src/linux/drivers/
Since the example is for a network card, work in the /usr/src/linux/drivers/net directory. If this example were for a scsi device, figure out the obvious.
copy zap.c source code into this ~/net directory
If zap.c is a never seen before, file:
edit the Makefile in the ~/net directory
scan down until you find the magic sentence
Immediately after this statement enter
M_OBJS += zap.o
If the new zap.c source is simply something overwiting an older version, you have nothing to do!
Recompile, and Enjoy