Comment 37 for bug 365435

Revision history for this message
Dr. Clock (alittleknowhow) wrote :

Making the xpad360 driver in Hardy Heron:
I am sure you guys have a better idea of what's going on here, but I can guess:

ray@ray-desktop:~/xpad360$ make
make modules -C /usr/src/linux-headers-2.6.24-28-generic SUBDIRS=/home/ray/xpad360
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-28-generic'
  CC [M] /home/ray/xpad360/xpad.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC /home/ray/xpad360/xpad.mod.o
  LD [M] /home/ray/xpad360/xpad.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-28-generic'
/////////////
I guess it makes the files
xpad.o
xpad.mod.o
and
xpad.ko
from the kernel from this path:
/usr/src/linux-headers-2.6.24-28-generic

then the first time sudo rmmod xpad is used it deletes the module xpad from /proc/modules
I am guessing which may be why when that same command is used again it says that that module doesn't exist,

ray@ray-desktop:~/xpad360$ sudo rmmod xpad
[sudo] password for ray:

then I re-made again after which it copied xpad.ko to the path below:

ray@ray-desktop:~/xpad360$ sudo cp xpad.ko /lib/modules/`uname -r`/kernel/drivers/input/joystick

then depmod — program to generate modules.dep and map files. -a --all Probe all modules. This option is enabled by default if no file names are given in the command-line.

ray@ray-desktop:~/xpad360$ sudo depmod -a

then modprobe — program to add and remove modules from the Linux Kernel

ray@ray-desktop:~/xpad360$ sudo modprobe xpad
ray@ray-desktop:~/xpad360$

I am still uncertain what I may or may not need?