LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 09-12-2007, 07:59 AM   #1
JoeyAdams
Member
 
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, 08:12 AM   #2
95se
Member
 
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 08:14 AM.
 
Old 09-12-2007, 10:11 PM   #3
JoeyAdams
Member
 
Registered: Jun 2006
Distribution: Kubuntu Hardy
Posts: 94

Original Poster
Rep: Reputation: 15
Quote:
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).
 
  


Reply



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 07:36 AM
rebuilding kernel the Fedora way ... bpcw001 Fedora 1 10-29-2004 09:37 AM
Recompiling a fedora core 2 kernel for ntfs support fettouhi Fedora 2 08-07-2004 10:07 PM
facing problems recompiling kernel 2.6.5 in Fedora Core 2 fawkes.phoenix Linux - Newbie 4 07-02-2004 09:43 PM
Fedora Core 1 Kernel Rebuilding lmcilwain Linux - Newbie 11 01-09-2004 02:25 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:55 AM.

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