LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-12-2004, 10:02 AM   #1
jdaniel
Member
 
Registered: Jul 2003
Posts: 51

Rep: Reputation: 15
installing additional kernel source trees.. [a question]


Hello,

I need to build and load certain network hardware modules/drivers into a linux kernel. I have an amd_x86_64 machine running 2.4.21-141smp kernel on a Suse 9.0 dist. The problem is that the kernel patches for the network modules were written for a 2.4.21-256 kernel tree.

I attempted to download a 2.4.19-256 kernel source tree rpm from SuSE, but the rpm complained about the other installed kernel source. I finally forced it, but several directories appeared not to install correctly.

So perhaps there are kernel hackers that know immediately why I am having trouble. If so, your advise is much appreciated.

Thank you,
jdaniel
 
Old 01-12-2004, 04:16 PM   #2
mrhyde
Member
 
Registered: Jul 2003
Location: Europe
Posts: 198

Rep: Reputation: 30
Look for kernel-2.4.21-256-source-arch.rpm (where arch is the processor type you are using). Do you know how to build a custom modular kernel?
 
Old 01-12-2004, 05:26 PM   #3
jdaniel
Member
 
Registered: Jul 2003
Posts: 51

Original Poster
Rep: Reputation: 15
Oh yes, I have downloaded the correct x86_amd64 (opteron) kernel source from the SuSE ftp site.

My questions are: Can you have several kernel source trees installed at the same time? What exactly is the /usr/src/linux directory for (as opposed to the full source tree /usr/src/linux-2.4.19)?
 
Old 01-13-2004, 03:28 AM   #4
mrhyde
Member
 
Registered: Jul 2003
Location: Europe
Posts: 198

Rep: Reputation: 30
Ok, I have had three kernels installed on a machine at one time, a standard and two custom, I would imagine that you could have up to 4 or 5, so yes is the answer. The "/usr/src/linux" directory is usually a link to the source directory "/usr/src/linux-2.4.x". On a machine with more that 2 kernel sources the link "/usr/src/linux" usually points to the primary kernel, easy to access. Some distro's like Red Hat, make the kernel source available in a binary rpm file, during the execution of the rpm, installation scripts create the source directory and link it to "/usr/src/linux-2.4" rather than "/usr/src/linux".
 
Old 01-13-2004, 10:18 AM   #5
jdaniel
Member
 
Registered: Jul 2003
Posts: 51

Original Poster
Rep: Reputation: 15
The new source tree is not installing correctly from the rpm. I wish there was simply a tarball of the source tree. When I issue the following command:

rpm -ivh source-2.4.19.rpm

...it complains that there is a newer version already installed (and in fact, there is... 2.4.21). So I issue the following:

rpm -ivh source-2.4.19.rpm --force

Now it "almost" installs but fails with an error about /usr/src/linux/asm being a directory. (this occurs during what appears to be an archive unpack). There are missing direcoties now and empty directories where source should be located.
 
Old 01-13-2004, 12:15 PM   #6
mrhyde
Member
 
Registered: Jul 2003
Location: Europe
Posts: 198

Rep: Reputation: 30
Ok, you could alternativley get the source from kernel.org, manually unpack the archive and configure it. I will take you trough the steps if you want. Try to avoid using the force options with rpm, I once killed a server with it, it took my whole lunch break to sort it out!

Last edited by mrhyde; 01-13-2004 at 12:16 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
DISCUSSION: Downloading Source Trees 101 jeremy LinuxAnswers Discussion 0 10-10-2005 07:41 PM
apt-get kernel-source is installing the wrong kernel source. JordanH Ubuntu 10 07-08-2005 05:42 PM
Where do I find the kernel source trees for Mandrake 10? Leonard Noir Linux - Newbie 1 04-02-2004 10:13 PM
Nvidia drivers and kernel source trees anticitan Linux - Software 2 03-24-2004 11:33 PM
Alternative kernel source trees semicolon Linux - General 1 12-22-2003 09:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:21 AM.

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