Adding kernel module to PITFT custom kernel

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
linuxuser
 
Posts: 5
Joined: Wed Sep 17, 2014 11:01 pm

Adding kernel module to PITFT custom kernel

Post by linuxuser »

After installing the necessary kernel and configs to my raspberry pi through the pitft.sh script I noticed that the kernel module xpad was not present/installed which is necessary to drive my usb controller. I proceeded to manually install the module by preparing the build directory and compiling the xpad source code. After, I went to load the module with insmod which returned 'invalid module format' and modprobe returned 'exec format error'. I've tried various compiling methods and seem to lead to those same errors. I haven't encountered these errors, before using the PITFT ,since all other kernels seemed to have the xpad driver pre-installed. Any help is appreciated, Thanks!

User avatar
adafruit2
 
Posts: 22200
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adding kernel module to PITFT custom kernel

Post by adafruit2 »

what's xpad for? we've never heard of it? :/

User avatar
linuxuser
 
Posts: 5
Joined: Wed Sep 17, 2014 11:01 pm

Re: Adding kernel module to PITFT custom kernel

Post by linuxuser »

xpad is a kernel module used to recognize and make usb game controllers work, after the kernel recognizes the controller xpad puts the controller in /dev/input where it's then ready to use, so without xpad my controller is essentially useless and cannot be mapped to anything. Like I said I haven't encountered this problem before I got a PITFT because the stock kernels already have the xpad module pre-installed where the PITFT kernel doesn't.

User avatar
adafruit2
 
Posts: 22200
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adding kernel module to PITFT custom kernel

Post by adafruit2 »

Yah, we'd have to recompile the kernel to add that support - we dont have an ETA on when we will be redoing the kernel but I've added it to our 'todo' list!

User avatar
linuxuser
 
Posts: 5
Joined: Wed Sep 17, 2014 11:01 pm

Re: Adding kernel module to PITFT custom kernel

Post by linuxuser »

Thanks, and are you aware of where to get the module source code?

User avatar
adafruit2
 
Posts: 22200
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adding kernel module to PITFT custom kernel

Post by adafruit2 »

oh its not part of the classic kernel? thats probably why it didnt make it in...if you post up a URL we'll use that code

User avatar
linuxuser
 
Posts: 5
Joined: Wed Sep 17, 2014 11:01 pm

Re: Adding kernel module to PITFT custom kernel

Post by linuxuser »

Here's the general documentation:
https://www.kernel.org/doc/Documentation/input/xpad.txt
And here's one place you can find the source:
http://lxr.free-electrons.com/source/dr ... ick/xpad.c
(There's only one c file)

And are you sure there's no work around of installing the module on the pre-compiled PITFT kernel manually?

User avatar
adafruit2
 
Posts: 22200
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adding kernel module to PITFT custom kernel

Post by adafruit2 »

there is absolutely no work around - kernel modules must be compiled against the exact same version

User avatar
linuxuser
 
Posts: 5
Joined: Wed Sep 17, 2014 11:01 pm

Re: Adding kernel module to PITFT custom kernel

Post by linuxuser »

Ok well thanks a lot for your help, I'm looking forward to the new kernel, do you assume it will be ready before mid October?

User avatar
adafruit2
 
Posts: 22200
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adding kernel module to PITFT custom kernel

Post by adafruit2 »

nope, there is no ETA

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”