PDA

View Full Version : kernel-devel vs kernel-source



daviddoria
17th April 2008, 12:55 PM
what is the difference between these packages? kernel-source doesn't seem to be available for fc8?

also, when you install kernel-devel, it seems to install stuff to /usr/src/kernels/KERNELNAME and to /lib/modules/KERNELNAME - which one should I use when installing things that require kernel source?

Thanks!
Dave

markkuk
17th April 2008, 02:38 PM
Kernel-devel includes the files required to build external kernel modules. If you want to rebuild the actual kernel, follow the custom kernel guide: http://fedoraproject.org/wiki/Docs/CustomKernel

Hlingler
17th April 2008, 06:20 PM
what is the difference between these packages? kernel-source doesn't seem to be available for fc8?

also, when you install kernel-devel, it seems to install stuff to /usr/src/kernels/KERNELNAME and to /lib/modules/KERNELNAME - which one should I use when installing things that require kernel source?

Thanks!
Davekernel packages, like most packages, are (usually) broken up into at least three separate pieces: the base package ("runtime" files) containing all of the files/libraries/executables that an ordinary user would need to use the package/programs at run-time; *-devel, which contains extra files needed to compile other software that relies upon the base package, and which most users will never need, and which are not needed at run-time; these packages are usually small, but unnecessary to run the program(s) and/or use the package, and so are not usually installed by default (hundreds or even thousands can take up HDD space unnecessarily); *-debuginfo, which contain extra files that provide debugging information; these can be extremely large packages, are not required at run-time, and are useful only for debugging if some problem needs to be diagnosed.Some packages, like the kernel, being rather important and large as a package, are further sub-divided also, in the case of the kernel with sub-packages such as kernel-headers and kernel-docs among others, which again are not required at run-time.

The source code package(s) ("SRPMs") are someting else entirely: they contain no usable programs per-se; they contain the actual source code needed to compile the base software package itself into usable files/libraries/programs, etc.; they are usually named, e.g., kernel-x.y-z.src.rpm. These "SRPMs" contain all of the source code needed to create all of the above sub-packages. There is no package named "kernel-source-x.y-z". You do not need any kernel-x.y-z.src.rpm package unless you plan to re-build the kernel itself from this source code.

In the case of the kernel, being rather important, the kernel-headers sub-package contains files that are needed to build other packages that depend on the kernel, but not the specific kernel version; you may install only one such package at a time (usually). The kernel-devel sub-packages contain the files needed to build other packages, such as kernel driver modules, that DO rely upon the specific kernel version, and which you may install multiple versions, one to match each installed kernel.

In answer to your specific question, the package(s) you want are the several kernel-devel-* packages that match your installed kernels. You should also install the (1) kernel-header package that matches your latest kernel.

Hope this rather long explanation is clear and helpful.

V