PDA

View Full Version : kernel recompile



phil.b
28-11-2004, 10:52 PM
if i compile a 2.6.9 kernel to get rid of support for the stuff i haven't got, can i use a iteraid.o file made for the 2.4 kernel in the compile of the 2.6 kernel. If so how do I do it please. I know how to recompile a kernel but not how to add things to it

Phil

beama
29-11-2004, 12:20 PM
bump

Graham L
29-11-2004, 03:19 PM
Any ".o" file is a compiled object file ... and in this case is a driver. Because drivers work so closely with the kernel, they really need to be compiled with the kernel they'll be used with. One compiled with a 2.4 kernel is unlikely to work with a 2.6, because of the major changes between 2.4 and 2.6 .

You could try using it ... have a browse in the /lib/modules tree, which is where modules are placed with the "make modules_install". You willl find somewhere appropriate to put it. But usually, there's internal identification in modules so they can't be loaded in a "foreign" version system.

Distribution kernels usually have modules for almost evrything, so the kernel is fairly compact, and modules are loaded for things as they are found. So the main reason to roll your own is to compile in support for your disks, to save a small amount of time when booting.

The configuration process for the kernel compile alllows you to add as well as remove support for thing. Have a hard look at all the areas ... many items allow you to choose "no support", "module support" , "compiled in support".

After the kernel compilation you just do "make modules", then "make modules_install" .

I haven't looked in 2.6 yet, but after configuring, it has been a good idea to edit the file /usr/src/linux/Makefile ... about the thrid or fourth line lets you specify a subscript to the version number. This way you can identify different attempts at the perfect kernel. ;-)