[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Makefile for external module delete ALL my modules under /lib/modules/2.6.8-3-686/kernel/


I am having trouble with a Makefile from the http://rt2x00.serialmonkey.com group, which makes a driver for my Linksys WiFi device.  If anyone has some development experience, or just understands Makefiles, I'd really appreciate some help.

The problem occurs when I get to the "sudo make install" part--for some reason, this step deletes all my modules under /lib/modules/2.6.8-3-686/kernel/

As I explain below, I suspect that the Makefile is trying to rebuild all my modules, and since I only have kernel-headers installed (rather than the entire kernel source), the process is choking.  Maybe kernel-headers is Debian-specific, and not anticipated by the rt2x00.serialmonkey.com folks?

Here's what the relevant part of my session looks like:
$ sudo make install
2.6 module install
make -C /lib/modules/2.6.8-3-686/build SUBDIRS=  modules_install
make[1]: Entering directory `/usr/src/kernel-headers-2.6.8-3-686'
if [ -r System.map ]; then /sbin/depmod -ae -F System.map  2.6.8-3-686; fi
make[1]: Leaving directory `/usr/src/kernel-headers-2.6.8-3-686'
/sbin/depmod -a
grep: /etc/modprobe.conf: No such file or directory
append 'alias rausb0 rt2570' to /etc/modprobe.conf
$ ls -l /lib/modules/2.6.8-3-686/kernel/
total 0

So I think the problem lies with this line:
make -C /lib/modules/2.6.8-3-686/build SUBDIRS=  modules_install

As I understand it, this line makes the "modules_install" target of the Makefile in the directory named by "-C".  The relevant Makefile on my machine is /usr/src/kernel-headers-2.6.8-3/Makefile.  The "modules_install" target looks like this:

modules_install: _modinst_ _modinst_post

So this target quickly becomes more complicated than I can understand.

Any ideas?  Should the "modules_install" target ever be called if all you have on your machine is the kernel-headers and not the full kernel source?

Help me please--win my undying gratitude and be showered with good karma.


Reply to: