Soundgraph iMON PAD + VFD LIRC kernel modules the Debian-way
This is how I built LIRC to support my Soundgraph iMON PAD + VFD, this is the most Debian-way I could do it (on Kubuntu/Edgy/x86-64).
### Building the LIRC Modules
# remove venky's stand-alone driver or else you will not be able to load lirc_imon properly
rmmod imon_vfd # remove it from /etc/modules if it's in there
aptitude install modules-assistant curl
# Prepare Linux Kernel Source directory that looks like the currently running kernel
module-assistant fakesource # start a rebuild here after updating kernel
cp /boot/config-`uname -r` /usr/src/linux-source-`uname -r`/.config
cd /usr/src/linux-source-`uname -r`/
make oldconfig && make prepare
# Fetch LIRC and compile
module-assistant -f get lirc-modules-source
dpkg-reconfigure lirc-modules-source # no auto-build, yes install maintainers config
# Patch iMON PAD remote driver to have mouse and keyboard support for pad.
cd /usr/src/modules/lirc/drivers/lirc_imon/ && curl http://vorticon.no-ip.info/pub/patches/lirc-0.8.0-imon-keys-kernel.patch | patch --forward
# Build LIRC drivers
cd /usr/src/
rm lirc-modules-`uname -r`_*.deb # delete old package to force a rebuild
module-assistant --text-mode --kernel-dir /usr/src/linux-source-`uname -r` build lirc
# Remove any existing copy from kernel memory
/etc/init.d/lirc stop
/etc/init.d/LCDd stop
export YourRemotesLIRCKernelModule=lirc_imon
rmmod $YourRemotesLIRCKernelModule
# Install newly built kernel module
cd /usr/src/
dpkg -i lirc-modules-`uname -r`_*.deb
depmod
modprobe $YourRemotesLIRCKernelModule # edit the export a couple of lines up
/etc/init.d/LCDd start # restart LCDd
/etc/init.d/lirc start # restart lirc
Module parameters
For giving the right parameters to the lirc_imon module, create the following file in /etc/modprobe.d:
## /etc/modprobe.d/lirc options lirc_imon pad2keys_active=1 islcd=0
With the next load of lirc_imon, the parameters should be applied. Notice that this makes the "dirty hack" in my previus post deprecated.
CDJM
The howto doesn't work anymore on Ubuntu 8.04 (tested on Mythbuntu), since they are now using DKMS for their kernel modules.
I hope the following helps:
Between # Fetch LIRC and compile and # Remove any existing copy from kernel memory
use the following commands to build the module:
# Add modules to DKMS dkms add -m lirc -v 0.8.3~pre1
# Apply pad2keys Patch cd drivers/lirc_imon curl http://launchpadlibrarian.net/14181282/lirc-0.8.3%7Epre1-0ubuntu7-pad2keys.patch | patch --forward ### add the dirty hack here ### cd ~
# And build the module dkms build -m lirc -v 0.8.3~pre1 dkms install -m lirc -v 0.8.3~pre1
After that you can continue with the initial howto.
I just haven't found out yet, how to set module parameter, so that the parameter pad2keys_active must be set manually.
For now i just changed the module to do that. If you are at the point "### add the dirty hack here ###", just apply the following patch to lirc_imon.c to change the default flags islcd to 0 and pad2keys_active to 1.
islcd has to be set to 0 for me, else i get messages in dmesg like the following: /var/lib/dkms/lirc/0.8.3~pre1/build/drivers/lirc_imon/lirc_imon.c: lcd_write: invalid payload size: 32 (expecting 8)
Patch for lirc_imon.c parameter defaults:
246c246 < static int islcd = 1; / This should default to "0" and we auto-detect / --- > static int islcd = 0; / This should default to "0" and we auto-detect / 249c249 < static int pad2keys_active = 0; --- > static int pad2keys_active = 1; 279,282c279,282 < module_param (islcd, int, 1); < MODULE_PARM_DESC (islcd, "Is iMON LCD (as opposed to VFD): 0=no, 1=yes (default: yes)"); < module_param (pad2keys_active, int, 0); < MODULE_PARM_DESC (pad2keys_active, "pad2keys patch active: 0=no, 1=yes (default: no)"); --- > module_param (islcd, int, 0); > MODULE_PARM_DESC (islcd, "Is iMON LCD (as opposed to VFD): 0=no, 1=yes (default: no)"); > module_param (pad2keys_active, int, 1); > MODULE_PARM_DESC (pad2keys_active, "pad2keys patch active: 0=no, 1=yes (default: yes)");
CDJM