Hi All, My question is directed at those with kernel compiling experience. I have a driver source xxxxx.c file and a Makefile with it. I want to recompile the kernel to include the driver and rebuild the initrd.img. 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. 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? [cid:image001.jpg at 01C9F4CF.43AAE290]<http://www.pinnacle.co.za/> Chadley Wilson | Research and Development Engineer Research and Development | Pinnacle Micro Direct: +27-11-265-3020 | Fax: +27-11-265-3277 chadley at pinnacle.co.za www.pinnacle.co.za<http://www.pinnacle.co.za/> Proline Computers<http://www.pinnacle.co.za/proline/> | AMD<http://www.pinnacle.co.za/hardware/products/?brand=28> | Apacer<http://www.pinnacle.co.za/hardware/products/?brand=29> | Canon<http://www.pinnacle.co.za/canon/> | Dicota<http://www.pinnacle.co.za/hardware/products/?brand=67> | D-Link <http://www.pinnacle.co.za/networking/products/?brand=37> | Hauppauge!<http://www.pinnacle.co.za/hardware/products/?brand=69> | Hitachi<http://www.pinnacle.co.za/> | IBM<http://www.pinnacle.co.za/> | Intel<http://www.pinnacle.co.za/hardware/products/?brand=27> HP<http://www.pinnacle.co.za/systems/> | Lenovo<http://www.pinnacle.co.za/hardware/products/?brand=34> | Lexmark<http://www.pinnacle.co.za/imaging/> | LG<http://www.pinnacle.co.za/hardware/products/?brand=34> | Logitech<http://www.pinnacle.co.za/hardware/products/?brand=12> | Mapower<http://www.pinnacle.co.za/> | Microsoft<http://www.pinnacle.co.za/hardware/products/?brand=15> | MSI<http://www.pinnacle.co.za/hardware/products/?brand=26> | RiDATA<http://www.pinnacle.co.za/ridata/> | Samsung<http://www.pinnacle.co.za/pos/products/?brand=56> | Senao<http://www.pinnacle.co.za/hardware/products/?brand=95> | Sony<http://www.pinnacle.co.za/hardware/products/?brand=30> | Spectra Logic<http://www.pinnacle.co.za/storage/products/?category=251&brand=63> Sunnix<http://www.pinnacle.co.za/pos/products/?brand=71> | Super Micro<http://www.pinnacle.co.za/systems/products/?category=224> | Symantec<http://www.pinnacle.co.za/> | Motorola/Symbol<http://www.pinnacle.co.za/symbol/> | Western Digital<http://www.pinnacle.co.za/hardware/products/?brand=31> | Zebex<http://www.pinnacle.co.za/pos/products/?brand=73> | Zebra<http://www.pinnacle.co.za/pos/> Electronic Communications Disclaimer<http://www.pinnacle.co.za/general/terms.asp> (c) 2008 Pinnacle Micro ________________________________ Pinnacle Technology Holdings E-Mail Disclaimer: This e-mail is confidential and intended solely for the use of the individual(s) to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of Pinnacle Technology Holdings any of it's divisions or affiliates. If you are not the intended recipient, be advised that you have this e-mail in error and that any use, dissemination, forwarding, printing, or copying of it is strictly prohibited. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20090624/26e23211/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 6753 bytes Desc: image001.jpg URL: <http://lists.centos.org/pipermail/centos/attachments/20090624/26e23211/attachment.jpg>
Hi, 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 driverYou may not need to recompile the kernel, instead compile your driver only. There are (extensive) instructions for how to do it here: http://wiki.centos.org/HowTos/BuildingKernelModules 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: http://wiki.centos.org/HowTos/Custom_Kernel> 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 default.> 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: http://www.centos.org/modules/tinycontent/index.php?id=16. Your 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 instead. HTH, Filipe