LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 11-19-2008, 01:20 AM   #1
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
Question 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
 
Old 11-19-2008, 05:57 PM   #2
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
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.
 
Old 11-19-2008, 05:59 PM   #3
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
If you run make oldconfig then it will create a default kernel config file and over-write your current .config file.
 
Old 11-19-2008, 06:35 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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.
 
Old 11-19-2008, 06:44 PM   #5
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
Ah, I stand corrected.
 
Old 11-19-2008, 09:59 PM   #6
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Original Poster
Rep: Reputation: 66
Thanks all of you, now i got kernel patching correctly
 
Old 11-21-2008, 10:37 AM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
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.
 
  


Reply

Tags
kernel, patching



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
Recompilation of the kernel? Nalec Linux - Newbie 1 12-19-2007 07:46 PM
Get agpgart as a loadalbe kernel module, without kernel recompilation? TruongAn Linux - Software 3 03-28-2006 10:44 AM
Recompilation of the kernel s_shenbaga Linux - Newbie 2 04-14-2005 03:06 PM
kernel recompilation najeeb Linux - Networking 1 08-31-2003 05:09 AM
Kernel Recompilation Thomas_Delrue Linux - General 1 08-30-2001 04:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:57 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