LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 08-24-2007, 07:59 PM   #1
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
patching Debian Stock Kernel with prepatch from kernel.org


I want a feature which is there in the 2.6.23-rc3 prepatch at www.kernel.org.

I downloaded the Debian stock kernel source 2.6.22. Now my question is can I apply the prepatch from www.kernel.org to the Debian stock Kernel.

Ok, actually I tried applying the patch and it went pretty smooth except there are 9-10 failures which I think is a very small number considering the 1000s of files that are being patched by the prepatch. Also I got the feature that I was looking when I ran make xconfig. I haven't compiled the kernel.

is there something terribly wrong in the way I am doing this thing? I mean is there any correct procedure for doing something what I am doing.

Thanks
 
Old 08-24-2007, 08:07 PM   #2
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Patches are applied progressively, i.e. you should apply all intermediate patches as well. I think you've overlooked that step. Start again with the stock kernel and apply all patches until you reach the patch you've applied now.
 
Old 08-24-2007, 08:16 PM   #3
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Quote:
Originally Posted by Dutch Master View Post
Patches are applied progressively, i.e. you should apply all intermediate patches as well. I think you've overlooked that step. Start again with the stock kernel and apply all patches until you reach the patch you've applied now.
2.6.xx-rcyyy have to be applied to 2.6.(xx-1), they are not incremental so I think he did it right. It's the relase candidate for 2.6.23 so it can only be applied to 2.6.22

kushalkoolwal, if you are lucky, maybe you don't need these files?

Here you get the patch applied to the 2.6.22 to produce the 2.6.22-1-686 version 2.6.22+9 , so I guess there are two patches that overlap.

Last edited by nx5000; 08-24-2007 at 08:18 PM.
 
Old 08-25-2007, 03:28 AM   #4
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by nx5000 View Post
Here you get the patch applied to the 2.6.22 to produce the 2.6.22-1-686 version 2.6.22+9 , so I guess there are two patches that overlap.

thanks for your reply guys. nx5000 I didn't understood what you said about the overlap of patches. Should I first apply the patch linux-2.6_2.6.22-3.diff.gz to Debian stock kernel 2.6.22 and then I should apply the prepatch from kernel.org?

It would be great if you can explain me what you said in little bit detail.

Really appreciate it.

Thanks
 
Old 08-25-2007, 06:05 AM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Well.
The rc3 version is a patch of the 2.6.22.
The debian stock kernel 2.6.22 is also a patch of the 2.6.22.

If you apply the rc3 on top of the debian stock kernel and get rejected files, it means that the 2 patches patch these same files. So either you ignore because you don't use them, or you forget about debian stock kernels, you do it basically: take the 2.6.22 from kernel.org and apply the 2.6.23-rc patch which WILL work (that's what I do usually)
Or you take some time and read the rejected files to try to correct it yourself. You could also take the "only patched file" of the rc3 that interest you and apply it to the debian stock kernel (look at the changelog on kernel.org, take the git commit_id and go on gitweb of the kernel and download the patched file you need, apply it to debian stock kernel). That's maybe what Dutch Master meant, not taking the rc3 but maybe only the rc1 or the rc2?

As I said, what are the rejected files?
 
Old 08-25-2007, 07:05 AM   #6
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
I think I used the wrong word. If one patches the kernel from .0 to .4 you'd have to apply the .1, .2 and .3 patches as well and before applying the .4 patch in consecutive order.
 
Old 08-25-2007, 09:29 AM   #7
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Quote:
Originally Posted by Dutch Master View Post
I think I used the wrong word. If one patches the kernel from .0 to .4 you'd have to apply the .1, .2 and .3 patches as well and before applying the .4 patch in consecutive order.
Yes, this is true for 2.6.x kernels. Going from 2.6.18->2.6.20 you will need to apply 2.6.19 and 2.6.20 patches.

http://www.mjmwired.net/kernel/Docum...ng-patches.txt

For 2.6.x-rcN kernels, they always apply on top of 2.6.x-1
Same for 2.6.x.y.
 
Old 08-25-2007, 09:37 AM   #8
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by nx5000 View Post
As I said, what are the rejected files?
How do I keep keep track of rejected files? Should I re-direct the out of patch command in to a file and then look in to the files for the rejected files? Because the terminal screen moves up so quickly and beyond one point you cannot scroll up. I know this might sound a stupid question but I really don't know how to get the name of the rejected files? Should I use the find command?


Quote:
Originally Posted by nx5000 View Post
Well.
You could also take the "only patched file" of the rc3 that interest you and apply it to the debian stock kernel (look at the changelog on kernel.org, take the git commit_id and go on gitweb of the kernel and download the patched file you need, apply it to debian stock kernel). That's maybe what Dutch Master meant, not taking the rc3 but maybe only the rc1 or the rc2?
Yes. I might want to do that. Can you give me the detailed steps? I have never used git before. Suppose the two files that I would like are in
Code:
driver/hwmon/dme1737.c
and
Documentation/something.txt

Also finally my preference is to stick with Debian kernel as far as possible. Is there any other elegant solution to achieve what I wanted but still retain the debian kernel.

Thanks
 
Old 08-25-2007, 11:04 AM   #9
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by kushalkoolwal View Post
How do I keep keep track of rejected files? Should I re-direct the out of patch command in to a file and then look in to the files for the rejected files? Because the terminal screen moves up so quickly and beyond one point you cannot scroll up. I know this might sound a stupid question but I really don't know how to get the name of the rejected files? Should I use the find command?
It tells you when doing the patching which files were rejected plus gives you the name of the .rej file where this output was saved open the file and it is there for you to see.


Quote:
Yes. I might want to do that. Can you give me the detailed steps? I have never used git before. Suppose the two files that I would like are in
Code:
driver/hwmon/dme1737.c
and
Documentation/something.txt
No clue never used git.
Quote:
Also finally my preference is to stick with Debian kernel as far as possible. Is there any other elegant solution to achieve what I wanted but still retain the debian kernel.

Thanks
Not elegant at all but you can compare the files in question and copy/adjust manually the parts that are failing it is the only way to do it really. Your just better off using the kernel.org 2.6.22 and applying the patch on top of it saving yourself all this time and trouble for something you may never get right.
 
Old 08-25-2007, 12:41 PM   #10
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by HappyTux View Post
It tells you when doing the patching which files were rejected plus gives you the name of the .rej file where this output was saved open the file and it is there for you to see.
What I meant was that is there any way by which we can list all the rejected files? My problem is that the patching (& rejection screen goes up so fast that it is hard for me to notice the names and the path of the files).


Quote:
Originally Posted by HappyTux View Post
Not elegant at all but you can compare the files in question and copy/adjust manually the parts that are failing it is the only way to do it really. Your just better off using the kernel.org 2.6.22 and applying the patch on top of it saving yourself all this time and trouble for something you may never get right.
Hmm. this brings me the to the classic question (I guess this must have been asked several times): What's are the pros and cons of using Debian stock kernel v/s plain vanilla kernel?


Thanks for your support..
 
Old 08-25-2007, 01:05 PM   #11
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by kushalkoolwal View Post
What I meant was that is there any way by which we can list all the rejected files? My problem is that the patching (& rejection screen goes up so fast that it is hard for me to notice the names and the path of the files).
You could always try something like patch -p1 < /path/to/patch.file > patch_output.txt then look at what your output was in the patch_output.txt file.

Quote:
Hmm. this brings me the to the classic question (I guess this must have been asked several times): What's are the pros and cons of using Debian stock kernel v/s plain vanilla kernel?


Thanks for your support..
Pro: If any security problem running a STILL supported Debian kernel then it is usually incorporated into the next revision that is uploaded to the archives. Cons: Debian will remove drivers that are considered non-free by Debian Free Software Guildline (DSFG) so if you need one of them your out of luck unless it allows re-distribution again according to the DFSG then you can usually/sometimes get it from the non-free archive.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
error while patching Rtlinux 3.1 kernel using kernel linux-2.4.29 dolreich_c Linux - General 1 02-06-2018 06:48 AM
patching debian stock kernel sources with -mm patch kushalkoolwal Debian 4 08-15-2006 08:52 PM
Upgrading stock 2.4.22 kernel to 2.5.x then to 2.6.6 with existing stock .config file Kyl3 Slackware 8 06-09-2004 05:34 PM
Debian Sid - ALSA and a stock 2.6.5 kernel UrbanSlayer Debian 8 04-18-2004 09:14 PM
Patching SuSe stock kernel lacerto Linux - Software 0 10-28-2003 10:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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