Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: srekrap on June 25, 2013, 07:06:43 PM
-
Hello -
I'm trying to compile the xpad module - pretty simple. However there's no 'build' directory under /lib/modules/3.0.21-tinycore64.
I tried fetching linux-3.0.21-patched.txz from ibiblio and it has no such build directory either.
Any suggestions?
Thanks - Sean
-
symlink /lib/modules/3.0.21-tinycore64/build to the unpacked kernel source
-
Juanito -
OK - seems obvious to you guys :-)
I did (may not have needed to) 'make oldconfig && make prepare && make', and realized the kernel in TC is newer than what xpad's expecting - So I replaced usb_buffer_alloc/free w/ usb_alloc/free_coherent, and now it compiles.
However, when I "sudo insmod xpad.ko" I get: "insmod: can't insert 'xpad.ko': invalid module format."
Is there some setting in the env/.config of the kernel I need to set?
(All this is done in TC, not another dev host)
Thanks
Sean
-
Hi srekrap
input-joystick-3.0.21-tinycore64.tcz has xpad.ko
-
Rich - OMG thank you!
Does it (or seomthing else) have the (serial) input driver too?
I see that the input-joystick extension has tons of other drivers (a3d, adi, analog, etc) - will those drivers get insmoded on boot? If I don't want those installed on boot can I simply delete the .ko.tgz files, or is there a cleaner way to restrict what gets loaded?
I'm a noob so anything that implies I'm missing the picture is obvious - please advise...
Thanks!
-
Hi srekrap
If the kernel detects your joystick it should load the driver. Drivers only get loaded if the corresponding hardware is
detected, no need to delete anything. Modprobe is preferred over insmod.
Does it (or seomthing else) have the (serial) input driver too?
Not sure what you are referring to here, I don' have a joystick.
-
Rich - I'm working w/ two flavors of usb device - xbox controller (xpad driver) and serial usb devices (linux input driver) - "input" allows/handles connecting serial usb devices so they can be opened like a comport (is creates /dev/ttyUSB0, etc) I don't see my device showing up, and input-joystick doesn't have what I think I should see, there's nothing in the repo like "input-serial" - only input-joystick and input-tablet.
I had to unzip the xpad.ko.gz that got "installed" and place xpad.ko in, say, /lib/modules, then edit /opt/bootload.sh to include "insmod /lib/modules/xpad.ko" - now on boot it sees I have the joystick plugged in fine. Aside from modprobe vs. insmod, does this sound like I jumped through the right hoops? Is there a more official way to do it?
Thanks for your help
Sean
-
There's no reason to gunzip modules.
-
@tinypoodle -
Thanks for the reply - then how else is it supposed to happen? (because it didn't without further intervention)
If it doesn't happen by default, where can I look to see why it didn't?
Thanks
Sean
-
Hi srekrap
As tinypoodle said, no reason to gunzip modules. Did you try:
modprobe xpad
Here is a basic explanation of the differences:
http://nashkius.wordpress.com/2010/11/24/modprobe-vs-insmod/
-
Here is a basic explanation of the differences:
http://nashkius.wordpress.com/2010/11/24/modprobe-vs-insmod/
This looks suspiciously "muggle" - not at all what I expected. Thanks for the link! :)
-
Rich/tinypoodle -
I'm using modprobe now - are you suggesting that if I do "modprobe xpad.ko.tgz" it'll unzip it for me?
If so then of course you all would think my unzipping was unnecessary...
I'll leave it for another time when I really can't get a driver to build to re-answer the question... I got the stuff working finally with you-all's help... Thanks!
Cheers,
Sean
-
Thanks for the reply - then how else is it supposed to happen? (because it didn't without further intervention)
Out of my head, it may be a matter of kernel config, not depending on userspace.
-
tinypoodle -
10-4 - for now I'll ignore it and have the boot as it goes - and I'll make a note of it for our own communications, but it works so I'm happy...
Cheers
Sean