LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What is source kernel? (https://www.linuxquestions.org/questions/linux-newbie-8/what-is-source-kernel-181591/)

can564 05-14-2004 08:46 PM

What is source kernel?
 
I know this question is stupid!

I have installed Fedora Core 1 kernel-2.4.22-1.2115.nptl.I had a little trouble getting my nforce2 motherboard networking up and running.I found a driver at nvidia.I actually found a tar and a RPM.I used them and got my networking up and running.Up2date program was blinking in the corner so I said "What the heck I will give updating a try".Much to my suprise it downloaded a new kernel-2.4.22-1.2188.nptl.

When I boot into the new kernel my networking does not work.(As root)I tried use the same "make" and "make install" that I used in kernel-2.4.22-1.2115.nptl.But I get a error "Unresolved symbols".I have read the html with the drivers and it says to check my kernel source to see if a "source version" equals my new running kernel-2.4.22-1.2188.nptl .

It says use "rpm -qa / grep kernel" and to look for matching "kernel" and "kernel source" versions.This is what I get-------

[root@localhost root]# rpm -qa / grep kernel
grep-2.5.1-17
kernel-2.4.22-1.2115.nptl
kernel-2.4.22-1.2188.nptl
[root@localhost root]# uname -r
2.4.22-1.2188.nptl
[root@localhost root]#

Do I have a source for either kernel?
Where and what command do I use to install the source?

peacebwitchu 05-14-2004 09:05 PM

Use the | (pipe) instead of a forward slash.

can564 05-15-2004 08:29 AM

I see / and \ am I missing the pipe somewhere is it just the lower case "L"

Jimbo99 05-15-2004 11:40 AM

But he asked what the source kernel is. Someone should answer that question instead of pointing out a syntax issue in his command.

wrongman 05-15-2004 01:08 PM

i'm a newbie too, but i think the source is simple what the name says... the code, not compiled, of the kernel, usually if you have the source it is in /usr/src/ directory, check that, good luck

ksgill 05-15-2004 01:22 PM

pipe is right under the backspace command in a standard US keyboard.

peacebwitchu 05-15-2004 03:23 PM

The kernel source is the uncompiled source code. To see if it is installed use "rpm -qa |grep kernel-source" or rpm -q kernel-source. Make sure that the version matches the version you are currently using by matching it to "uname -a". By the way Jimbo syntax is everything.

peacebwitchu 05-15-2004 03:34 PM

Forgot to mention the official kernel source is located @ www.kernel.org. When compiling some programs or drivers you have to have the kernel source that matches the kernel installed.

can564 05-15-2004 03:53 PM

O.K. I think it's clearer now.I have found the "pipe" key.Thank you.I am at work and cannot check for my source.I will when I get home!

If I have new kernel installed but not the "source kernel".Do I just find,download,unzip into usr/src ,check my smbolic link direction,but not re-install?

Then run my my driver install files?

Thank you for everyones help!!

peacebwitchu 05-15-2004 04:13 PM

The kernel source package should be a rpm if you are running Fedora. So once you have the kernel source package do a rpm -i kernel-source-xxxxx.rpm . This should place it in /usr/src.

can564 05-15-2004 07:11 PM

O.K. you all have helped but I still run into the same wall.I cannot install my nvidia drivers on this kernel. The driver directions say "unresolved symbols" are the result of missing or wrong kernel source or a bad symbolic link in usr/src.When I boot into kernel-2.4.22-1.2188.nptl. I run rpm -qa | grep kernel and get this

[root@localhost root]# rpm -qa | grep kernel
kernel-doc-2.4.22-1.2188.nptl
kernel-2.4.22-1.2115.nptl
kernel-source-2.4.22-1.2188.nptl
kernel-utils-2.4-9.1.101.fedora
kernel-2.4.22-1.2188.nptl
kernel-pcmcia-cs-3.1.31-16
[root@localhost root]#

So I do have my kernel source installed.Next I checked my symbolic link in usr/src and get

[root@localhost root]# ls -l /usr/src/linux-2.4
lrwxrwxrwx 1 root root 24 May 9 12:08 /usr/src/linux-2.4 -> linux-2.4.22-1.2188.nptl
[root@localhost root]#

So it is pointing to my new kernel I am running and booted in.

One more time I get "unresolved symbols" when running "make" and then "make install" on the untarred nvidia drivers.The script looks like this

[root@localhost root]# cd Desktop
[root@localhost Desktop]# make
make -C nvnet
make[1]: Entering directory `/root/Desktop/nvnet'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/Desktop/nvnet'
make -C nvaudio
make[1]: Entering directory `/root/Desktop/nvaudio'
make nvaudio.o
make[2]: Entering directory `/root/Desktop/nvaudio'
make[2]: `nvaudio.o' is up to date.
make[2]: Leaving directory `/root/Desktop/nvaudio'
make[1]: Leaving directory `/root/Desktop/nvaudio'
make -C nvgart
make[1]: Entering directory `/root/Desktop/nvgart'
making gart
make[1]: Leaving directory `/root/Desktop/nvgart'
[root@localhost Desktop]# make install
make -C nvnet install
make[1]: Entering directory `/root/Desktop/nvnet'
mkdir -p //lib/modules/2.4.22-1.2188.nptl/kernel/drivers/net
install -b -m 644 -o root nvnet.o //lib/modules/2.4.22-1.2188.nptl/kernel/drivers/net
/sbin/depmod -a
depmod: *** Unresolved symbols in /lib/modules/2.4.22-1.2188.nptl/kernel/drivers/net/nvnet.o
depmod: *** Unresolved symbols in /lib/modules/2.4.22-1.2188.nptl/kernel/drivers/net/nvnet.o~
make[1]: Leaving directory `/root/Desktop/nvnet'
make -C nvaudio install
make[1]: Entering directory `/root/Desktop/nvaudio'
mkdir -p //lib/modules/2.4.22-1.2188.nptl/kernel/drivers/sound
install -b -m 644 -o root nvaudio.o //lib/modules/2.4.22-1.2188.nptl/kernel/drivers/sound
/sbin/depmod -a
depmod: *** Unresolved symbols in /lib/modules/2.4.22-1.2188.nptl/kernel/drivers/net/nvnet.o
depmod: *** Unresolved symbols in /lib/modules/2.4.22-1.2188.nptl/kernel/drivers/net/nvnet.o~
make[1]: Leaving directory `/root/Desktop/nvaudio'
make -C nvgart install
make[1]: Entering directory `/root/Desktop/nvgart'
mkdir -p //usr/src/nvidia/nvgart
install -b -m 644 -o root linux-2.4.20-agpgart.diff //usr/src/nvidia/nvgart
install -b -m 644 -o root README //usr/src/nvidia/nvgart
make[1]: Leaving directory `/root/Desktop/nvgart'
[root@localhost Desktop]# modprobe nvnet
/lib/modules/2.4.22-1.2188.nptl/kernel/drivers/net/nvnet.o: kernel-module version mismatch
/lib/modules/2.4.22-1.2188.nptl/kernel/drivers/net/nvnet.o was compiled for kernel version 2.4.22-1.2115.nptl
while this kernel is version 2.4.22-1.2188.nptl.
/lib/modules/2.4.22-1.2188.nptl/kernel/drivers/net/nvnet.o: insmod /lib/modules/2.4.22-1.2188.nptl/kernel/drivers/net/nvnet.o failed
/lib/modules/2.4.22-1.2188.nptl/kernel/drivers/net/nvnet.o: insmod nvnet failed
[root@localhost Desktop]#

Any ideas?You guys have really helped a newbie.Thank you for sticking with me on this problem

peacebwitchu 05-15-2004 10:16 PM

Try doing "make clean" in the source direcory of your driver. Then make sure that their is
a link from /lib/modules/yourkernelverson/build to your source directory. Then compile your diver again.

can564 05-16-2004 10:40 AM

I am very close.As a matter of fact I am posting this post from my new kernel.However I still lose networking when I reboot.This is what I did.I am not sure if your

"Then make sure that their is
a link from /lib/modules/yourkernelverson/build to your source directory."

is confirmed by this [root@localhost root]# ls -l /usr/src/linux-2.4
lrwxrwxrwx 1 root root 24 May 9 12:08 /usr/src/linux-2.4 -> linux-2.4.22-1.2188.nptl
[root@localhost root]#

or should it be directed to kernel-source-2.4.22-1.2188.nptl

So i was unsure and left "as is".Then I went to my Nvidia untarred file.It would not let me "make clean" on the whole ball of wax at once.So I went into each sub-dir nvnet and nvaudio and did a "make clean" in each of those.Then went back out to the Nvidia folder and did a "make" and "make install".

Then netconfig
Then modprobe nvnet

Now my networking is loaded but i got an error during modprobe and when I reboot I lose the network and have to do the above steps all over again.

The error was
[root@localhost Nvidia]# modprobe nvnet
Warning: loading /lib/modules/2.4.22-1.2188.nptl/kernel/drivers/net/nvnet.o will taint the kernel: non-GPL license - NVIDIA
See http://www.tux.org/lkml/#export-tainted for information about tainted modules
Module nvnet loaded, with warnings
[root@localhost Nvidia]#

I did go to the suggested site but I could not tell for sure what they wanted me to do there!

I feel like I am so close yet so far!!!

can564 05-16-2004 10:59 AM

Oh how this rots!I lost all my network on my previous kernel.Not matter what I do it won't comeback.If I try make clean and make && make install I get reams of errors."Pointer" this and "pointer" that.I guess for now I will concentrate on this new kernel.All I have to do is open a terminal and do netconfig and modprobe nvnet and I am on the web,but it is still a drag that I cannot get both kernels to work at the same time

peacebwitchu 05-16-2004 11:36 AM

The error about the kernel being taintd is just a warning because it is a third party driver that is not under the GPL that is normal. Add that driver to your /etc/modules.conf so that it will get loaded at boot.


All times are GMT -5. The time now is 10:34 PM.