LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   canīt apply kernel-patch (http://www.linuxquestions.org/questions/linux-newbie-8/can%B4t-apply-kernel-patch-750331/)

syntax85 08-26-2009 04:47 AM

canīt apply kernel-patch 2.6.31-rc7
 
My Debian runs on Kernel 2.6.26.5 and I want to update to 2.6.31-rc7. The reason therefore is that Iīm working on a ASUS Eee-Pc 1005HA and the ethernet device will only work with the 2.6.31-rc5 kernel and following (if you are interested: http://wiki.debian.org/DebianEeePC/Model/1005HA).

I followed the instrustions from http://kernelnewbies.org/FAQ/HowToApplyAPatch

This is the result:

Code:

Compi:/# bzip2 -dc /usr/src/Linux/patch-2.6.31-rc7.bz2 | patch -p1
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/.gitignore b/.gitignore
|index 51bd99d..b93fb7e 100644
|--- a/.gitignore
|+++ b/.gitignore
----------------

....?

GrapefruiTgirl 08-26-2009 11:08 PM

I'm not completely certain what method you're following here, trying to go from 2.6.26.5 to 2.6.31rc7 however here's some general information that may help:

1) You generally need to patch in sequence, from one kernel release to the next, until you get to the version you want. Assuming you have a stock kernel archive from kernel.org, this would go something like:

2.6.26 > 2.6.27
2.6.27 > 2.6.28
2.6.28 > 2.6.29
2.6.29 > 2.6.30
2.6.30 > 2.6.31rc7 # not sure how this patch would work..

Now, that said, is there any particular problem with simply downloading the 2.6.31rc7 kernel from kernel.org/testing or wherever it is? Why do you need to do this using patch?

Finally, let's say you have a kernel archive, and you want to patch it to a higher version. You would do:

1) unpack the kernel archive.
2) copy the patch file(s) into the root of the unpacked folder.
3) execute: patch -p1 -i patchfile # as many times as needed to go from start to finish version.

I hope this explains a little bit :) but if there's still an issue here, please clarify what it is exactly, and why you need to go this route. Thanks,

Sasha

syntax85 08-27-2009 03:48 AM

Well, that explains even more than a little bit;)

Because of the reasons mentioned above (ethernet chipset atl1c), I want to upgrade the kernel to 2.6.31.rc5 (or 6, 7).
I found two possibilities to do that: Either the "patching-method" (which I recognize as quite a laborious one, now understanding how it works, or to compile a new kernel, as described at http://kernelnewbies.org/FAQ/KernelCompilation. But this way surpasses my (at the moment very low) linux abilities.
So generally, which is the easiest way to upgrade the kernel. I download the the kernel I want from http://www.kernel.org/pub/linux/kernel/v2.6/ - and than?

syntax85 08-27-2009 04:16 AM

Ok, maybe I should mention the problems I had with compiling kernel 2.6.30.5. I got as far as

Code:

# make modules_install
Then I got stuck.
Iīll try it again and post the error messages (or whatever they are) later on.

Tobias

GrapefruiTgirl 08-27-2009 08:03 AM

Quote:

Originally Posted by syntax85 (Post 3659243)
Well, that explains even more than a little bit;)

Because of the reasons mentioned above (ethernet chipset atl1c), I want to upgrade the kernel to 2.6.31.rc5 (or 6, 7).
I found two possibilities to do that: Either the "patching-method" (which I recognize as quite a laborious one, now understanding how it works, or to compile a new kernel, as described at http://kernelnewbies.org/FAQ/KernelCompilation. But this way surpasses my (at the moment very low) linux abilities.
So generally, which is the easiest way to upgrade the kernel. I download the the kernel I want from http://www.kernel.org/pub/linux/kernel/v2.6/ - and than?

I don't know of a way to patch a "compiled, installed" kernel -- I don't think that can be done.

No matter which of the above methods you use, the kernel
*still* will need to be re/compiled after patching, or after downloading from kernel.org, and subsequently installed.

The exception to this, is IF you were to download a pre-built kernel, already compiled, packaged for your distro, via your package manager, but again, I doubt there'd be an rc-level kernel that fits this qualification, unless maybe you were/are running a VERY bleeding-edge distro.

If you download the rc7 kernel source you want, from kernel.org or wherever, put it into /usr/src/source/HERE and extract the archive, now you're ready to compile.

It's not as scary as it sounds; if you're determined, and want the device to work, this would be the way to go AFAICT. I can give you instructions on compiling it (which you can also find in 100000 other locations) but you may need to seek the advice of a Debian user to ensure proper installation after compiling it --- I use Slackware, so my installation instructions might differ somewhat, from what a Debian user would normally do.

:twocents:
Sasha


All times are GMT -5. The time now is 11:21 AM.