Click to See Complete Forum and Search --> : What does pathching the kernel mean??
rmvinodh123
05-10-2007, 01:20 PM
I am new to Linux and i need some help about patching the kernel,want to know what it is and why is it done.
If a new hardware(and its driver) is released by a manufacturer and suppose that hardware is not supported by my kernel. Will the problem be solved if the user downloads that driver and installs it??
How does a kernel developer solve this problem, say if he wants to include support for these new hardware(assuming he has their corresponding drivers).
Is this what happens in the new releases of the kernel?
Thanks in advance.
neuron
05-11-2007, 06:15 AM
Well, patching the kernel should mean applying some changes to the code and recompiling it, so a patch might add a chunk of code to the kernel source code tree or remove a part or alter it to make some change in the behavior of the kernel which might or might not be related to hardware.
Installing a new driver in linux, _usually_ means loading some object into the kernel that tells the kernel how to handle this or that hardware, this is called a module, you can see those with lsmod, it is also possible to have this object compiled as part of the kernel rather than a module that is loaded into it.
Now the code for the module, when and if its free software, it might be included in the linux kernel source code tree at some point, possibly among hundreds of other changes.
The code/module/driver might be a patch that needs to be applied against the kernel source code and the kernel would need to be compiled, or might be a module that should be compiled against the kernel headers/source and the loaded into the kernel, or might be pre-compiled module that is loaded into the kernel.
... i think ...
je_fro
05-11-2007, 06:59 AM
Yeah, like neuron explained: a patch is basically a text file that details which files should be changed, and what changes to make. You may be reading some old info that says to patch your kernel...but it's far easier to install the latest (as of now linux-2.6.21) kernel. It probably has support for whatever device you're trying to get working.
What device is it anyway?
rmvinodh123
05-11-2007, 08:16 AM
Thanks for the replies, let me be more specific i have been working on a assignment which involved compilation of drivers to get a ".ko" object module.
Now how do i load this module into the kernel (i have to do this for more than 1 driver)?
Thanks once again.
Parcival
05-11-2007, 08:55 AM
Now how do i load this module into the kernel (i have to do this for more than 1 driver)?
This link should be helpful (http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=7#doc_chap5). Adapt it to your settings.