I need to add a wireless home automation controller to my OpenSUSE 11.0 laptop (/proc/version says Linux version 2.6.25.11-0.1-default). The controller is a CM19A that connects via USB. (This is an X10 controller.)
When I try to build the driver, I get “No rule to make target `modules’”. The makefile is essentially running
make -C SUBDIRS=/home/myusername/src/iplc/driver/linux-2.6/cm19a.d modules
This suggests that the method for building drivers on OpenSUSE is a little different from what this Makefile is expecting. The specified modules build directory doesn’t include any Makefile. It holds makedumpfile.config and Module.symvers.
Any ideas?
==== transcript of build attempt follows ====
myusername@gum:~/src/iplc/driver/linux-2.6/cm19a.d> make
make -C /lib/modules/2.6.25.11-0.1-default/build SUBDIRS=/home/myusername/src/iplc/driver/linux-2.6/cm19a.d modules
make[1]: Entering directory /usr/src/linux-2.6.25.11-0.1-obj/x86_64/default' make[1]: *** No rule to make target modules’. Stop.
make[1]: Leaving directory `/usr/src/linux-2.6.25.11-0.1-obj/x86_64/default’
make: *** [default] Error 2
Thanks for the suggestion, but I’m not finding a “usbdev” package in my YaST2 search.
I see that I’ve got libusb and libusb-devel installed.
The other thing I notice is that when I plug in my CM19A, three entries show up in the /dev pseudodirectory (usbdev3.2_ep00, …ep02, and …ep81). So, something is recognizing the existence of the device. I don’t know enough about how usb stuff works to determine whether this is in any way relevant. Presumably not…
As you say, it looks like something is recognised.
I take it you are following the instructions in the link you gave.
In which case, you need to cd to the source directory and run: make all.
(not a programmer, but I dabble a bit)
Thanks. Actually, I *am *a developer – I just haven’t done any development on drivers, nor have I done a lot on OpenSUSE.
The Makefile for this software is is set up to run in the /lib/modules/2.6.25.11-0.1-default/build directory (that’s the “-C” option), which appears to be missing something.
I have a feeling that libusb is not relevant. I suspect that that what’s missing are files for developing modules that can be installed into or removed from the kernel while it’s running.
Thanks for your attempt to help, but I think I’m still missing the relevant information.
Interesting…
So, it appears that the standard way to construct a Makefile for a kernel module is to specify that “make” is supposed to temporarily “cd” to
/lib/modules/$(uname -r)/build
using the -C switch. On my OpenSUSE 11.0 system, that works out to
/lib/modules/2.6.25.11-0.1-default/build
…which is symlinked to…
/usr/src/linux-2.6.25.11-0.1-obj/x86_64/default
…which doesn’t really have anything useful in it.
HOWEVER, /usr/src/linux-obj/x86_64/default seems to be the right directory. It appears that somehow, on my system, the “build” subdirectory got symlinked to the wrong place…
No, I’m pretty sure that none of my attempts to build kernel driver modules did anything to mess up the system configuration.
I’d be interested to hear what others find. If you run
uname -r
and then take the output and fill in
/lib/modules/$(uname -r)/build
I’d be very curious to learn what you find in that directory. On my system, that directory expands to
/lib/modules/2.6.25.11-0.1-default/build
…and contains: makedumpfile.config and Module.symvers
If it had been symlinked properly, it should have contained a lot more stuff, including a Makefile.
In any event, I’m now in biz. The driver is installed and working like a charm.