patching Debian Stock Kernel with prepatch from kernel.org
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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?
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.
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.
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
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.
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.
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
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.