How do I recompile the kernel?

Neil Cherry ncherry at comcast.net
Mon Feb 13 06:48:44 UTC 2006


Jeff Vian wrote:
> On Sun, 2006-02-12 at 23:14 -0500, Neil Cherry wrote:
>> URL source:
>> http://fedora.redhat.com/docs/release-notes/fc4/errata/#sn-kernel
>>
>> This has to be the dumbest question I can ask. I've googled and
>> I found all sorts of way to compile the kernel for Fedora.
>> Unfortunately they all seem to be wrong or missing details.
>> So how does one build an FC4 kernel?
>>
>> Kernel: 2.6.15-1.1831 (kernel & kernel-devel)
>>
> Download and install the src rpm from 
> http://download.fedora.redhat.com/pub/fedora/linux/core/updates/4/SRPMS/kernel-2.6.15-1.1831_FC4.src.rpm
> then compile to your heart's content.

ARGH! It official, I'm an a**! Honest I've been trying to compile
this kernel for a while and I've been getting all sorts of errors
and stuff has been put all over the place (hmm, I did remove the
.rpmmacro file too). Anyway, I did downloaded the src and I have
yum download both (I need Moxa drivers). I think half the
problem is that I messed things up and the other half is that
there is too much wrong or outdated info on Google. Here's
what I did so far:

wget 
ftp://ftp.linux.ncsu.edu/pub/fedora/linux/core/updates/4/SRPMS/kernel-2.6.15-1.1831_FC4.src.rpm
rpm -ihv ~/kernel-2.6.15-1.1831_FC4.src.rpm

# cd ../BUILD/kernel-2.6.12/linux-2.6.12/

cd /usr/src/redhat/SPECS
rpmbuild -bp --target=i686 kernel-2.6.spec
cd ../BUILD/kernel-2.6.15/linux-2.6.15/
make xconfig
make rpm

And when it's done I'll do this:

cd /usr/src/redhat/RPMS/i386/
rpm -ivh kernel-2.6.15prep-1.i386.rpm
cd /boot
mkinitrd initrd-2.6.15-prep.img 2.6.15-prep

Thanks for the help and I hope that others find the above useful.
If it's incorrect I'll post the corrections (for my sanity as
well as others).

-- 
Linux Home Automation         Neil Cherry       ncherry at linuxha.com
http://www.linuxha.com/                         Main site
http://linuxha.blogspot.com/                    My HA Blog
http://home.comcast.net/~ncherry/               Backup site




More information about the fedora-list mailing list