LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Help with Intel e1000 driver (https://www.linuxquestions.org/questions/slackware-14/help-with-intel-e1000-driver-494276/)

berg4091 10-20-2006 09:46 PM

Help with Intel e1000 driver
 
I downloaded the Intel e1000 LAN card drivers and followed their instructions. However, when I run make, it says I only have the 2.4.33 source. I installed the stock huge26 kernel in Slack 11. How do and where to I place the kernel source so that make can find it? Thanks.

Dngrsone 10-20-2006 10:03 PM

Go to the second CD go into the extras directory. Run pkgtool from there and install the source files.

berg4091 10-22-2006 05:28 PM

Thanks for the help!

Now I have a new issue. When I run make install it says it' cant find a manual file. I don't know what the problem is, because the man file is in the tarball so it should be able to find it. Also, I don't know if this error stops make install, but when I run insmod e1000, it says it can't find that location. Any ideas?

willysr 10-22-2006 07:48 PM

it's Slackware's packages right? You only need to use installpkg <packagename>.tgz to install it

kernel source will be on /usr/src/<kernel-version>

don't forget to install kernel-modules also or else you will have a single kernel without any modules :)

berg4091 10-23-2006 06:16 PM

No, it's a tar.gz file from Intel's website. I don't think there is a Slackware package, but if there is and I'm too dumb to know it, please tell me! Any other suggestions?

willysr 10-23-2006 10:07 PM

please make sure you have kernel-modules installed and kernel-source if you want to build your driver and include them on your current kernel

next, extract the file using
Code:

tar -xzvf filename.tar.gz
look for INSTALL or README files which will explain what to do in order to install/compile the driver

berg4091 10-24-2006 06:04 PM

I have the proper kernel source and modules installed. I already unpacked the tarball and placed it in the proper directory. Here is the referenced area in the Intel README:

Building and Installation
=========================

To build a binary RPM* package of this driver, run 'rpmbuild -tb
<filename.tar.gz>'. Replace <filename.tar.gz> with the specific filename of
the driver.

NOTE: For the build to work properly, the currently running kernel MUST match
the version and configuration of the installed kernel sources. If you
have just recompiled the kernel reboot the system now.

1. Move the base driver tar file to the directory of your choice. For example,
use /home/username/e1000 or /usr/local/src/e1000.

2. Untar/unzip archive:

tar zxf e1000-x.x.x.tar.gz

3. Change to the driver src directory:

cd e1000-x.x.x/src/

4. Compile the driver module:

make install

The binary will be installed as:

/lib/modules/[KERNEL_VERSION]/kernel/drivers/net/e1000.o

The install locations listed above are the default locations. They may
not be correct for certain Linux distributions. For more information,
see the ldistrib.txt file included in the driver tar.

5. Install the module:

insmod e1000 <parameter>=<value>

6. Assign an IP address to the interface by entering the following, where
x is the interface number:

ifconfig ethx <IP_address>

7. Verify that the interface works. Enter the following, where <IP_address>
is the IP address for another machine on the same subnet as the interface
that is being tested:

ping <IP_address>


Should I delete the e1000 files that are in there now, reinstall source and modules and try again?

willysr 10-24-2006 08:45 PM

i think you only need to run
Code:

make install
in the src directory and it will place the modules on the correct directory and you can proceed with step 5

berg4091 10-25-2006 07:39 PM

Ok, I deleted the e1000 files I created previously and retried the make install procedure and got the following gcc messages:

gcc -DLINUX -D__KERNEL__ -DMODULE -O2 -pipe -Wall -I/lib/modules/2.6.17.13/build/include -I. -DIANS -DIANS_BASE_ADAPTER_TEAMING -DIANS_BASE_VLAN_TAGGING -DIANS_BASE_VLAN_ID -DIDIAG -c -o e1000_main.o e1000_main.c
In file included from /lib/modules/2.6.17.13/build/include/linux/rwsem.h:27,
from /lib/modules/2.6.17.13/build/include/asm/semaphore.h:42,
from /lib/modules/2.6.17.13/build/include/linux/sched.h:20,
from /lib/modules/2.6.17.13/build/include/linux/module.h:10,
from e1000.h:40,
from e1000_main.c:33:
/lib/modules/2.6.17.13/build/include/asm/rwsem.h: In function `__down_read':
/lib/modules/2.6.17.13/build/include/asm/rwsem.h:105: error: syntax error before "KBUILD_BASENAME"
/lib/modules/2.6.17.13/build/include/asm/rwsem.h: In function `__down_write':
/lib/modules/2.6.17.13/build/include/asm/rwsem.h:157: error: syntax error before "KBUILD_BASENAME"
/lib/modules/2.6.17.13/build/include/asm/rwsem.h: In function `__up_read':
/lib/modules/2.6.17.13/build/include/asm/rwsem.h:194: error: syntax error before "KBUILD_BASENAME"
/lib/modules/2.6.17.13/build/include/asm/rwsem.h:188: warning: unused variable `tmp'
/lib/modules/2.6.17.13/build/include/asm/rwsem.h: In function `__up_write':
/lib/modules/2.6.17.13/build/include/asm/rwsem.h:220: error: syntax error before "KBUILD_BASENAME"
/lib/modules/2.6.17.13/build/include/asm/rwsem.h: In function `__downgrade_write':
/lib/modules/2.6.17.13/build/include/asm/rwsem.h:245: error: syntax error before "KBUILD_BASENAME"
In file included from /lib/modules/2.6.17.13/build/include/linux/sched.h:20,
from /lib/modules/2.6.17.13/build/include/linux/module.h:10,
from e1000.h:40,
from e1000_main.c:33:
/lib/modules/2.6.17.13/build/include/asm/semaphore.h: In function `down':
/lib/modules/2.6.17.13/build/include/asm/semaphore.h:105: error: syntax error before "KBUILD_BASENAME"
/lib/modules/2.6.17.13/build/include/asm/semaphore.h: In function `down_interruptible':
/lib/modules/2.6.17.13/build/include/asm/semaphore.h:130: error: syntax error before "KBUILD_BASENAME"
/lib/modules/2.6.17.13/build/include/asm/semaphore.h: In function `down_trylock':
/lib/modules/2.6.17.13/build/include/asm/semaphore.h:155: error: syntax error before "KBUILD_BASENAME"
/lib/modules/2.6.17.13/build/include/asm/semaphore.h: In function `up':
/lib/modules/2.6.17.13/build/include/asm/semaphore.h:179: error: syntax error before "KBUILD_BASENAME"
In file included from /lib/modules/2.6.17.13/build/include/linux/irq.h:22,
from /lib/modules/2.6.17.13/build/include/asm/hardirq.h:6,
from /lib/modules/2.6.17.13/build/include/linux/hardirq.h:7,
from /lib/modules/2.6.17.13/build/include/linux/interrupt.h:11,
from /lib/modules/2.6.17.13/build/include/asm/highmem.h:24,
from /lib/modules/2.6.17.13/build/include/linux/highmem.h:24,
from /lib/modules/2.6.17.13/build/include/linux/skbuff.h:27,
from /lib/modules/2.6.17.13/build/include/linux/if_ether.h:111,
from /lib/modules/2.6.17.13/build/include/linux/netdevice.h:29,
from e1000.h:49,
from e1000_main.c:33:
/lib/modules/2.6.17.13/build/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory
In file included from /lib/modules/2.6.17.13/build/include/asm/hardirq.h:6,
from /lib/modules/2.6.17.13/build/include/linux/hardirq.h:7,
from /lib/modules/2.6.17.13/build/include/linux/interrupt.h:11,
from /lib/modules/2.6.17.13/build/include/asm/highmem.h:24,
from /lib/modules/2.6.17.13/build/include/linux/highmem.h:24,
from /lib/modules/2.6.17.13/build/include/linux/skbuff.h:27,
from /lib/modules/2.6.17.13/build/include/linux/if_ether.h:111,
from /lib/modules/2.6.17.13/build/include/linux/netdevice.h:29,
from e1000.h:49,
from e1000_main.c:33:
/lib/modules/2.6.17.13/build/include/linux/irq.h: At top level:
/lib/modules/2.6.17.13/build/include/linux/irq.h:85: error: `NR_IRQS' undeclared here (not in a function)
In file included from /lib/modules/2.6.17.13/build/include/linux/irq.h:94,
from /lib/modules/2.6.17.13/build/include/asm/hardirq.h:6,
from /lib/modules/2.6.17.13/build/include/linux/hardirq.h:7,
from /lib/modules/2.6.17.13/build/include/linux/interrupt.h:11,
from /lib/modules/2.6.17.13/build/include/asm/highmem.h:24,
from /lib/modules/2.6.17.13/build/include/linux/highmem.h:24,
from /lib/modules/2.6.17.13/build/include/linux/skbuff.h:27,
from /lib/modules/2.6.17.13/build/include/linux/if_ether.h:111,
from /lib/modules/2.6.17.13/build/include/linux/netdevice.h:29,
from e1000.h:49,
from e1000_main.c:33:
/lib/modules/2.6.17.13/build/include/asm/hw_irq.h:30: error: `NR_IRQ_VECTORS' undeclared here (not in a function)
e1000_main.c:207: warning: initialization from incompatible pointer type
e1000_main.c: In function `e1000_up':
e1000_main.c:267: warning: passing arg 2 of `request_irq' from incompatible pointer type
e1000_main.c: In function `e1000_notify_reboot':
e1000_main.c:2409: warning: implicit declaration of function `pci_for_each_dev'
e1000_main.c:2409: error: syntax error before '{' token
e1000_main.c: At top level:
e1000_main.c:2414: error: syntax error before "return"
e1000_main.c: In function `e1000_suspend':
e1000_main.c:2459: error: too many arguments to function `pci_save_state'
e1000_main.c: In function `e1000_resume':
e1000_main.c:2475: error: too many arguments to function `pci_restore_state'
make: *** [e1000_main.o] Error 1

I assume that the build still worked despite all this complaining. I then ran modprobe e1000 even though it doesn't say so in the README. There was no message. Then I went to the directory where the driver is supposed to be installed and:

root@linuxbox:/lib/modules/2.6.17.13/kernel/drivers/net/e1000# insmod e1000
insmod: can't read 'e1000': No such file or directory

And when I add the file extension:

root@linuxbox:/lib/modules/2.6.17.13/kernel/drivers/net/e1000# insmod e1000.ko
insmod: error inserting 'e1000.ko': -1 File exists

Does this mean the module is already installed? If so, why does this happen:

root@linuxbox:/lib/modules/2.6.17.13/kernel/drivers/net/e1000# ifconfig eth0
eth0: error fetching interface information: Device not found

Am I not including some required parameter or argument? The first network card is eth0, correct? Am I doing anything else wrong?

By the way, I'm really thankful for all your help and trouble.

Dngrsone 10-25-2006 09:09 PM

Try make clean then make and make install.

berg4091 10-27-2006 04:36 PM

I tried make clean, make and make install again. It didn't work. I even loaded the stock e100 driver, ran ifconfig, netconfig, and still was nowhere. I'm throwing in the towel on this one. I need to get stuff done, and can't mess around anymore. I'm going back to Ubuntu for now. But to all the people who tried to help: Thank you very much!

salah-ad-din 11-17-2006 09:17 PM

e1000 solution for sure sure
 
Got the same NIC on one of my boxes, you have to cd all the way to the src file within the e1000-7.2.7 folder, then run make install. Then you have to create a ifcfg file in /etc/sysconfig/network-scripts that's where it is in PCLinuxOS so I don't know where that is in Slackware. Just find where your eth configuration files are in what will probably still be a network scripts folder I think. So to create it you put in this format if you don't already have a ifcfg file for another interface set up:
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=dhcp

The device, start at boot, and all I know is DHCP so if you have static I can't help even though I'm sure it's simple.

Then after you run modprobe you must specify the full path to the e1000 driver when running the insmod command if you on kernel 2.6. Then you run "ifup eth0" eth1 or eth2 depending on device.

I hope this will help someone, since it would seem it would be too late for this person from looking at the last post date.


All times are GMT -5. The time now is 04:52 AM.