Friday, August 17, 2012

XBOX 360 controller support in 3.0.8 kernel

The XBOX 360 controller doesn't work in my MELE (Kernel 3.0.8) because the kernel modules needed to support it [ ff-memless, xpad ] , are disabled by default in our kernel.

Download the ARM kernel
git clone git://github.com/amery/linux-allwinner/tree/lichee-3.0.8-sun4i
Install the necessary libraries / binaries
apt-get install gcc-4.4-arm-linux-gnueabi build-essential u-boot-tools (if u-boot-tools not found, try uboot-mkimage)

Configure
# make clean
# make -j4 ARCH=arm CROSS_COMPILE=/root/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- xconfig


Check(Press 'M') the following modules:
Input device support -> Support for memoryless force-feedback device
Input device support -> Joystick / gamepad
Input device support -> Joystick / gamepad -> X-box gamepad

Compile the modules
# make -j4 ARCH=arm CROSS_COMPILE=/root/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-

If you get "arm-linux-gnueabi-gcc" not found, run:
sudo ln -s /usr/bin/arm-linux-gnueabi-gcc-*version* /usr/bin/arm-linux-gnueabi-gcc


That should give you the xpad.ko in the drivers/input/joystick file.

Move it to the MELE, then run

su
insmod xpad.ko


Alternatively, if you don't want to compile the kernel use this module.
xpad.ko module
download it, copy it to the MELE and then run

su
insmod xpad.ko

4 comments:

  1. is there the same for PS3 dualshock 3 gamepad ?

    ReplyDelete
  2. If it doesn't work you need the hidp.ko module (which depends on the BT.ko module).

    http://kernel.xc.net/html/linux-3.0.8/arm/BT
    http://kernel.xc.net/html/linux-3.0.8/arm/BT_HIDP

    ReplyDelete
  3. Use keywords people will use to conduct a search so you can be found.
    It is therefore important that you establish
    certain 'habits' early on when blogging to make your site more appealing.
    If you want to create and run a blog to hold your
    business, the adopting business blogging tips will
    certainly help to make the task much simpler for you.

    Also visit my webpage ... godaddy coupon

    ReplyDelete
  4. i bought a A1000G quad core, they are using kernel 3.3.0.
    can you tell me how i can create the xpad.ko for this unit.

    ReplyDelete