Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-12-2007, 08:59 AM   #1
Registered: Jun 2006
Distribution: Kubuntu Hardy
Posts: 94

Rep: Reputation: 15
Rebuilding Linux kernel in Fedora 7 without recompiling everything

I built an i686 binary of the Linux kernel under Fedora 7 after installing the SRPM, then going to /usr/src/redhat/SPECS and typing rpmbuild -ba --target=i686 kernel-2.6.spec .

I made a modification to one source file (in drivers/acpi/osl.c) and I want to rebuild the kernel to test it. If I'm not mistaken, rpm -ba... will completely rebuild everything, and 'make' inside the /usr/src/redhat/BUILD/kernel-2.6.22 directory will probably not package the kernel like rpm -ba does. How do I recompile this small part without causing it to spend a dozen hours rebuilding the entire kernel + modules?
Old 09-12-2007, 09:12 AM   #2
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
Make should be smart enough to only recompile what is necessary before linking. But, how is your kernel taking dozens of hours to compile? Even on my old Pentium it wouldn't take much more than an hour. If rebuilding the whole thing is just a function of the RPM build thingy, than I can't help, sorry for wasting your time

Last edited by 95se; 09-12-2007 at 09:14 AM.
Old 09-12-2007, 11:11 PM   #3
Registered: Jun 2006
Distribution: Kubuntu Hardy
Posts: 94

Original Poster
Rep: Reputation: 15
But, how is your kernel taking dozens of hours to compile?
When you compile the Fedora kernel RPM, it also compiles a bunch of modules, too, I think. It takes much longer to compile the Fedora kernel RPM than it takes to build the kernel from the vanilla tarballs. (I could probably get a faster compile by disabling debug info, though).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
recompiling new kernel in fedora 3 x2aws Fedora 12 02-14-2005 08:36 AM
rebuilding kernel the Fedora way ... bpcw001 Fedora 1 10-29-2004 10:37 AM
Recompiling a fedora core 2 kernel for ntfs support fettouhi Fedora 2 08-07-2004 11:07 PM
facing problems recompiling kernel 2.6.5 in Fedora Core 2 fawkes.phoenix Linux - Newbie 4 07-02-2004 10:43 PM
Fedora Core 1 Kernel Rebuilding lmcilwain Linux - Newbie 11 01-09-2004 03:25 PM

All times are GMT -5. The time now is 11:01 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration