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

3rd August 2005, 08:53 AM
|
 |
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.
|

3rd August 2005, 09:07 AM
|
 |
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
|

3rd August 2005, 09:09 AM
|
|
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?
|

3rd August 2005, 09:28 AM
|
 |
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...
|

3rd August 2005, 09:31 AM
|
|
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.
|

3rd August 2005, 09:44 AM
|
 |
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
|
|

3rd August 2005, 09:47 AM
|
|
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
|

3rd August 2005, 09:48 AM
|
 |
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
|

3rd August 2005, 09:57 AM
|
 |
Registered User
|
|
Join Date: Feb 2004
Age: 44
Posts: 8,256

|
|
|
There is no probe.c in directory
|

3rd August 2005, 10:06 AM
|
|
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 -
|

3rd August 2005, 10:09 AM
|
 |
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?
|

3rd August 2005, 10:13 AM
|
|
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.
|

3rd August 2005, 10:17 AM
|
 |
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.
|

3rd August 2005, 07:50 PM
|
 |
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....
Last edited by imdeemvp; 3rd August 2005 at 07:53 PM.
|

3rd August 2005, 08:50 PM
|
 |
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
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 19:26 (Wednesday, 19-06-2013)
|
|
 |
 |
 |
 |
|
|