[CentOS] Compile driver for new kernel rpm
filbranden at gmail.com
Wed Jun 24 12:46:15 UTC 2009
On Wed, Jun 24, 2009 at 07:29, Chadley Wilson<chadley at pinteq.co.za> wrote:
> I have a driver source xxxxx.c file and a Makefile with it.
> I want to recompile the kernel to include the driver
You may not need to recompile the kernel, instead compile your driver
only. There are (extensive) instructions for how to do it here:
If building the driver without adding it to the kernel does not work,
and you really think you should build a new kernel package that
includes the driver, see these instructions instead:
> and rebuild the initrd.img.
This should be a matter of running "mkinitrd" with the right
parameters. If you include a line for your driver in
/etc/modprobe.conf it should be included in new initrd.imgs by
> Where do I copy the file in the kernel sources?
> I currently have it in a sub folder of the drivers directory in the kernel
> source folder.
This would be usually said in the driver's documentation, but what you
said implies there is none... If that works for you just go ahead...
> There is one more question if I may, it does not have a xxxx.h (header file)
> do I need it? The driver does compile perfectly without it. But I am not
> sure if I need to compile it into the kernel?
I don't think it would be required.
By the way: when posting to this mailing list, please send e-mails
with text only and not HTML. This is the first requirement in
Guidelines for CentOS Mailing List, see this page:
e-mails also include a silly disclaimer which I believe was already
topic of discussion a little while ago. If you can't control HTML
format, company logo image and disclaimer in your company's e-mail
address, I strongly suggest that you get a free e-mail account (I use
and recommend GMail) and subscribe to the lists using that address
More information about the CentOS