[PlanetCCRMA] Question About Compiling a Custom Kernel

Fernando Pablo Lopez-Lezcano nando@ccrma.Stanford.EDU
Sat Sep 27 18:32:01 2003


>  So far so good.
> 
>  But, I would rather use rpmbuild to get the advantage of letting rpm
>  manage my packages. However, I can't discover how to go about making
>  the changes I need to the config files using rpmbuild. I can add my
>  patch--the one that isn't in the CCRMA binary. But, I haven't been able
>  to figure out how to change the kernel config files to remove the
>  modules that get in the away of a successful build.
> 
>  I haven't found anything yet in the rpmbuild documentation about this.

Once you do a "rpmbuild -bp kernel-xxx" you get a ready to build tree in
/usr/src/redhat/BUILD/kernel-xxx. In the linux-xxx/configs subdirectory
(_and_ in /usr/src/redhat/SOURCES) you will find the configuration files
(*.config) that are used by the spec file to build the kernel. If you
know exactly which configuration options you want to remove you could
edit the file that corresponds to the architecture you are building for
(for example: kernel-2.4.22-i686.config), manually change the options
and store that file in /usr/src/redhat/SOURCES. Or you can manually copy
that file into the BUILD/kernel-xxx/linux-xxx/.config file, run "make
xconfig" (or whatever you prefer), save the configuration and then copy
it back to /usr/src/redhat/SOURCES with the proper name. If you now do
an "rpmbuild -ba kernel-xxx" the build will use the modified
configuration file. 

-- Fernando