[CentOS] kernel sourcecode ?

Karanbir Singh mail-lists at karan.org
Wed Oct 19 19:50:49 UTC 2005


Hi Linus,

Linus Hicks wrote:
>> The Kernel sourcecode is not like kernel-source.  It is a noarch rpm
>> that does not get arch specific patches added to the source, making it
>> relatively worthless as a package for building kernels.
> Note that alternatively, you can make your own kernel-sourcecode rpm by 
> editing the spec file once you install the .src.rpm. You will see 
> several "%define"s right near the front, one of which is "buildsource" 
> and by setting that to "1" (and I usually set the others to "0" so it 
> won't take so long), rather than doing the rpmbuild -bp, you can then do 
> something like:
> 
> rpmbuild -bb --target i686 kernel-2.6.spec
> 
> and you will get your own kernel-sourcecode rpm in the RPMS/<arch> 
> directory.

As Johnny already pointed out in his post - the kernel-sourcecode rpm 
that you generate using this method will not really be the kernel source 
that reflects the real state of the binary kernel.

Try building a kernel out of this source, compare with the binary kernel 
built out of the .src.rpm and the point is easily demonstrated.

- K



More information about the CentOS mailing list