1. Get the kernel.src.rpm. Example for fedora core 4 would be
wget http://download.fedora.redhat.com/pub/fedora/linux/core/updates/4/SRPMS/kernel-2.6.12-1.1447_FC4.src.rpm2. Unpack the .src.rpm with:
rpm -ivh kernel-x.x.x.src.rpm
Now you will find the following:
- The spec file is in /usr/src/redhat/SPECS
- the sources & patches are in /usr/src/redhat/SOURCES
3. Now to patch the source tree do the following:
rpmbuild -bp --target=i686 /usr/src/redhat/SPECS/kernel-2.6.spec
Now the patched source tree is in /usr/src/redhat/BUILD. In BUILD you will find a directory with the kernel version. Change to that dir.
4. In your kernel versions build dir modify the .config file to your liking. Then build your modified kernel.