Installing xpad kernel module from source

asked 2016-02-21 20:52:01 -0600

I am attempting to install the latest xpad driver from the linux github but I am getting errors with dkms build.

I have tried to include as much info as possible, so apologies if this question ends up being extremely long.

I have the source set-up like so:

$ ls -l /usr/src/xpad-0.4/
-rw-r--r--. 1 root root   180 Feb 22 02:13 dkms.conf
-rw-r--r--. 1 root root   220 Feb 22 02:13 Makefile
-rw-r--r--. 1 root root 48525 Feb 22 02:13 xpad.c


obj-m = xpad.o

KVERSION = $(shell uname -r)
    make -C /lib/modules/$(KVERSION)/build V=1 M=$(PWD) modules
    test ! -d /lib/modules/$(KVERSION) || make -C /lib/modules/$(KVERSION)/build V=1 M=$(PWD) clean


MAKE[0]="make KVERSION=$kernelver"
CLEAN="make clean"

xpad.c: from github

It is worth noting that these exact files worked on Ubuntu before I switched over to Fedora 23.

Fedora doesn't include the xpad module by default. It can be installed with sudo dnf install joystick-support which pulls in kernel-debug-modules-extra, etc.

Personally I don't really want to be running a debug kernel, plus it doesn't include the xpad version i need. Additionally the debug kernel doesn't even complete it's boot on my system!

Onto the errors:

When I build in my home directory using make everything seems to go fine, until I try to insmod and it chucks out an error:

$ sudo insmod xpad.ko
insmod: ERROR: could not insert module xpad.ko: Unknown symbol in module

from running 'modinfothe only listed dependency isff-memless` which is included with the core kernel.

EDIT: I am able to sudo insmod xpad.ko if I sudo modprobe ff-memless, but still get errors with dkms build.


after sudo dkms add -m xpad -v 0.4, dkms build is less successfull:

$ sudo dkms build -m xpad -v 0.4
Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...(bad exit status: 2)
...(bad exit status: 2)5-300.fc23.x86_64 KVERSION=4.3.5-300.fc23.x86_64
Error! Bad return status for module build on kernel: 4.3.5-300.fc23.x86_64 (x86_64)
Consult /var/lib/dkms/xpad/0.4/build/make.log for more information.


DKMS make.log for xpad-0.4 for kernel 4.3.5-300.fc23.x86_64 (x86_64)
Mon 22 Feb 02:41:12 GMT 2016
make -C /lib/modules/4.3.5-300.fc23.x86_64
/build V=1 M=/var/lib/dkms/xpad/0.4/build modules
make[1]: *** /lib/modules/4.3.5-300.fc23.x86_64
/build: No such file or directory.  Stop.
Makefile:5: recipe for target 'all' failed
make: *** [all] Error 2

This I where I am stuck.

edit retag flag offensive close merge delete