[CentOS] wiki howto on custom kernel

Alfred von Campe alfred at 110.net
Tue Mar 13 13:49:12 UTC 2007

On Mar 12, 2007, at 14:43, Johnny Hughes wrote:

My ISP must have been having some problems yesterday, because replies  
to my last post arrived up to 8 hours before my post.  So thanks for  
all the responses, and sorry for not replying sooner.

> You can put the /rpmbuild directory anywhere you want ... edit
> the .rpmmacros file in the "builder user's" home directory and adjust
> the the %_topdir to where you want to build ... mine looks like this:
> %_topdir        /home/hughesjr/rpmbuild
> Make sure the "build user" has rw permissions in the rpmbuild dir.

Great, thanks.  I worked around this be creating a local rpmbuild  

> Did you do "make oldconfig" with the old config file?

Nope, I just followed the instructions in the CentOS HowTo.

> you might also want to ensure you are using the correct target and
> arch .. I do this:
> rpmbuild -bp --target i686 kernel-2.6.spec
> the go to the linux directory under BUILD ... and copy the
> configs/kernel-xxxx.config file into .config

That's exactly what the HowTo says to do.

> If this is C4 .. you can take that .config file that you saved and  
> move
> it directly into SOURCES to use (replace the current one of that
> type ... OR name it something else and modify the spec file to use the
> new name as a source).

Again, the HowTo mentioned this as well.  The part that confused me  
is that running make menuconfig (or xconfig) starting with the config  
file copied from the SOURCES directory produces a very different  
config file (as shown by diff).  But it turns out that this config  
file is identical to the original config file in the BUILD directory  
except for the changes made during the menuconfig/xconfig.  So what  
is the use in copying the config file from the SOURCES to the BUILD  

> If this is C5 (or FC5/6) you will need some stuff added to the top of
> the config file to get it to work ... but on C4, you can use the  
> config
> directly from make menuconfig (xconfig) as a kernel config file.

I will probably have to rebuild the kernel again after CentOS 5 is  
released to enable support for the additional serial ports, unless  
this is already the default in the new kernel.  And if there are some  
things that need to be added to the config file in C5, I'm sure that  
the Wiki HowTo gets updated (you guys do a great job -- thanks!).


More information about the CentOS mailing list