LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 05-08-2005, 08:25 AM   #1
krayhze
LQ Newbie
 
Registered: Mar 2004
Posts: 9

Rep: Reputation: 0
Ndiswrapper - Cant find kernel sources while installing (Kernel 2.6.11)


I'm using slackware 10.1 kernel 2.6.11 (compiled recently), and when I do "make" to compile ndiswrapper an error occurs saying that it cannot find kernel sources in /lib/modules/2.6.11/build but the sources are there.. I already tryed "make KSRC=/usr/src/linux-2.6.11" and says the same thing. I dont understand why this happens.
Anyone knows something that can help me?

Regards.
 
Old 05-08-2005, 11:31 AM   #2
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
hi there,

are you sure you have kernel sources instaled in /usr/src/linux?
can you post the error message - exactly - from the make script?
the modules are installed corrected in /lib/modules/$YOUR_KERNEL?
how this makefile looks like? sorry, i have no experience with this module.
maybe some grep will help
Code:
grep -i src Makefile
grep -i kernel Makefile
grep -i modules Makefile

regards

slackie1000
 
Old 05-08-2005, 09:29 PM   #3
krayhze
LQ Newbie
 
Registered: Mar 2004
Posts: 9

Original Poster
Rep: Reputation: 0
I'm root:

/ndiswrapper-1.1# make
make -C driver
make[1]: Entering directory `/home/sergio/ndiswrapper-1.1/driver'
Can't find kernel sources in /lib/modules/2.6.11/build;
give the path to kernel sources with KSRC=<path> argument to make
make[1]: Leaving directory `/home/sergio/ndiswrapper-1.1/driver'

/lib/modules/2.6.11# ls -l build
lrwxrwxrwx 1 root root 21 2005-05-01 17:24 build -> /usr/src/linux-2.6.11/

/usr/src/ls -l linux
lrwxrwxrwx 1 root root 12 2005-05-09 02:47 linux -> linux-2.6.11/

/usr/src/linux-2.6.11# ls
COPYING
CREDITS
Documentation/
MAINTAINERS
Makefile
README
REPORTING-BUGS
System-2.6.11.map@
arch/
crypto/
drivers/
fs/
include/
init/
ipc/
kernel/
lib/
mm/
net/
scripts/
security/
sound/
usr/


/ndiswrapper-1.1/driver# grep -i src Makefile;grep -i kernel Makefile;grep -
i modules Makefile
KSRC ?= /lib/modules/$(KVERS)/build
SRC_DIR=$(shell pwd)
-include $(KSRC)/.config
CFLAGS += $(shell [ -f $(KSRC)/include/linux/modversions.h ] && \
-include $(KSRC)/include/linux/modversions.h)
@ if [ ! -f $(KSRC)/include/linux/version.h ]; then \
echo "Can't find kernel sources in $(KSRC);"; \
echo " give the path to kernel sources with KSRC=<path>\
CFLAGS += -DLINUX -D__KERNEL__ -DMODULE -I$(KSRC)/include \
$(MAKE) -C $(KSRC) SUBDIRS=$(SRC_DIR) \
if grep -q CONFIG_4KSTACKS $(KSRC)/.config; then \
if grep -q "CONFIG_4KSTACKS=y" $(KSRC)/.config; then \
ndiswrapper.h ntoskernel.c ntoskernel.h \
OBJS := hal.o iw_ndis.o loader.o misc_funcs.o ndis.o ntoskernel.o \
# may not work correctly. Don't complain about kernel crashes until \
hal.o: hal.c ntoskernel.h
ntoskernel.o: ntoskernel.c ndis.h usb.h
wrapper.o: wrapper.c wrapper.h iw_ndis.h ntoskernel.h loader.h
ndis.h: ntoskernel.h
ntoskernel.h: ndiswrapper.h winnt_types.h pe_linker.h
usb.h: ntoskernel.h
ntoskerlen_exports.h: ntoskernel.c
x86_64_stubs.h: hal.c misc_funcs.c ndis.c ntoskernel.c usb.c wrapper.c
gen_exports: ndis_exports.h hal_exports.h ntoskernel_exports.h \
echo "Can't find kernel sources in $(KSRC);"; \
echo " give the path to kernel sources with KSRC=<path>\
CFLAGS += -DLINUX -D__KERNEL__ -DMODULE -I$(KSRC)/include \
"Kernel is compiled with 4K stack size option"\
"kernel";\
echo "*** WARNING: Kernel seems to have 4K size stack option" \
KSRC ?= /lib/modules/$(KVERS)/build
INST_DIR := $(DESTDIR)/lib/modules/$(KVERS)/misc
EXTRA_VERSION=$(EXTRA_VERSION) modules


I already tryed make KSRC=/usr/src/linux-2.6.11 and some other things


I dont understand why this happen' :S
 
Old 05-09-2005, 01:29 AM   #4
slackie1000
Senior Member
 
Registered: Dec 2003
Location: Brasil
Distribution: Arch
Posts: 1,037

Rep: Reputation: 46
hi there,

yep. quite weird.
advice: try changing the variable KSRC direct in the makefile. edit it by hand.
call it again... somehow there is a problem with the link...

regards

slackie1000
 
Old 05-25-2005, 03:50 AM   #5
LorenzoM
LQ Newbie
 
Registered: May 2005
Location: Schwaebisch Hall, Germany
Distribution: Debian
Posts: 2

Rep: Reputation: 0
under Slackware you need to install the kernel-headers-<your kernel version> package.

check also if you have correct linked your /lib/modules/<your kernel version>/build to /usr/src/linux !!

ln -s /usr/src/linux-<your kernel version> /lib/modules/<your kernel version>/build
 
Old 06-04-2005, 01:14 PM   #6
krayhze
LQ Newbie
 
Registered: Mar 2004
Posts: 9

Original Poster
Rep: Reputation: 0
I already installed Kernel-headers.. But the problem stills there -\
I have the correct links... dunno what to do :S
 
Old 05-23-2006, 06:30 AM   #7
NAKAMURA, Masashi
LQ Newbie
 
Registered: May 2006
Posts: 1

Rep: Reputation: 0
I had the same problem. But after I built kernel once, I could successfully build ndiswrapper.

Kernel build process generates a lacking file "version.h".
 
  


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
can't find kernel sources Avatar Debian 3 09-12-2005 12:36 PM
Ndiswrapper/Kernel Sources Help nathan546 Mandriva 0 08-23-2004 11:16 PM
Where would I find my kernel sources? irvken Linux - General 4 03-28-2004 02:11 PM
Where to find correct Kernel Sources?? jawaking00 Mandriva 2 03-07-2004 12:13 PM
Can't find the Kernel Sources in Red Hat 7.2 Ajentsmith Linux - Newbie 1 04-28-2002 11:31 PM

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

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