LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-05-2006, 11:59 AM   #1
Tim Johnson
Member
 
Registered: Oct 2004
Location: Palmer, Alaska
Distribution: ubuntu 10.04, Slack 13.0/32-bit
Posts: 206

Rep: Reputation: 30
Kernel Patch HOWTOs


I'm getting ready to do a kernel patch.
I need some good documentation to read first.
Pointers to docs and URLS are welcomed.
(using 10.0)
thnx
tim
 
Old 02-05-2006, 12:14 PM   #2
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
Just read up on the 'patch' command.
 
Old 02-05-2006, 01:19 PM   #3
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
patch (file you need to patch) (patch file)
 
Old 02-05-2006, 04:10 PM   #4
Tim Johnson
Member
 
Registered: Oct 2004
Location: Palmer, Alaska
Distribution: ubuntu 10.04, Slack 13.0/32-bit
Posts: 206

Original Poster
Rep: Reputation: 30
Yes, that is in the manual. Examples are good.
Cautions are good too.
Like "don't forget to back up the patched file first".
More cautions anyone?
thanks!

tim
 
Old 02-17-2006, 03:53 AM   #5
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Read /usr/src/linux/README
 
Old 02-17-2006, 04:29 AM   #6
KMcD
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slack -- current
Posts: 354

Rep: Reputation: 30
tis easy, say you're using the -ck patchset.

Untar kernel source (for this case linux-2.6.15.tar.bz2) using command:
Code:
bzip2 -dc linux-2.6.15.tar.bz2 | tar xvf -
Then copy the patch (current one is patch-2.6.15-ck4.bz2) to source folder (linux-2.6.15) and use the following command:
Code:
bzip2 -dc patch-2.6.15-ck4.bz2 | patch -p1
and hey presto your kernel is patched.
 
Old 02-17-2006, 10:38 AM   #7
Tim Johnson
Member
 
Registered: Oct 2004
Location: Palmer, Alaska
Distribution: ubuntu 10.04, Slack 13.0/32-bit
Posts: 206

Original Poster
Rep: Reputation: 30
Thanks folks. Here's a related question.
I have two partition, RH 9.0 and Slack 10.0. Is there any reason why I can't do the patching by mounting the slack partition, cd'ing to (in my case) /slack/hdb3/usr/src/linux and running patch there..
I note that the diff paths in the patches are relative.

This brings up a related question: Can I compile the slack kernel from the RH partition by modifying the
HOSTCC path in Makefile to /slack/hdb3/usr/bin/gcc?

-------
"The only stupid questions are the ones unasked,
but there may be some exceptions to this rule"
cheers
tim

Last edited by Tim Johnson; 02-17-2006 at 11:29 AM.
 
Old 02-19-2006, 02:33 AM   #8
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Quote:
Is there any reason why I can't do the patching by mounting the slack partition, cd'ing to (in my case) /slack/hdb3/usr/src/linux and running patch there..
That will work, just use the absolute path to the patch. e.g. You could do this:
cd /slack/hdb3/usr/src/linux
bzip2 -dc /usr/src/patch-2.6.15-ck4.bz2 | patch -p1

As for the other question, I have never tried that but I know if you want to change the root partition of a kernel you use rdev:
rdev /slack/hdb3/boot/vmlinuz hdb3 #Tell /slack/hdb3/boot/vmlinuz that it's root partition is hdb3

Last edited by /bin/bash; 02-19-2006 at 02:34 AM.
 
Old 02-19-2006, 11:21 AM   #9
Tim Johnson
Member
 
Registered: Oct 2004
Location: Palmer, Alaska
Distribution: ubuntu 10.04, Slack 13.0/32-bit
Posts: 206

Original Poster
Rep: Reputation: 30
Thanks. Of course the abs path makes sense.
And the reference to rdev was enlightening to say the least.
Never heard of it before, but it's going to be very valuable.
tim
 
  


Reply



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
kernel and alsa - howtos suck Tylerious Linux - Software 6 02-19-2006 03:06 AM
Kernel Patch (Patch-2.6.13) ukez Linux - Hardware 4 08-30-2005 03:40 PM
Kernel-Patch Debian Logo 2.6.2 not correctly working for custom kernel 2.6.11 smp deepclutch Debian 3 06-27-2005 03:59 AM
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:39 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
Open Source Consulting | Domain Registration