Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-05-2006, 11:59 AM
|
#1
|
Member
Registered: Oct 2004
Location: Palmer, Alaska
Distribution: ubuntu 10.04, Slack 13.0/32-bit
Posts: 206
Rep:
|
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
|
|
|
02-05-2006, 12:14 PM
|
#2
|
Member
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795
Rep:
|
Just read up on the 'patch' command.
|
|
|
02-05-2006, 01:19 PM
|
#3
|
Senior Member
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247
Rep:
|
patch (file you need to patch) (patch file)
|
|
|
02-05-2006, 04:10 PM
|
#4
|
Member
Registered: Oct 2004
Location: Palmer, Alaska
Distribution: ubuntu 10.04, Slack 13.0/32-bit
Posts: 206
Original Poster
Rep:
|
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
|
|
|
02-17-2006, 03:53 AM
|
#5
|
Senior Member
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802
Rep:
|
Read /usr/src/linux/README
|
|
|
02-17-2006, 04:29 AM
|
#6
|
Member
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slack -- current
Posts: 354
Rep:
|
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.
|
|
|
02-17-2006, 10:38 AM
|
#7
|
Member
Registered: Oct 2004
Location: Palmer, Alaska
Distribution: ubuntu 10.04, Slack 13.0/32-bit
Posts: 206
Original Poster
Rep:
|
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.
|
|
|
02-19-2006, 02:33 AM
|
#8
|
Senior Member
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802
Rep:
|
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.
|
|
|
02-19-2006, 11:21 AM
|
#9
|
Member
Registered: Oct 2004
Location: Palmer, Alaska
Distribution: ubuntu 10.04, Slack 13.0/32-bit
Posts: 206
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 09:55 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|