[SLUG] Compile the driver source files!

Mark Feather akwe-xavante at firenet.uk.com
Wed Jul 30 22:17:01 BST 2003


On Sun, 27 Jul 2003, Jonathan Worthington wrote:
> Here's my guess, but I may well be wrong.  I believe that most distros
don't
> install the kernel source by default.  SuSE uses RPMs, right?  I believe
> there is a kernel source RPM you need to put on.  Drivers often need to
> compile against the kernel, thus why it's source is needed.  BTW, make
sure
> that any kernel source RPM you put on matches the version number of the
> kernel itself!  :-)

I could only find one reference to Kernel-(source or header) and that was
Kernel-Source giving no version number.  I have installed it from the CD ,
all 120MB of it!

That is all i have done, nothing else so this is what happens next.....

linux:/temp/dlkfet-4.16 #uname -r
2.4.10-4GB
linux:/temp/dlkfet-4.16 #
linux:/temp/dlkfet-4.16 #
linux:/temp/dlkfet-4.16 # make
Makefile:34: *** Linux kernel source not configured - missing version.h.
Stop.
linux:/temp/dlkfet-4.16 #

Do i now need to configure the Kernels source code?    If so how do i do
this?   I feel that this is a little strange, if the Kernels source code
requires configureing then how come i  have a system up and running
presumably with a Kernel and configured already!!

Mark

######     Contents of Makefile (line 1 to 47)     #######

VMNS    =       1

OBJS    :=      rhine_main.o rhine_proc.o
SRC             =       rhine_main.c rhine_proc.c
TARGET  =       rhinefet.o

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

ifeq ($(VMNS),1)
OBJS+=rhine_vmns.o
SRC+=rhine_vmns.c
endif

test_dir = $(shell [ -e $(dir)/include/linux ] && echo $(dir))
KSP := $(foreach dir, $(KSP), $(test_dir))

KSRC := $(firstword $(KSP))
#KSRC :=/usr/src/ksrc/RedHat/7.2/linux-2.4.7-10alt-ent
ifeq (,$(KSRC))
  $(error Linux kernel source not found)
endif

VERSION_FILE := $(KSRC)/include/linux/version.h
CONFIG_FILE  := $(KSRC)/include/linux/config.h

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 config.h)
endif

ifneq (,$(findstring egcs-2.91.66, $(shell cat /proc/version)))
  CC := kgcc gcc cc
else
  CC := gcc cc
endif

test_cc = $(shell which $(cc) > /dev/null 2>&1 && echo $(cc))
Makefile lines 1-47/172 24%

#####    End of Makefile    #####





More information about the Scarborough mailing list