LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-13-2007, 03:48 AM   #1
bbmak
Member
 
Registered: May 2004
Posts: 178

Rep: Reputation: 31
how do i patch the kernel with .patch


I download a patch from DriverLoader
I use dldrconfig --patch file.patch command
But it cannot patch the file. It pops up this error message, "Patching is currently only supported with the TAR package format."

What can I do ?????
 
Old 05-13-2007, 04:54 AM   #2
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware 14.1 (32 and 64 bit)
Posts: 1,594

Rep: Reputation: 125Reputation: 125
A working command line is hard to give if you give no more information. I guess you downloaded patches from here (http://www.linuxant.com/driverloader...s-patches.php), and for the example I assume your patch file is named linux-2.6.18-16kstacks.patch.

View the patch file with any text editor. At the beginning you will see something like this:
Code:
diff -urN linux-2.6.18/arch/i386/Kconfig.debug linux-2.6.18-16kstacks/arch/i386/Kconfig.debug
--- linux-2.6.18/arch/i386/Kconfig.debug	2006-09-19 23:42:06.000000000 -0400
+++ linux-2.6.18-16kstacks/arch/i386/Kconfig.debug	2006-09-27 13:09:54.000000000 -0400
@@ -66,6 +66,14 @@
That's important info because to patch files it is important to know the relative paths they use. This line indicates what file will be patched (there might be others down the lines, but this one is the first to be patched). Example: If you go to your linux kernel's source folder now, usually /usr/src/linux, you will see that there is no folder named "linux-2.6.18". The first part of that path has to be stripped away, else the patch utility cannot find the file. That's what the -p option of "patch" is for.
So if you were in /usr/src/linux and wanted to add that patch file, you would have to do
Code:
patch -p1 < /path/whereyou/downloaded/linux-2.6.18-16kstacks.patch
patch is the command, -p1 will strip one folder hierarchy from the shown line and you need to give it the input the way I did above, you cannot just give the patch file name.

I hope you find it helpful, that's the way patches are applied most of the times.

P.S.: That's only the patch. To make it work you would have to do something with your kernel of course (or the driverloader program will do it)
 
  


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
How do i patch 2.4.21-37 kernel with antidote2 security patch suchi Linux - Kernel 4 09-05-2006 02:29 AM
Kernel Patch (Patch-2.6.13) ukez Linux - Hardware 4 08-30-2005 03:40 PM
Unable to patch 2.6.11.7 kernel with Reiser4 mm patch SlackwareInAZ Slackware 9 04-26-2005 06:33 AM
debian-patch-debianlogo w/2.6.5 kernel-patch-lpp Outabux Debian 11 05-20-2004 01:21 PM
How to Apply patch for Mass Storage device to work? (uss725-2.4.20-rc2.patch) cevjr Linux - Hardware 3 04-20-2004 11:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:34 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration