LinuxQuestions.org
Review your favorite Linux distribution.
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 10-15-2003, 10:22 AM   #1
fixxxer0101
LQ Newbie
 
Registered: Aug 2003
Location: Wyoming
Distribution: Slackware
Posts: 25

Rep: Reputation: 15
Question compiling nvnet under 2.4.22


I found out that the reason my nvnet module won't work on my system is that it keeps compiling for 2.4.20 and I'm trying to run it with 2.4.22. The only thing is that I don't understand why it keeps on compiling for 2.4.20. I have the 2.4.22 source in my /usr/src/linux directory and I followed the compiling guide from slackware.com exactly. I even manually copied the System.map, the kernel image, and the .config file or what ever it is manually. If anyone knows why this module would still be compiling for 2.4.20, please help me out.
 
Old 10-15-2003, 10:48 AM   #2
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
sometimes the makefile for a specific project will need to be edited to
point to the kernel source directory. Sometimes a project will want to
use the running kernel. Is this part of your entire kernel compile
or a separate compile on it's own? If you compiled the kernel, did
you make ther modules, copy the bzImage to /boot, edit lilo.conf,
run lilo, reboot into the new kernel?

HTH
 
Old 10-15-2003, 10:57 AM   #3
fixxxer0101
LQ Newbie
 
Registered: Aug 2003
Location: Wyoming
Distribution: Slackware
Posts: 25

Original Poster
Rep: Reputation: 15
Since I am running slackware 9.0 so it origionally had 2.4.20 for the kernel. I downloaded the kernel src from kernel.org and compiled it on my system. nvnet is an ethernet module from nvidia for the nforce2 board. It is compiled seperately from the kernel itself. The problem is that it keeps compiling for the old kernel(2.4.20) which I am no longer using. I am actually running the newly compile 2.4.22 kernel.
 
Old 10-15-2003, 11:58 AM   #4
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
Maybe you have two copies of the compiles driver,

do a

find /lib/modules/ -name nvnet* -print

and see if you still have an old one about. If so, rename it to nvnet.o.not,
run depmod -a,
and modprobe it again.

HTH
 
Old 10-15-2003, 12:21 PM   #5
skog
Member
 
Registered: Sep 2003
Location: TX
Distribution: slackware
Posts: 301

Rep: Reputation: 30
check ur kernel version

check what slack is reporting as ur kernel ... there use to be afile that kept ur kernel version... Like when u log in it will say Welcome to <machine name> Linux-2.4.2xxx. There is a file in /etc that holds this setting. But when u upgrade ur kernel the file wont change so u will be using the 2.4.22 kernel but programs will think u are running the 2.4.20 kernel.

i forget the name of the file so just do something like
grep -R "2.4.20" /etc/*

this will find it then just change it to read 2.4.22 so programs u compile will know what to look for.
 
Old 10-15-2003, 01:05 PM   #6
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
well .... the motd is just a blurb for when users login, it doesn't affect compiling or running
drivers AFAIK.

You should have now two directories in /lib/modules, 2.4.20 and 2.4.22, if you boot into a
2.4.22 kernel, it will look for it's modules in the /lib/modules/2.4.22/ directory, and
similarly for a 2.4.20 kernel. If the modprobe of your nvnet driver is telling you that
it was compiles for a different kernel than what you are running, then that is what is
happening.

What is the exact error message when you try to load the driver?

uname -r will tell you what kernel is running.

I usually untar and build my kernels in /home/bbeers/kernels/linux-2.x.x
and make /usr/src/linux a symlink to the one I want to compile against.

Sometimes, you want pure source, sometimes patched, this allows you to
do both and not rebuild every module every time.
 
Old 10-15-2003, 10:58 PM   #7
fixxxer0101
LQ Newbie
 
Registered: Aug 2003
Location: Wyoming
Distribution: Slackware
Posts: 25

Original Poster
Rep: Reputation: 15
I don't know the exact words used in the error msg, but it is something like this: this module was compiled for kernel 2.4.20 while you are running kernel 2.4.22

All I really want to know is how I can fix the problem of the module compiling against the source for 2.4.20. It really seems like it would be something pretty simple to fix, but I am not too familier with the workings of linux, and all the literature I've ever read does not mention this problem at all. So if anyone could just point out exactly what I need to do to get this module to compile against my 2.4.22 source, then I would really appreciate it. Also I did try this:
grep -R "2.4.20" /etc/*
 
Old 10-16-2003, 07:39 AM   #8
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
What is the link to the nvnet driver source?

I've never seen it, but a quick look at the makefile,
or other instructions in that tarball may help resolve the mystery.

This isn't a binary (already compiled) by the nvidia folks by any chance?

Meanwhile are you certain that /usr/src/linux is the 2.4.22 sources? Where are
your 2.4.20 sources? What directories do you have in /lib/modules?

Also, did you try "insmod -f nvnet"? Sometimes you can force the module to load
even if it was compiled for a different kernel, as long as it's not too different. But,
when you insmod vs. modprobe, you must also force any preliminary drivers if
required (for example: eepro100.o requires mii.o is loaded first).
 
Old 10-16-2003, 01:00 PM   #9
fixxxer0101
LQ Newbie
 
Registered: Aug 2003
Location: Wyoming
Distribution: Slackware
Posts: 25

Original Poster
Rep: Reputation: 15
the page with all the linux drivers is: http://www.nvidia.com/object/linux_nforce_1.0-0261
the source tarballs are at the bottom of the page. NVIDIA_nforce-1.0-0261.tar.gz is the one I downloaded. Also the ONLY kernel source still present on my system is the 2.4.22 source that I downloaded from kernel.org. Being that I never wanted to recompile 2.4.20 I never put the source on my computer from the slack cd.
 
Old 10-16-2003, 01:17 PM   #10
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
Did you read the part here:
http://download.nvidia.com/XFree86/n..._1.0-0261.html
It says:
***********************************
GART Patch Installation
NOTE: This patch only supports kernel 2.4.20. You will need to either install kernel 2.4.20 and sources before patching, or manually merge these changes to other kernel versions.

Patching the Kernel

1. Change to the Linux kernel source directory.


example# cd /usr/src/linux-2.4.20


2. Patch the kernel. Watch out for any warnings or errors.


example# patch -p1 < linux-2.4.20-agpgart.diff

Configuring the Kernel

* In order to use NVIDIA AGP chipset support, the kernel must be configured accordingly.
* In the kernel source directory, run a kernel configuration tool such as menuconfig:


example# make menuconfig


* In the 'Processor type and features', make sure that an x86 compatible CPU is selected.
* In the 'Character devices' section, select '/dev/agpgart (AGP Support)' as an included or modularized kernel feature.
* In the same section, enable 'NVIDIA chipset support'.

Rebuilding and Reinstalling the Kernel
Rebuild and reinstall the kernel and the kernel modules following the appropriate procedure for your GNU/Linux distribution.
***************************************
So, the next question is ... did you manually patch your 2.4.22 kernel sources with the GART patches?
 
Old 10-16-2003, 02:12 PM   #11
fixxxer0101
LQ Newbie
 
Registered: Aug 2003
Location: Wyoming
Distribution: Slackware
Posts: 25

Original Poster
Rep: Reputation: 15
do I need to install that in order to use nvnet? I just installed nvnet seperate from anything else. I don't really need anything else.
 
Old 10-16-2003, 05:37 PM   #12
bbeers
Member
 
Registered: Jul 2002
Location: Florida
Distribution: Centos, Slackware
Posts: 260

Rep: Reputation: 30
Maybe not, the documentation doesn't discuss building individual parts,
but the Makefiles look like it would be okay.

Did you try "insmod -f"? What did it say?

what do you get from:

uname -r
ls -al /lib/modules/
ls -al /lib/modules/`uname -r`
strings nvnet.o | grep kernel_version

If you don't have 2.4.20 sources, the driver can't be compiled for 2.4.20 kernel.
But there may be something in the sources that is hard-coded.
 
Old 10-16-2003, 11:05 PM   #13
fixxxer0101
LQ Newbie
 
Registered: Aug 2003
Location: Wyoming
Distribution: Slackware
Posts: 25

Original Poster
Rep: Reputation: 15
I did use that line that tells what kernel is running, and it verfied that I am running 2.4.22. I did email nvidia, and all they said was that they think it's compiling against 2.4.20 instead of 2.4.22. Which is what we've been saying. But they say it is compatible with 2.4.22. I don't know what the deal is. If anyone has the nforce board with slack 9.1 that has the default 2.4.22 kernel, and have or haven't had problems, it might help to hear about it. Then I would know that it is something about me upgrading my kernel. Anyways, there has got to be a simple explantation for it.
 
Old 10-17-2003, 12:05 AM   #14
LSD
Member
 
Registered: Jan 2003
Location: Northam, W.A., Australia
Distribution: Gentoo ~x86
Posts: 321

Rep: Reputation: 31
The AGPGART patch isn't required for networking. In fact, it isn't required at all with kernel 2.4.22 as it's already present in the vanilla sources. You also don't have to compile all the drivers together either, you can compile the audio (which isn't strictly required on Slack 9.1 as it supports ALSA) or the LAN driver seperately by simply changing into the relevant directory (either nvaudio or nvnet respectively) and running make && make install from there.

fixxxer0101, are you absolutely, positively sure all traces of the 2.4.20 kernel have been removed from your system. That includes old modules, kernel image files, the works. Use pkgtool to remove any packages like 'kernel-ide' or 'kernel-modules' (AFAIK, the headers can stay, nvnet doesn't use them but some programs expect them to be there so it's best to leave them be, just remove the kernel images and the kernel modules). Next make sure you've compiled and installed any modules that are required for your new kernel (make modules && make modules_install after the main make bzImage.) and most importantly of all, you've included loadable module support in your new kernel. Once you've made sure there's nothing left of 2.4.20 to get in the way, try compiling nvnet again.
 
  


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
nvnet drivers...HELP! bomelia Linux - Networking 2 05-25-2004 07:03 AM
NVNet won't initialize synecdoche Linux - Hardware 2 01-24-2004 07:33 PM
Need help with nvnet nvaudio xiojqwnko Slackware 2 12-08-2003 11:30 AM
Nvnet + Core 1 gibbylinks Fedora 1 11-09-2003 10:03 AM
Help :( (Nforce2 / nvnet) Starburn Linux - Hardware 5 10-26-2003 06:21 PM

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

All times are GMT -5. The time now is 05:51 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