Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 3rd August 2005, 08:53 AM
imdeemvp's Avatar
imdeemvp Offline
Registered User
 
Join Date: Feb 2004
Age: 44
Posts: 8,256
How do I patch the kernel?

Hey people as you may now I am not a programer but a normal, regular linux user......I am need to apply this patch: pci-subordinate-busnr-fix. According to this laptop info it may be the solution to my pmcia problems.

I am willing to give it a shot so any help will be appreciated.....thanks in advance.
__________________
HELP with JAVA, MP3's, Wireless, Repo's, YUM, Partitions, System Monitors, Nvidia, ATI drivers, LIMEWIRE PRO & MORE!.

Easiest and most friendly desktop ever is PCLinuxOS! Includes all this apps. Just try it.

"The greater the struggle THE greater the achievment."

Do you know HIM?

If you are an idiot click here. NThis will test you linux skills :D
Reply With Quote
  #2  
Old 3rd August 2005, 09:07 AM
Furball's Avatar
Furball Offline
Registered User
 
Join Date: Jul 2005
Location: Passau, Germany
Age: 33
Posts: 331
You can apply a patch this way:
- download the patch to some location you know (/root for example)
- go to your source directory (for example /usr/src/kernels/2.6.12....)
- run the command
Code:
patch -Np1 -i /root/mypachfile.patch
You should now get some messages like "patching ... succeeded"

If it doesn't work try -Np0 (this is the patch level depth). It depends from which location you are patching.
For example: At the top of the patch you see "--- a/drivers/pci/probe.c". So if you are in the directory which contains drivers/pci/probe.c, you should use -Np0. For a better explanation see 'man patch' and look out for -pnum.
__________________

Benjamin Duehring, FORWISS
Universitaet Passau, D-94030 Passau
WWW: http://www.lyxx.de/card
Reply With Quote
  #3  
Old 3rd August 2005, 09:09 AM
brianmsu80 Offline
Registered User
 
Join Date: Aug 2004
Location: Michigan
Posts: 182
Looks like this is the .diff patch
http://bugzilla.kernel.org/attachmen...24&action=view

So save that text as a *.diff file.

You also need the linux kernel source, in /usr/src/redhat/, then down in a subdir like i386 or i686 I think, I forget the complete path, have you ever compiled a kernel before?

You may need to install the src.rpm.

Then you use the patch command to apply patch.
man patch

Should get you started?
Reply With Quote
  #4  
Old 3rd August 2005, 09:28 AM
imdeemvp's Avatar
imdeemvp Offline
Registered User
 
Join Date: Feb 2004
Age: 44
Posts: 8,256
I have kernel source installed now which word proccessor or editor do I use to save it? when I try to save it does not work...
__________________
HELP with JAVA, MP3's, Wireless, Repo's, YUM, Partitions, System Monitors, Nvidia, ATI drivers, LIMEWIRE PRO & MORE!.

Easiest and most friendly desktop ever is PCLinuxOS! Includes all this apps. Just try it.

"The greater the struggle THE greater the achievment."

Do you know HIM?

If you are an idiot click here. NThis will test you linux skills :D
Reply With Quote
  #5  
Old 3rd August 2005, 09:31 AM
brianmsu80 Offline
Registered User
 
Join Date: Aug 2004
Location: Michigan
Posts: 182
just use vi

vi mypachfile.patch

right click and copy the text from http://bugzilla.kernel.org/attachmen...24&action=view
hit esc, the hit the insert key, the right click once, it should paste everything.
then hit esc again, hold shift, hit colon, type wq.
That should save it, just make sure you are saving somewhere you have write privilages to with the account you are logged in with.
Reply With Quote
  #6  
Old 3rd August 2005, 09:44 AM
imdeemvp's Avatar
imdeemvp Offline
Registered User
 
Join Date: Feb 2004
Age: 44
Posts: 8,256
What did I do wrong?
Quote:
[root@laptopFC4 imdeemvp]# vi pmcia.patch
[root@laptopFC4 imdeemvp]# mv pmcia.patch /opt/
[root@laptopFC4 imdeemvp]# cd /usr/src/kernels/2.6.12-1.1398_FC4-i686
[root@laptopFC4 2.6.12-1.1398_FC4-i686]# patch -Np1 -i /opt/pmcia.patch can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/drivers/pci/probe.c 2004-07-09 10:36:51.000000000 +0000
|+++ b/drivers/pci/probe.c 2004-07-09 10:39:38.000000000 +0000
--------------------------
File to patch: pmcia
pmcia: No such file or directory
Skip this patch? [y] y
Skipping patch.
3 out of 3 hunks ignored
__________________
HELP with JAVA, MP3's, Wireless, Repo's, YUM, Partitions, System Monitors, Nvidia, ATI drivers, LIMEWIRE PRO & MORE!.

Easiest and most friendly desktop ever is PCLinuxOS! Includes all this apps. Just try it.

"The greater the struggle THE greater the achievment."

Do you know HIM?

If you are an idiot click here. NThis will test you linux skills :D
Reply With Quote
  #7  
Old 3rd August 2005, 09:47 AM
brianmsu80 Offline
Registered User
 
Join Date: Aug 2004
Location: Michigan
Posts: 182
look in /usr/src/kernels/2.6.12-1.1398_FC4-i686
for:
/drivers/pci/probe.c
you need to be in the working directory of probe.c
Reply With Quote
  #8  
Old 3rd August 2005, 09:48 AM
Furball's Avatar
Furball Offline
Registered User
 
Join Date: Jul 2005
Location: Passau, Germany
Age: 33
Posts: 331
That's the -Np1 problem, try -Np0 instead.
__________________

Benjamin Duehring, FORWISS
Universitaet Passau, D-94030 Passau
WWW: http://www.lyxx.de/card
Reply With Quote
  #9  
Old 3rd August 2005, 09:57 AM
imdeemvp's Avatar
imdeemvp Offline
Registered User
 
Join Date: Feb 2004
Age: 44
Posts: 8,256
There is no probe.c in directory
__________________
HELP with JAVA, MP3's, Wireless, Repo's, YUM, Partitions, System Monitors, Nvidia, ATI drivers, LIMEWIRE PRO & MORE!.

Easiest and most friendly desktop ever is PCLinuxOS! Includes all this apps. Just try it.

"The greater the struggle THE greater the achievment."

Do you know HIM?

If you are an idiot click here. NThis will test you linux skills :D
Reply With Quote
  #10  
Old 3rd August 2005, 10:06 AM
brianmsu80 Offline
Registered User
 
Join Date: Aug 2004
Location: Michigan
Posts: 182
What I do, since you are installing a "vanilla" kernel anyhow, get the most current one. Might be a problem with the packaged version for Fedora if /drivers/pci/probe.c doesnt exist. I just checked and the kernel.org version has it.

wget http://kernel.org/pub/linux/kernel/v...6.12.3.tar.bz2
Then, as sudo or root:
mv linux-2.6.12.3.tar.bz2 /usr/src/kernels/
bzip2 -dc *.tar.bz2 | tar -xvf -
Reply With Quote
  #11  
Old 3rd August 2005, 10:09 AM
imdeemvp's Avatar
imdeemvp Offline
Registered User
 
Join Date: Feb 2004
Age: 44
Posts: 8,256
Will it be safe to replace the kernel even though is not comming from fedora updates?
__________________
HELP with JAVA, MP3's, Wireless, Repo's, YUM, Partitions, System Monitors, Nvidia, ATI drivers, LIMEWIRE PRO & MORE!.

Easiest and most friendly desktop ever is PCLinuxOS! Includes all this apps. Just try it.

"The greater the struggle THE greater the achievment."

Do you know HIM?

If you are an idiot click here. NThis will test you linux skills :D
Reply With Quote
  #12  
Old 3rd August 2005, 10:13 AM
brianmsu80 Offline
Registered User
 
Join Date: Aug 2004
Location: Michigan
Posts: 182
Well, First of all, you NEVER replace the kernel. You install and ADDITIONAL one. So you can always fall back. But when you do yum update, it will probably still install the new FC kernel releases, but no big deal, yum installs them in ADDITION to existing installed kernels anyhow. ONLY problem I could see is if you are strapped for disk space on your /boot partition.
Reply With Quote
  #13  
Old 3rd August 2005, 10:17 AM
imdeemvp's Avatar
imdeemvp Offline
Registered User
 
Join Date: Feb 2004
Age: 44
Posts: 8,256
I am good with boot partition....but its kind of late here in california as it is in Michigan maybe 6am or 5am for you I got hit the bed and continue tomorrow....thanks for the help.
__________________
HELP with JAVA, MP3's, Wireless, Repo's, YUM, Partitions, System Monitors, Nvidia, ATI drivers, LIMEWIRE PRO & MORE!.

Easiest and most friendly desktop ever is PCLinuxOS! Includes all this apps. Just try it.

"The greater the struggle THE greater the achievment."

Do you know HIM?

If you are an idiot click here. NThis will test you linux skills :D
Reply With Quote
  #14  
Old 3rd August 2005, 07:50 PM
imdeemvp's Avatar
imdeemvp Offline
Registered User
 
Join Date: Feb 2004
Age: 44
Posts: 8,256
Ok...donwnloaded and uncompress the kernel so now how do I go about adding it to ther grub?? the kernel folder is: linux-2.6.12.3 so please provide me with an example of the grub entry. I really dont want to screw my installation so I rather ask the questions....

Thanks again....
__________________
HELP with JAVA, MP3's, Wireless, Repo's, YUM, Partitions, System Monitors, Nvidia, ATI drivers, LIMEWIRE PRO & MORE!.

Easiest and most friendly desktop ever is PCLinuxOS! Includes all this apps. Just try it.

"The greater the struggle THE greater the achievment."

Do you know HIM?

If you are an idiot click here. NThis will test you linux skills :D

Last edited by imdeemvp; 3rd August 2005 at 07:53 PM.
Reply With Quote
  #15  
Old 3rd August 2005, 08:50 PM
Furball's Avatar
Furball Offline
Registered User
 
Join Date: Jul 2005
Location: Passau, Germany
Age: 33
Posts: 331
Quote:
Originally Posted by imdeemvp
Ok...donwnloaded and uncompress the kernel so now how do I go about adding it to ther grub?? the kernel folder is: linux-2.6.12.3
At which stage are you exactly ?
Have you applied the patch successfully ?
Have you configured the kernel and ran a make ?
__________________

Benjamin Duehring, FORWISS
Universitaet Passau, D-94030 Passau
WWW: http://www.lyxx.de/card
Reply With Quote
Reply

Tags
kernel, patch

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help Making a Kernel Patch work with F11 Kernel Jeff91 Installation and Live Media 1 12th June 2009 12:51 AM
kernel patch LDC Fedora Focus 11 24th April 2008 12:13 PM
how can I use patch from kernel.org hangweijin Using Fedora 1 7th March 2008 10:08 AM
Can't patch the kernel! WidreMann Using Fedora 2 3rd May 2005 11:31 PM


Current GMT-time: 19:26 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat