Intel driver will not find kernel
I'm trying to install a driver for my Intel Pro/100 VE ethernet card but when i do a makefile, the terminal outputs a message saying that it cannot find my kernel source. In redhat 9 with kernel 2.4.20-18.9, where is the source and how should i modify the following (called Makefile) to search that path?
(i think this is the only part of the program needed to correct my problem, near the bottom)
# Configuration Section
# debug
# CFLAGS += -g
#extra warnings
#CFLAGS += -W -Wfloat-equal -Wtraditional -Wundef -Wshadow -Wpointer-arith\
# -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion\
#-Wsign-compare -Waggregate-return -Wmissing-prototypes -Wmissing-declarations\
# -Wpacked -Wpadded -Wredundant-decls -Wnested-externs -Wunreachable-code -Winline
##############################################################################
# Driver files
# core driver files
TARGET := e100.o
CFILES = e100_main.c e100_eeprom.c e100_config.c e100_phy.c e100_kcompat.c e100_test.c
HFILES = e100.h e100_config.h e100_phy.h e100_kcompat.h e100_ucode.h
# Man
MAN_FILE = e100.7
# pick an appropriate MAN path
MAN_CFG := /etc/man.config
MAN_TYPE := man7
MSP := $(shell [ -e $(MAN_CFG) ] && grep -e "^MANPATH[^_]" $(MAN_CFG) | awk '{print $$2}')
ifeq (,$(MSP))
MSP := /usr/share/man \
/usr/man
endif
# prune the list down to only values that exist
test_dir = $(shell [ -e $(dir)/$(MAN_TYPE) ] && echo $(dir))
MSP := $(foreach dir, $(MSP), $(test_dir))
# we will use the first valid entry in the search path
MAN_PATH := $(firstword $(MSP))
ifeq (,$(MAN_PATH))
MAN_PATH := /usr/man
endif
MAN_INSTDIR=$(MAN_PATH)/$(MAN_TYPE)
ifeq ($(ARCH),alpha)
CFLAGS += -ffixed-8 -mno-fp-regs
endif
###########################################################################
# Environment tests
# Kernel Search Path
# All the places we look for kernel source
KSP := /lib/modules/$(shell uname -r)/build \
/usr/src/linux-$(shell uname -r) \
/usr/src/linux-$(shell uname -r | sed 's/-.*//') \
/usr/src/kernel-headers-$(shell uname -r) \
/usr/src/kernel-source-$(shell uname -r) \
/usr/src/linux-$(shell uname -r | 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
KSRC := $(firstword $(KSP))
ifeq (,$(KSRC))
$(error Linux kernel source not found)
endif
|