Results 1 to 3 of 3
I am compiling and installing the custom kernel based on the instructions provided in Building_a_custom_kernel on fedoraproject.org/wiki site. However, according to the instructions, anytime I change anything in the kernel ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-22-2011 #1
- Join Date
- Jun 2011
Compiling and installing the custom kernel under Fedora
However, according to the instructions, anytime I change anything in the kernel source files(e.g /driver/ata/libata-core.c), I have to create a patch a rebuild the whole kernel and install this new kernel which takes 2 hours. Is there a simpler way of recompiling what has changed(without creating patch) and try that changed kernel?
Since my changes are not in the drivers which can be dynamically loaded but is in the static code of the kernel, it is making life cumbersome.
Are there any instructions for this? How does other kernel developers manage this?
- 06-22-2011 #2
Hello and Welcome!
I may be wrong, but to the best of my knowledge, when you make changes to the kernel source you have to re-compile.
It's the only way to properly implement your changes.
How does other kernel developers manage this?
- 06-24-2011 #3
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
When you make a change to kernel code, you should not need to recompile the entire kernel. The normal Makefiles in the kernel should only incrementally build what is needed unless you cleaned the build directory after your last build/install cycle. As for creating a patch file, that is only necessary if you are going to push the code change back to the kernel maintainers, as far as I understand it. Anyway, the process to build/install a kernel in Fedora or Red Hat is:
1. Configure kernel w/ make menuconfig or make xconfig.
2. Build kernel - if you have a multi-core or multi-processor system, you can specify the number of jobs to speed up the build. My system has 8 cores, so I use the "-j8" option with make to run 8 simultaneous compilations at a time - it reduces a 2 hour kernel build down to 15-20 minutes. Do this as a regular user.
3. Install the headers w/ make headers_install - do this as root
4. Install the modules w/ make modules_install - do this as root
5. Install the operating system w/ make install - do this as rootSometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!