LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   kernel patching without recompilation (https://www.linuxquestions.org/questions/linux-kernel-70/kernel-patching-without-recompilation-684499/)

vishesh 11-19-2008 01:20 AM

kernel patching without recompilation
 
dear all
i patched my kernel version 2.6.27.5 with patch 2.6.27.6, now i want to recompile kernel without any change in kernel or modules choice.
should i use 'make oldconfig'?
is there any way to apply patch without recompiling kernel ?

thanks

dxqcanada 11-19-2008 05:57 PM

Patching a kernel is really just applying changes to the source code that is used to compile a new kernel ... so your current running kernel will not be changed.

The kernel configuration is saved in a file called .config. Note that there is a period before the name so it is hidden ... unless you use the -a switch with ls.

dxqcanada 11-19-2008 05:59 PM

If you run make oldconfig then it will create a default kernel config file and over-write your current .config file.

syg00 11-19-2008 06:35 PM

Not quite - oldconfig takes your old .config and prompts you for any new options. These days if no new options, it silently finishes.
You get an updated .config, not a default.

If you need the new kernel level, you have to recompile. Simple as that.

dxqcanada 11-19-2008 06:44 PM

Ah, I stand corrected.

vishesh 11-19-2008 09:59 PM

Thanks all of you, now i got kernel patching correctly

sundialsvcs 11-21-2008 10:37 AM

A couple of unrelated ideas are bouncing-around here...

(1) A "kernel patch" is a delta file that contains only the differences between one kernel-source version and another. If you were connecting to the Internet via dial-up, you might be interested in these since they're smaller. Otherwise, I find little-to-no use for them. When I can easily download a complete "Real McCoy," that's what I am going to do.

(2) You are absolutely right that the /usr/src/linux/.config hidden-file is both out-of-sight and vulnerable. It is very easily destroyed. For that reason, I keep a backup of the file in my /root directory under a suitable name. (The file is chown'd to be read-only even to me.) I've also got a copy on my backup-drives.

When I'm ready to upgrade my kernel, the first thing that I do is to make, and lock, another backup-copy of the config. Then, after doing the appropriate symlink changes, I embark upon my new upgrade. I then make a copy of that config-file, after letting make menuconfig do its thing, naming it "in-progress-01" because I know I might yet change my mind.

"Hmmm... this doesn't look quite right. Wonder what changed?" That's easy: just do a diff.

Finally: there's a pad of paper and a number-two pencil at my hand. What I do, I write down. What I plan to do, I write down and then mark-off. Methodical... deliberate... unhurried... and no beer. ;)


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