Fedora Linux Support Community & Resources Center
  #1  
Old 20th April 2008, 10:50 PM
LDC's Avatar
LDC Offline
Registered User
 
Join Date: Mar 2008
Posts: 986
kernel patch

hi

I downloaed latest 2.6.25 patch, but I don't know how to patch it under Fedora (the "Linux Guide" tutorial doesn't work, maybe there is a different directory management.
Anyone here did a tutorial?
__________________
Money couldn't buy friends, but you get a better class of enemy.

Linux Registered User #476391
Reply With Quote
  #2  
Old 22nd April 2008, 11:19 AM
LDC's Avatar
LDC Offline
Registered User
 
Join Date: Mar 2008
Posts: 986
aw, it would be useful to me even a small hint on how to patch the kernel ^^;;;

thanks
__________________
Money couldn't buy friends, but you get a better class of enemy.

Linux Registered User #476391
Reply With Quote
  #3  
Old 22nd April 2008, 11:33 AM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
Quote:
Originally Posted by LDC
aw, it would be useful to me even a small hint on how to patch the kernel ^^;;;

thanks

Try


http://gentoo-wiki.com/HOWTO_Install_a_Kernel_Patch
__________________
My Hardware
- CPU: AMD Phenom II X6 Hex Core 1055T 95W Edition @3.5Ghz
- Motherboard: Gigabyte GA-880GM-UD2H
- Cooler: Corsair H50 CPU Cooler
- RAM: Corsair Dominator 8GB (4x2GB) DDR3 1600MHz
- Graphics: Gigabyte GeForce GTS 450 OC 1024MB GDDR5
Reply With Quote
  #4  
Old 22nd April 2008, 11:40 AM
LDC's Avatar
LDC Offline
Registered User
 
Join Date: Mar 2008
Posts: 986
thanks leigh

I have no "usr/src/linux" directory

instead I have

Code:
[root@solomon src]# ls
ati  kernels  redhat
[root@solomon src]#
maybe the author mean "linux" as "the name of your distro", which in this case would be "redhat", and so I would've put the patch there.
But is not clear enough to me, since it is not stated explictly anywhere.

how exciting, my first time..patching a linux kernel
__________________
Money couldn't buy friends, but you get a better class of enemy.

Linux Registered User #476391
Reply With Quote
  #5  
Old 22nd April 2008, 11:57 AM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
Quote:
Originally Posted by LDC
thanks leigh

I have no "usr/src/linux" directory

instead I have

Code:
[root@solomon src]# ls
ati  kernels  redhat
[root@solomon src]#
maybe the author mean "linux" as "the name of your distro", which in this case would be "redhat", and so I would've put the patch there.
But is not clear enough to me, since it is not stated explictly anywhere.

how exciting, my first time..patching a linux kernel
Where did you extract the kernel source ?
Are you rebuilding a kernel srpm ?



/usr/src/linux is normally just a symlink to the kernel source .
__________________
My Hardware
- CPU: AMD Phenom II X6 Hex Core 1055T 95W Edition @3.5Ghz
- Motherboard: Gigabyte GA-880GM-UD2H
- Cooler: Corsair H50 CPU Cooler
- RAM: Corsair Dominator 8GB (4x2GB) DDR3 1600MHz
- Graphics: Gigabyte GeForce GTS 450 OC 1024MB GDDR5
Reply With Quote
  #6  
Old 22nd April 2008, 12:24 PM
LDC's Avatar
LDC Offline
Registered User
 
Join Date: Mar 2008
Posts: 986
Quote:
Originally Posted by leigh123@linux
Where did you extract the kernel source ?
I did extract it into /usr/src/

Quote:
Are you rebuilding a kernel srpm ?
nope, I just wanna patch patch my .64 one into the stable final one...

Quote:
/usr/src/linux is normally just a symlink to the kernel source .
as you've seen, there is nothing like that
__________________
Money couldn't buy friends, but you get a better class of enemy.

Linux Registered User #476391
Reply With Quote
  #7  
Old 23rd April 2008, 12:31 PM
LDC's Avatar
LDC Offline
Registered User
 
Join Date: Mar 2008
Posts: 986
no luck patching, so I tried "yum update kernel" as suggested in the Fedora Wiki... but it didn't work either -__- says that there is nothing to update (I know what you're thinking now: nope, I have not already the latest version... I have still the one in my signature)

"yum update kernel" and "yum upgrade kernel" doesn't work either ,saying

Code:
[root@solomon ~]# yum upgrade kernel
Setting up Upgrade Process
Could not find update match for kernel
No Packages marked for Update
[root@solomon ~]#

what should I do?
__________________
Money couldn't buy friends, but you get a better class of enemy.

Linux Registered User #476391
Reply With Quote
  #8  
Old 23rd April 2008, 03:22 PM
PabloTwo's Avatar
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,126
There is a good guide/tutorial in the "Guides & How-To Articles" section on this very forum on how to recompile a kernel, including adding patches, and building the finished product into rpm packages. You will need the rpmbuild-tools package, and maybe a few others, for this. I used this guide successfully on my system.

http://forums.fedoraforum.org/showthread.php?t=141782
Reply With Quote
  #9  
Old 23rd April 2008, 03:24 PM
LDC's Avatar
LDC Offline
Registered User
 
Join Date: Mar 2008
Posts: 986
I will try this too, thanks
__________________
Money couldn't buy friends, but you get a better class of enemy.

Linux Registered User #476391
Reply With Quote
  #10  
Old 23rd April 2008, 07:56 PM
Thetargos's Avatar
Thetargos Offline
Registered User
 
Join Date: May 2004
Location: Mexico City, Mexico
Age: 35
Posts: 4,418
  • Get the latest .srpm for the kernel you want.
  • Create a directory (for example $HOME/rpmbuild) where to have the rpm build environment, copy the contents of /usr/src/redhat to that directory:
    Code:
    mkdir rpmbuild
    cp -R /usr/src/redhat/* rpmbuild/
  • Make an .rpmmacros file in your home directory and have something like this in it:
    Code:
    %packager       [Your_name_here]
    
    %_topdir        [point_to_your_home_rpmbuild_dir]
  • Install the .src.rpm package:
    Code:
    rpm -ivh <package>.src.rpm
  • Go into the SPECS directory and prepare the sources:
    Code:
    cd rpmbuild/SPECS/
    rpmbuild -bp kernel.spec
  • You should be able to patch the kernel in rpmbuild/BUILD/kernel

If you only want to patch a kernel for which you got the sources off kernel.org, you simply have to extract the .tar.bz2 package, and then go into its directory and than apply the patch:

Code:
tar jxf linux-2.6.25.tar.bz2
cd linux-2.6.25
patch -p1 -i /path/to/patch
If the patch is bzipped, you will need to extract it before applying. Or use pipes (which may be bit more "complicated")
__________________
If ain't broken, don't fix it! :eek:
If can be improved, go for it! :cool:

FedoraForum Community forums lurker.
Fedora user since RHL 5.2 :cool:

Systems: Laptop, Main System, Netbook.

Last edited by Thetargos; 24th April 2008 at 06:40 PM.
Reply With Quote
  #11  
Old 24th April 2008, 10:28 AM
LDC's Avatar
LDC Offline
Registered User
 
Join Date: Mar 2008
Posts: 986
wow, that's quite a nice tutorial
many thanks!
__________________
Money couldn't buy friends, but you get a better class of enemy.

Linux Registered User #476391
Reply With Quote
  #12  
Old 24th April 2008, 12:13 PM
sideways's Avatar
sideways Offline
Retired User
 
Join Date: Oct 2004
Location: London, UK
Posts: 4,999
The fedora custom kernel howto is here

http://fedoraproject.org/wiki/Docs/CustomKernel
Reply With Quote
Reply

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
how can I use patch from kernel.org hangweijin Using Fedora 1 7th March 2008 10:08 AM
How do I patch the kernel? imdeemvp Using Fedora 17 3rd August 2005 11:42 PM
Can't patch the kernel! WidreMann Using Fedora 2 3rd May 2005 11:31 PM


Current GMT-time: 05:28 (Friday, 24-05-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