LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Rebuilding Linux kernel in Fedora 7 without recompiling everything (http://www.linuxquestions.org/questions/programming-9/rebuilding-linux-kernel-in-fedora-7-without-recompiling-everything-584142/)

JoeyAdams 09-12-2007 08:59 AM

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?

95se 09-12-2007 09:12 AM

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 :(

JoeyAdams 09-12-2007 11:11 PM

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).


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