LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   After patch a patch to kernel? Do I need to compile whole kernel again? (https://www.linuxquestions.org/questions/linux-kernel-70/after-patch-a-patch-to-kernel-do-i-need-to-compile-whole-kernel-again-931337/)

Anders Lind 02-26-2012 01:40 AM

After patch a patch to kernel? Do I need to compile whole kernel again?
 
After patch a patch to kernel? Do I need to compile whole kernel again?

Thank you

syg00 02-26-2012 02:03 AM

Yes. Linux uses a monolithic kernel.

sundialsvcs 02-29-2012 03:40 PM

"Close enough." Anyway, to my way of thinking the answer is definitely "yes." You always want to be absolutely certain that every part of the kernel which could possibly be affected by your change, however slight, is always incorporated in every scrap of binary code whether in the resident kernel or in any module. It only takes one screw-up to hose your system badly.

The procedure I always use, quite religiously, is as follows:
  1. Make a dated backup copy (not hidden) of the .config hidden file, in some far-away directory (mine's under /root/kernel_configs, a directory name of my own choosing). Write-protect this copy so that it will never be overwritten (by you).
  2. Temporarily rename .config to some other name.
  3. make distclean
  4. Rename the file back.
  5. The usual make .. make install sequence.
  6. LQQK in the target locations to make sure that the kernel image is new, and that all of the modules are new. (Do not assume... actually look.)
Even though the kernel is an extremely important program, it's actually not a big program, nor does it take an extraordinary amount of time to compile.


All times are GMT -5. The time now is 06:20 PM.