LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 08-26-2009, 05:47 AM   #1
syntax85
LQ Newbie
 
Registered: Jun 2008
Location: Austria
Posts: 12

Rep: Reputation: 0
Question 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
----------------
....?

Last edited by syntax85; 08-27-2009 at 05:18 AM.
 
Old 08-27-2009, 12:08 AM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
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
 
Old 08-27-2009, 04:48 AM   #3
syntax85
LQ Newbie
 
Registered: Jun 2008
Location: Austria
Posts: 12

Original Poster
Rep: Reputation: 0
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?

Last edited by syntax85; 08-27-2009 at 04:50 AM.
 
Old 08-27-2009, 05:16 AM   #4
syntax85
LQ Newbie
 
Registered: Jun 2008
Location: Austria
Posts: 12

Original Poster
Rep: Reputation: 0
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

Last edited by syntax85; 08-27-2009 at 05:32 AM.
 
Old 08-27-2009, 09:03 AM   #5
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by syntax85 View Post
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.


Sasha

Last edited by GrapefruiTgirl; 08-27-2009 at 09:15 AM.
 
  


Reply

Tags
debian


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
Apply a kernel patch android6011 Ubuntu 2 12-05-2007 06:57 PM
How to apply kernel patch and customise? subaruwrx Linux - Software 7 12-30-2004 10:40 PM
Kernel: Can't apply patch 2.6.8-rc2 to a 2.6.8-rc1 thorax Linux - Software 1 07-18-2004 04:20 PM
Kernel Patch will not Apply. mudelf Linux - General 10 10-08-2003 06:22 AM
How To Apply Patch To Kernel WILLIAMATHOMAS Linux - Software 2 02-12-2003 01:57 PM


All times are GMT -5. The time now is 11:06 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration