[CentOS] Building a kernel without kabichk

Terry Hull tah at nrg-inc.com
Tue Apr 14 04:04:38 UTC 2009



On 4/13/09 8:23 PM, in article
b7e478370904131823q239fb3dsd4629d1ec63614a1 at mail.gmail.com, "Kwan Lowe"
<kwan.lowe at gmail.com> wrote:

> On Mon, Apr 13, 2009 at 6:53 PM, Terry Hull <tah at nrg-inc.com> wrote:
>> I¹m trying to build a 2.6.18-128.1.6.el5 kernel without kabichk.  I have
>> downloaded the sources, installed the compiler, etc and ran the following
>> command
>> 
>> rpmbuild  -bb --target=`uname -m`  --without kabichk --with baseonly
>> --without debug \
>>     --without debuginfo kernel-2.6.spec.
>> 
>> I had modified the .SPEC file according to the WIKI page
>> http://wiki.centos.org/HowTos/Custom_Kernel
> 
> For the most part, the build instructions on the link work for me. The
> only changes I do is to install rpmdevtools first, then run
> rpmdev-setuptree to create the rpmbuild directories and .rpmmacros
> file. The x86_64 also had a requirement for the unifdef package.
Did you get it to build with kabichk turned off?

I had gotten older packages to build as below, but 128.1.6 was giving
errors.  I can get the kernel to build with kabichk turned on with no real
problems.  Also here are the kernel packages I have installed (plus the
source of course.....)

rpm -qa | grep kernel
kernel-2.6.18-92.el5
kernel-devel-2.6.18-128.1.6.el5
kernel-headers-2.6.18-128.1.6.el5
kernel-2.6.18-128.1.6.el5
kernel-2.6.18-92.1.22.el5SCST - This was the one that I built and it worked

> 
>> I have NOT installed any patches that will break KABI, but I am wanting to
>> patch the kernel for SCST, and that will do it.  Currently, I¹m just trying
>> to get the beast to build.  I have been successful getting this to work on
>> older versions like 2.6.18-92.1.22, but I have not had success with
>> ­128.1.6.  l. I have not worried about build errors at this point, because
>> I¹m hoping someone can say, ³Just do this, and all will be well.²
>> 
>> I am relatively new to CentOS / RedHat, but I do have a significant amount
>> of Linux experience building kernels.
>> 
>> I am now trying to see if I can get the kernel to build with kabi in place.
>> 
>> 
>> Any pointers would be greatly appreciated.  TIA.
> 
> Any errors?
Yes, this one from my stderr capture:

In file included from fs/ocfs2/ocfs2.h:45,
                 from fs/ocfs2/alloc.c:34:fs/ocfs2/endian.h:26: error:
redefinition of 'le16_add_cpu'
include/linux/byteorder/generic.h:174: error: previous definition of
'le16_add_cpu' was herefs/ocfs2/endian.h:31: error: redefinition of
'le32_add_cpu'
include/linux/byteorder/generic.h:179: error: previous definition of
'le32_add_cpu' was herefs/ocfs2/endian.h:41: error: redefinition of
'be32_add_cpu'
include/linux/byteorder/generic.h:195: error: previous definition of
'be32_add_cpu' was here
make[2]: *** [fs/ocfs2/alloc.o] Error 1
make[1]: *** [fs/ocfs2] Error 2
make: *** [fs] Error 2
make: *** Waiting for unfinished jobs....

That was all I found.

-- 
Terry Hull
Network Resource Group, Inc. President




More information about the CentOS mailing list