LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-05-2006, 04:47 AM   #1
abbeycatblue
LQ Newbie
 
Registered: Oct 2006
Location: Shropshire
Distribution: Fedora Core 5
Posts: 1

Rep: Reputation: 0
10/100 Intel 82562ET - linux driver help required please


Forgive me - I'm new to Linux! I want to migrate away from XP but to date I am struggling with 10/100 ethernet set up.

I am using Kernel 2.6.15-1.2054_FC5 Fedora core 5 on a dell dimension 3100 The ethernet card identifies itself as Intel 82562ET.

I have located an Intel e100-3.5.14.tar.gz file for the driver but I'm having difficulty getting this to run. It infers that it should work with kernel 2.6?

i get as far as the 'make install' command and it stops at:

Makefile:65 ***Linux Kernel source not found. Stop.

the path to the kernel/source & build files are located in folder:
lib/modules/2.6.15-1.2054_FC5/

the following is the 'makefile script'. Any help in understanding the script would be appreciated. It appears to be written for several types of linux. If you can suggest a simpler way of writng the driver as the kernel and location are known this would help me greatly.
I am at the point of having to reconsider going back to xp due to the cost in time that this problem is taking up.. thanks in advance.

e100-3.5.14.tar.gz

makefile contents:
###########################################################################
# Driver files

# core driver files
CFILES = e100.c
HFILES = kcompat.h
ifeq (,$(BUILD_KERNEL))
BUILD_KERNEL=$(shell uname -r)
endif

###########################################################################
# Environment tests

# Kernel Search Path
# All the places we look for kernel source
KSP := /lib/modules/$(BUILD_KERNEL)/build \
/lib/modules/$(BUILD_KERNEL)/source \
/usr/src/linux-$(BUILD_KERNEL) \
/usr/src/linux-$($(BUILD_KERNEL) | sed 's/-.*//') \
/usr/src/kernel-headers-$(BUILD_KERNEL) \
/usr/src/kernel-source-$(BUILD_KERNEL) \
/usr/src/linux-$($(BUILD_KERNEL) | sed 's/\([0-9]*\.[0-9]*\)\..*/\1/') \
/usr/src/linux

# prune the list down to only values that exist
# and have an include/linux sub-directory
test_dir = $(shell [ -e $(dir)/include/linux ] && echo $(dir))
KSP := $(foreach dir, $(KSP), $(test_dir))

# we will use this first valid entry in the search path
ifeq (,$(KSRC))
KSRC := $(firstword $(KSP))
endif

ifeq (,$(KSRC))
$(error Linux kernel source not found)
else
ifeq (/lib/modules/$(shell uname -r)/source, $(KSRC))
KOBJ := /lib/modules/$(shell uname -r)/build
else
KOBJ := $(KSRC)
endif
endif

# check for version.h and autoconf.h for running kernel in /boot (SUSE)
ifneq (,$(wildcard /boot/vmlinuz.version.h))
VERSION_FILE := /boot/vmlinuz.version.h
CONFIG_FILE := /boot/vmlinuz.autoconf.h
KVER := $(shell $(CC) $(CFLAGS) -E -dM $(VERSION_FILE) | \
grep UTS_RELEASE | awk '{ print $$3 }' | sed 's/\"//g')
ifeq ($(KVER),$(shell uname -r))
# set up include path to override headers from kernel source
x:=$(shell rm -rf include)
x:=$(shell mkdir -p include/linux)
x:=$(shell cp /boot/vmlinuz.version.h include/linux/version.h)
x:=$(shell cp /boot/vmlinuz.autoconf.h include/linux/autoconf.h)
CFLAGS += -I./include
else
VERSION_FILE := $(KOBJ)/include/linux/version.h
CONFIG_FILE := $(KSRC)/include/linux/autoconf.h
endif
else
VERSION_FILE := $(KOBJ)/include/linux/version.h
CONFIG_FILE := $(KSRC)/include/linux/autoconf.h
endif

ifeq (,$(wildcard $(VERSION_FILE)))
$(error Linux kernel source not configured - missing version.h)
endif

ifeq (,$(wildcard $(CONFIG_FILE)))
$(error Linux kernel source not configured - missing autoconf.h)
endif

# pick a compiler
ifneq (,$(findstring egcs-2.91.66, $(shell cat /proc/version)))
CC := kgcc gcc cc
else
CC := gcc cc
endif
test_cc = $(shell $(cc) --version > /dev/null 2>&1 && echo $(cc))
CC := $(foreach cc, $(CC), $(test_cc))
CC := $(firstword $(CC))
ifeq (,$(CC))
$(error Compiler not found)
endif

# we need to know what platform the driver is being built on
# some additional features are only built on Intel platforms
ARCH := $(shell uname -m | sed 's/i.86/i386/')
ifeq ($(ARCH),alpha)
CFLAGS += -ffixed-8 -mno-fp-regs
endif
ifeq ($(ARCH),x86_64)
CFLAGS += -mcmodel=kernel -mno-red-zone
endif
ifeq ($(ARCH),ppc)
CFLAGS += -msoft-float
endif
ifeq ($(ARCH),ppc64)
CFLAGS += -m64 -msoft-float
LDFLAGS += -melf64ppc
endif

# standard flags for module builds
CFLAGS += -DLINUX -D__KERNEL__ -DMODULE -O2 -pipe -Wall
CFLAGS += -I$(KSRC)/include -I.
CFLAGS += $(shell [ -f $(KSRC)/include/linux/modversions.h ] && \
echo "-DMODVERSIONS -DEXPORT_SYMTAB \
-include $(KSRC)/include/linux/modversions.h")

CFLAGS += $(CFLAGS_EXTRA)
#ifeq (,$(shell echo $(CFLAGS_EXTRA) | grep NAPI))
#CFLAGS += -DE100_NO_NAPI
#CFLAGS_EXTRA += -DE100_NO_NAPI
#endif

RHC := $(KSRC)/include/linux/rhconfig.h
ifneq (,$(wildcard $(RHC)))
# 7.3 typo in rhconfig.h
ifneq (,$(shell $(CC) $(CFLAGS) -E -dM $(RHC) | grep __module__bigmem))
CFLAGS += -D__module_bigmem
endif
endif

# get the kernel version - we use this to find the correct install path
KVER := $(shell $(CC) $(CFLAGS) -E -dM $(VERSION_FILE) | grep UTS_RELEASE | \
awk '{ print $$3 }' | sed 's/\"//g')

KKVER := $(shell echo $(KVER) | \
awk '{ if ($$0 ~ /2\.[4-9]\./) print "1"; else print "0"}')
ifeq ($(KKVER), 0)
$(error *** Aborting the build. \
*** This driver is not supported on kernel versions older than 2.4.0)
endif

# set the install path
INSTDIR := /lib/modules/$(KVER)/kernel/drivers/net/e100

# look for SMP in config.h
SMP := $(shell $(CC) $(CFLAGS) -E -dM $(CONFIG_FILE) | \
grep -w CONFIG_SMP | awk '{ print $$3 }')
ifneq ($(SMP),1)
SMP := 0
endif

ifneq ($(SMP),$(shell uname -a | grep SMP > /dev/null 2>&1 && echo 1 || echo 0))
$(warning ***)
ifeq ($(SMP),1)
$(warning *** Warning: kernel source configuration (SMP))
$(warning *** does not match running kernel (UP))
else
$(warning *** Warning: kernel source configuration (UP))
$(warning *** does not match running kernel (SMP))
endif
$(warning *** Continuing with build,)
$(warning *** resulting driver may not be what you want)
$(warning ***)
endif

ifeq ($(SMP),1)
CFLAGS += -D__SMP__
endif

###########################################################################
# 2.4.x & 2.6.x Specific rules

K_VERSION:=$(shell uname -r | cut -c1-3 | sed 's/2\.[56]/2\.6/')

ifeq ($(K_VERSION), 2.6)

# Makefile for 2.6.x kernel
TARGET = e100.ko

# man page
MANSECTION = 7
MANFILE = $(TARGET:.ko=.$(MANSECTION))

ifneq ($(PATCHLEVEL),)
EXTRA_CFLAGS += $(CFLAGS_EXTRA)
obj-m += e100.o
else
default:
ifeq ($(KOBJ),$(KSRC))
make -C $(KSRC) SUBDIRS=$(shell pwd) modules
else
make -C $(KSRC) O=$(KOBJ) SUBDIRS=$(shell pwd) modules
endif
endif

else # ifeq ($(K_VERSION),2.6)

# Makefile for 2.4.x kernel
TARGET = e100.o

# man page
MANSECTION = 7
MANFILE = $(TARGET:.o=.$(MANSECTION))

# Get rid of compile warnings in kernel header files from SuSE
ifneq (,$(wildcard /etc/SuSE-release))
CFLAGS += -Wno-sign-compare -fno-strict-aliasing
endif

# Get rid of compile warnings in kernel header files from fedora
ifneq (,$(wildcard /etc/fedora-release))
CFLAGS += -fno-strict-aliasing
endif

.INTERMEDIATE: e100_tmp
.SILENT: e100_tmp
e100_tmp: $(CFILES:.c=.o)
echo; echo
echo "**************************************************"
echo "** $(TARGET) built for $(KVER)"
echo -n "** SMP "
if [ "$(SMP)" = "1" ]; \
then echo "Enabled"; else echo "Disabled"; fi
echo "**************************************************"
echo

$(CFILES:.c=.o): $(HFILES) Makefile
default:
make

endif # ifeq ($(K_VERSION),2.6)

ifeq (,$(MANDIR))
# find the best place to install the man page
MANPATH := $(shell (manpath 2>/dev/null || echo $MANPATH) | sed 's/:/ /g')
ifneq (,$(MANPATH))
# test based on inclusion in MANPATH
test_dir = $(findstring $(dir), $(MANPATH))
else
# no MANPATH, test based on directory existence
test_dir = $(shell [ -e $(dir) ] && echo $(dir))
endif
# our preferred install path
# should /usr/local/man be in here ?
MANDIR := /usr/share/man /usr/man
MANDIR := $(foreach dir, $(MANDIR), $(test_dir))
MANDIR := $(firstword $(MANDIR))
endif
ifeq (,$(MANDIR))
# fallback to /usr/man
MANDIR := /usr/man
endif

# depmod version for rpm builds
DEPVER := $(shell /sbin/depmod -V 2>/dev/null | \
awk 'BEGIN {FS="."} NR==1 {print $$2}')

###########################################################################
# Build rules

$(MANFILE).gz: ../$(MANFILE)
gzip -c $< > $@

install: default $(MANFILE).gz
# remove all old versions of the driver
find $(INSTALL_MOD_PATH)/lib/modules/$(KVER) -name $(TARGET) -exec rm -f {} \; || true
find $(INSTALL_MOD_PATH)/lib/modules/$(KVER) -name $(TARGET).gz -exec rm -f {} \; || true
install -D -m 644 $(TARGET) $(INSTALL_MOD_PATH)$(INSTDIR)/$(TARGET)
ifeq (,$(INSTALL_MOD_PATH))
/sbin/depmod -a || true
else
ifeq ($(DEPVER),1 )
/sbin/depmod -r $(INSTALL_MOD_PATH) -a || true
else
/sbin/depmod -b $(INSTALL_MOD_PATH) -a -n > /dev/null || true
endif
endif
install -D -m 644 $(MANFILE).gz $(INSTALL_MOD_PATH)$(MANDIR)/man$(MANSECTION)/$(MANFILE).gz
man -c -P'cat > /dev/null' $(MANFILE:.$(MANSECTION)=) || true

uninstall:
if [ -e $(INSTDIR)/$(TARGET) ] ; then \
rm -f $(INSTDIR)/$(TARGET) ; \
fi
/sbin/depmod -a
if [ -e $(MANDIR)/man$(MANSECTION)/$(MANFILE).gz ] ; then \
rm -f $(MANDIR)/man$(MANSECTION)/$(MANFILE).gz ; \
fi

.PHONY: clean install

clean:
rm -rf $(TARGET) $(TARGET:.ko=.o) $(TARGET:.ko=.mod.c) $(TARGET:.ko=.mod.o) $(CFILES:.c=.o) $(MANFILE).gz .*cmd .tmp_versions
 
Old 10-05-2006, 10:25 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Why do you think that this is needed, the kernel already has this built in????
Hint: modprobe e100

FYI: the FC5 kernel 2.6.15-1.2054_FC5 is old you might want to consider bring the system current, for example the latest kernel for FC5 is built from this source;

kernel-2.6.17-1.2187_FC5.src.rpm 14-Sep-2006 21:03 42M

Maybe it's time to do something like; yum update
 
Old 10-05-2006, 08:53 PM   #3
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
Moved: This thread is more suitable in Linux - Networking and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


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
Linux driver for Intel(R) PRO/100 VE deepasuresh Linux - Networking 3 01-29-2006 11:56 AM
Intel 82801/82815 ICH2 driver required for Kernel 2.2 jbacchi Linux - Networking 0 04-01-2004 09:59 AM
Intel 865GLC Board SARA Driver required siddiqu Linux - Hardware 0 06-13-2003 04:46 AM
driver for intel pro/100 M ethernet card blizzardpimp Linux - Networking 1 09-18-2002 07:06 PM
Linux net driver for Intel D815EFV integrated mobo (Intel PRO/100 VE) bikermagi Linux - Networking 0 05-07-2002 01:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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