LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-05-2007, 08:44 AM   #1
crabsody
LQ Newbie
 
Registered: Mar 2006
Location: Greece
Distribution: Fedora 10
Posts: 6

Rep: Reputation: 0
Which is the kernel build directory? I Can't find kernel build files


I tried to install ndiswapper but I get the following message

Can't find kernel build files in /lib/modules/2.6.15-1-686/build;

I read in a thread that I should make a sym link like that

ln -s /usr/src/kernels/lib2.6.15-1-686 lib/modules/2.6.15-1-686/build

The problem is there is no /usr/src/kernels/ directory either.
Any suggestions? Which is the kernel build directory?
 
Old 01-05-2007, 09:41 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
I think this actually means you need to install the source files for your kernel. This is usually provided along with the core files of most distros. On FC6 (Fedora Core 6) the kernel build files reside in

/usr/src/kernels

and FC6 stock kernel source is in that directory:

/usr/src/kernels/2.6.18-1.2798.fc6-i686

This means that if I want to compile something that needs the kernel source and it cannot find the kernel source by itself, I point it to

/usr/src/kernels/2.6.18-1.2798.fc6-i686

in order to get it to compile. This "pointing" can usually be done by specifying the above in a configure statement before "making" of the driver / kernel module you want to compile:

./configure --with-kernel-source-dir=/usr/srckernels/2.6.18-1.2798.fc6-i686

or some similary parameter, depending on how the package you are trying to compile is set up.
 
Old 01-05-2007, 10:55 AM   #3
saman007uk
Member
 
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 364

Rep: Reputation: 33
You can always install it using the Debian package mangement system. Run the following as root:
Code:
apt-get update
apt-get install ndiswapper
Also, in Debian, the kernel source is in /usr/src. However, you will need to download the approproate kernel-source and kernel-headers using apt-get.
 
Old 01-05-2007, 06:05 PM   #4
crabsody
LQ Newbie
 
Registered: Mar 2006
Location: Greece
Distribution: Fedora 10
Posts: 6

Original Poster
Rep: Reputation: 0
I use Debian but how can I download kernel-source and kernel-headers? I searched for kernel in aptitude but I found nothing like that
 
Old 01-05-2007, 06:27 PM   #5
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Given your kernel version you're on Etch (Testing) Try searching with "linux-source" This
Code:
apt-cache search linux-source-`uname -r`
should do the trick. For the headers, do the same but alter the search string
 
Old 01-08-2007, 03:22 PM   #6
crabsody
LQ Newbie
 
Registered: Mar 2006
Location: Greece
Distribution: Fedora 10
Posts: 6

Original Poster
Rep: Reputation: 0
I downloaded the source from http://www.kernel.org/pub/linux/kernel/v2.6/
and I copied it in /usr/src directory. then I created a symbolic link.
I run make and everything seemed to go ok but now I have to deal with messages like that

make -C driver
make[1]: Entering directory `/home/grizos/software/ndiswrapper-1.33/driver'
make -C /lib/modules/2.6.15-1-686/build SUBDIRS=/home/grizos/software/ndiswrapper-1.33/driver
make[2]: Entering directory `/usr/src/linux-2.6.15.1'

WARNING: Symbol version dump /usr/src/linux-2.6.15.1/Module.symvers
is missing; modules will have no dependencies and modversions.

Building modules, stage 2.
MODPOST
/bin/sh: scripts/mod/modpost: No such file or directory
make[3]: *** [__modpost] Error 127
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.15.1'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/grizos/software/ndiswrapper-1.33/driver'
make: *** [all] Error 2

Can someone give me a hint? Thanks a lot in advance

Last edited by crabsody; 01-08-2007 at 03:23 PM.
 
Old 01-09-2007, 03:06 AM   #7
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
What did you download exactly? Which file? Did you use patch?
Because the file 2.6.15.1 is a patch to the file 2.6.15. So to have the 2.6.15.1 (which is also maybe not the same as 2.6.15-1, thats another problem) you need to take the 2.6.15 and then use the 2.6.15.1 to patch it. Its the rule on kernel.org. Missleading for beginners for technically the only solution.


(Also, the proper kernel would be the official one, can be found on snapshot.debian.net
http://snapshot.debian.net/archive/2...6_2.6.15-1.dsc )

Last edited by nx5000; 01-09-2007 at 03:11 AM.
 
Old 01-09-2007, 04:48 AM   #8
Chinook06
LQ Newbie
 
Registered: Mar 2006
Posts: 15

Rep: Reputation: 0
Hi,
I have same problem. I need source kernel, but I dont want compile. I have debian etch. Kernel version is 2.6.18-3-686. Where do I find source? Is some easy way, how compile kernel? When I compiled kernel I lost sound, wifi etc.
 
  


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
ndiswrapper and Kernel build files.. viciousxp Linux - Kernel 11 09-25-2006 12:58 PM
Anyone know where FC5 kernel build files end up. sass10151 Fedora 8 09-01-2006 12:10 AM
NDISWRAPPER can't find FC5 Kernel build NLawrence Linux - Software 1 05-16-2006 05:55 PM
Missing kernel build files (2.6.11-mdksmp) - need them for ndiswrapper Scyphon Linux - Software 2 04-24-2006 01:59 PM
build error - can't find kernel source PickledHerring Linux - Newbie 1 11-15-2005 07:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:29 PM.

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