[PlanetCCRMA] Recompile kernel from src rpm
Fernando Lopez-Lezcano
nando at ccrma.Stanford.EDU
Mon Nov 29 10:56:00 PST 2004
On Mon, 2004-11-29 at 10:45, Rick B wrote:
> I want to recompile the 2.6.8.1-1.520.1vR9.ll.rhfc2.ccrma kernel to
> not include some things built into the kernel (agpgart,etc).
> Since the kernel-source isn't available on the repository what is the
> best way to do this? Sorry for my ignorance. If you have a link that
> explains how please post it. I have kernel-2.6.8.1-1.520.1vR9.ll.src.rpm
> and I know there must be a way to unpack this and recompile it.
This is a start:
http://ccrma.stanford.edu/planetccrma/software/recompilekernel.html
But it does not tell you how to change the spec file or the
configuration files. Once you unpack the kernel the sources will be in
/usr/src/redhat/SOURCES, and that includes the configuration files
(*.config), the ones I use are the *.ccrma.config.
If you want to change the configuration you can do this:
cd /usr/src/redhat/SPECS
rpmbuild -bp kernel-xxx.spec (where xxx is your version/release)
This will leave a ready to build kernel source tree in:
/usr/src/redhat/BUILD/kernel-xxx/linux-xxx
The configuration files will be in that directory configs/*.config. You
can copy the one you want to .config and do a make gconfig (or
whatever), that will eventually leave a modified config file there that
you should copy to the properly named file in /usr/src/redhat/SOURCES.
After you do that a "rpmbuild -ba kernel-xxx.spec" should rebuild the
binary with the new configuration.
Make sure you change the release number in the kernel spec file to
something other than the original one.
-- Fernando
More information about the PlanetCCRMA
mailing list