I need to add a wireless home automation controller to my OpenSUSE 11.0 laptop (/proc/version says Linux version 184.108.40.206-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.
==== transcript of build attempt follows ====
make -C /lib/modules/220.127.116.11-0.1-default/build SUBDIRS=/home/myusername/src/iplc/driver/linux-2.6/cm19a.d modules
make: Entering directory /usr/src/linux-18.104.22.168-0.1-obj/x86_64/default' make: *** No rule to make target modules’. Stop.
make: Leaving directory `/usr/src/linux-22.214.171.124-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/126.96.36.199-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.
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
using the -C switch. On my OpenSUSE 11.0 system, that works out to
…which is symlinked to…
…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…