NeTV IR driver

From Studio Kousagi Wiki
Revision as of 08:18, 16 April 2012 by Xobs (talk | contribs)
Jump to: navigation, search

NeTV uses a GPIO-based IR sensor. That means that it's simply counting the pattern of 0s and 1s coming from a sensor that performs IR detection and demodulation.

There is currently no LIRC driver. Instead, it acts as a keyboard driver, using a hard-coded set of scancodes and key equivalents. By modifying the driver, it's possible to add new keys or to change the mapping.

Note that it might be useful to build the kernel as a module. That way you can try new code without having to reboot.

These steps instruct you on how to load a new kernel onto your device. Any time you modify the kernel, you risk making your system unbootable. Do not continue unless you are familiar with how to re-image your SD card.

  1. Install and configure the NeTV toolchain
  2. Check out the kernel
  3. Grab the latest config file
  4. Convert the IR driver from a builtin to a module
    • make menuconfig
    • Go to Device Drivers ---> Input Device Support ---> CIR device and set it from <*> to <M>
    • Select < Exit > repeatedly, answer < Yes > when it asks you to save your new kernel configuration
  5. Build a new kernel
    • make
  6. Copy the kernel to your NeTV
    • scp arch/arm/boot/zImage root@[NeTV-address]:
  7. On your NeTV, write the new kernel
    • config_util --cmd=putblock --block=krnA < zImage
  8. On your NeTV, reboot into the new kernel
    • reboot