LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   installing additional kernel source trees.. [a question] (https://www.linuxquestions.org/questions/linux-general-1/installing-additional-kernel-source-trees-%5Ba-question%5D-133990/)

jdaniel 01-12-2004 10:02 AM

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

mrhyde 01-12-2004 04:16 PM

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?

jdaniel 01-12-2004 05:26 PM

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)?

mrhyde 01-13-2004 03:28 AM

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".

jdaniel 01-13-2004 10:18 AM

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.

mrhyde 01-13-2004 12:15 PM

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!


All times are GMT -5. The time now is 06:51 AM.