LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Patching a new Kernel (https://www.linuxquestions.org/questions/linux-newbie-8/patching-a-new-kernel-732421/)

vasmakk 06-12-2009 03:49 AM

Patching a new Kernel
 
Hi everybody ...

Yesterday I downloaded from http://www.kernel.org the new kernel (linux-2.6.30.tar.bz2) and also the patch (patch-2.6.30.bz2)

It is not the first time I compile a kernel, but it is the first time I apply a patch so I came along with some surprises ...
I'm sure I followed the right procedure so I'll come straight to the point.

When I apply the above patch with the command patch -p1 I get the warning: Reversed (or previously applied) patch detected! Assume -R? [n]. If I answer no, It is trying to apply the patch anyway, and I get errors.

So I am forced to apply the patch with the command patch -p1 -R. This way the kernel is patched fine with no errors. But when i compile the kernel and build the .deb package, it has the name linux-image-2.6.29_ ... and not linux-image-2.6.30_ ... Why ? Is it because of the -R option?

Eventually Should I patch my 2.6.30 kernel or not ?
Note, I'm interested more in stability and bug fixes of a kernel and not necessarily new features. That is why I updated to 2.6.30!
If someone of you knows what is the most stable kernel (unpatched) from the 2.6.xx series let me tell!


Thanks in advance!
Vas

GlennsPref 06-12-2009 04:04 AM

Hi, from what I remember, a patch must be incremental, in version number, for it to "patch"

Meaning, it(the patch) must be one increment higher....(than the kernel you are patching)
Quote:

Yesterday I downloaded from http://www.kernel.org the new kernel (linux-2.6.30.tar.bz2) and also the patch (patch-2.6.30.bz2)
they are the same!

The patch you have down loaded would be for a kernel version less than the new kernel you downloaded.
Quote:

Eventually Should I patch my 2.6.30 kernel or not ?
In short, NO! you don't need the patch, not yet. Not that ver anyway.

hope this helps you get on with it.

kind regards Glenn

sorry for all these edits, but....

If the kernel you downloaded came from a /stable dir, you have a stable kernel.

If you want to try something cutting edge, add the usb3.0 patch

from slashdot (/.)
Quote:

+--------------------------------------------------------------------+
| Linux To Be First OS To Support USB 3.0 |
| from the three-upmanship dept. |
| posted by timothy on Thursday June 11, @17:47 (Announcements) |
| http://linux.slashdot.org/article.pl...9/06/11/214240 |
+--------------------------------------------------------------------+

An anonymous reader writes with an excerpt from Neowin.net "Sarah Sharp,
a self-styled 'geekess' and Linux developer at Intel's Open Source
Technology Center who has recently been working on the Linux USB
subsystem, announced on her blog that support of USB 3.0 will soon be
integrated into the Linux kernel. This makes Linux the [0]first operating
system to support the standard. If you can't wait and have the expertise
necessary, she includes instructions on how to get USB 3.0 support in
Linux now." Here's [1]Sharp's post.

Discuss this story at:
http://linux.slashdot.org/comments.p...9/06/11/214240

Links:
0. http://www.neowin.net/news/main/09/0...support-usb-30
1. http://sarah.thesharps.us/2009-06-09-13-30.cherry


+--------------------------------------------------------------------+
AND, any patch is going to affect the kernel sources you have currently installed. 2.6.29.x.x

You can and may make the kernel ver anything you want, but don't do it, by...

editing the first few lines of /usr/src/linux/Makefile

like this....

Code:

VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 29
EXTRAVERSION = .3-1mnb-GamesBox
NAME = GlennsPref.net "Temporary Tasmanian Devil"

cheers, Glenn

vasmakk 06-12-2009 05:47 AM

Thank you very much Glenn!


Now, If I understood well ...
patch-2.6.30.bz2 contains all the bug-fixes for the previous versions (the kernel 2.6.29 series) .

And If I apply patch-2.6.30.bz2 to the new kernel (2.6.30.tar.bz2) with the -R parameter ofcourse, I get a linux-image-2.6.29_...deb package which has all the fixes needed for the 2.6.29 series, right ?



Regards!
Vas

i92guboj 06-12-2009 06:50 AM

patch-2.6.30 is intended to convert 2.6.29 to 2.6.30. The only purpose of this is to save bandwidth, nothing else.

If you apply patch-2.6.30 reversed to linux-2.6.30 you get 2.6.29 with no fixes and no nothing. It would be a 2.6.29, exactly equal line by line to the 2.6.29 kernel when it first came out. In other words, you can understand patches like diff files (in fact, that's what they are, they are often created using the diff command). So, patch-2.6.30 is the diff between linux-2.6.29 and linux-2.6.30.

If you download the latest you don't need any patch.

When 2.6.30.1 is out you can download do one of these things:
  • download the full linux-2.6.30.1 package
  • download patch-2.6.30.1, and use it against your linux-2.6.30 tree

vasmakk 06-12-2009 07:08 AM

Quote:

Originally Posted by i92guboj (Post 3571593)
patch-2.6.30 is intended to convert 2.6.29 to 2.6.30. The only purpose of this is to save bandwidth, nothing else.

If you apply patch-2.6.30 reversed to linux-2.6.30 you get 2.6.29 with no fixes and no nothing. It would be a 2.6.29, exactly equal line by line to the 2.6.29 kernel when it first came out. In other words, you can understand patches like diff files (in fact, that's what they are, they are often created using the diff command). So, patch-2.6.30 is the diff between linux-2.6.29 and linux-2.6.30.

If you download the latest you don't need any patch.

When 2.6.30.1 is out you can download do one of these things:
  • download the full linux-2.6.30.1 package
  • download patch-2.6.30.1, and use it against your linux-2.6.30 tree

Crystal clear, thanks!


All times are GMT -5. The time now is 02:57 PM.