Difference between revisions of "LIRC on Debian Etch"
m (→more minor edits) |
(→Update to do it all the way using Debian tooling) |
||
Line 51: | Line 51: | ||
If you don't have your linux kernel sources available install them as well: | If you don't have your linux kernel sources available install them as well: | ||
− | apt-get install kernel- | + | apt-get install kernel-source |
This should provide you with the kernel-headers for your running kernel. | This should provide you with the kernel-headers for your running kernel. | ||
Line 58: | Line 58: | ||
apt-get install kernel-package | apt-get install kernel-package | ||
− | Now you have everything you need to build the required lirc-modules package: | + | Now you have everything you need to build the required lirc-modules package. |
+ | Proceed with configuring your required lirc modules using: | ||
− | + | dpkg-reconfigure lirc-modules-source | |
− | |||
− | + | As example, for a MCE remote you need to check 'gpio', 'i2c' and 'mceusb'. | |
− | + | The tool will give the opportunity to build the modules automagically. | |
− | + | Re-run the step above if you need to change the required modules, or need | |
+ | to build modules for a newer kernel revision. | ||
Wait for the build to complete and see in /usr/src for the resulting lirc-modules-XXX.deb package. | Wait for the build to complete and see in /usr/src for the resulting lirc-modules-XXX.deb package. | ||
Line 71: | Line 72: | ||
dpkg -i /usr/src/lirc-modules-*.deb | dpkg -i /usr/src/lirc-modules-*.deb | ||
+ | |||
+ | Now load the base module: | ||
+ | |||
modprobe lirc_i2c | modprobe lirc_i2c | ||
− | |||
− | and you have a complete LIRC installation on your system. | + | And try to start the LIRC daemon: |
+ | |||
+ | /etc/init.d/lircd start | ||
+ | |||
+ | and you have a complete LIRC installation on your system. | ||
+ | You may need to add the 'lirc_i2c' module to the file /etc/modules to make it auto-load. | ||
[[Category:HOWTO]] | [[Category:HOWTO]] |
Revision as of 19:10, 10 May 2007
Contents
Install Debian GNU/Linux 4.0
First, you can read about installing MythTV on Debian Etch here: Installing MythTV on Debian Etch
Add LIRC to Debian GNU/Linux 4.0
Manually building LIRC from source
Download lirc from http://www.lirc.org then follow the instructions in the INSTALL file. As of 0.8.1, the steps are to run the following commands in the extracted directory (I have added the command to install the required 'dialog' package):
apt-get install dialog ./setup.sh make make install
You will then need to load the module:
depmod -a modprobe lirc_i2c
You will then need to make a device file usable by the mythtv user:
chmod 666 /dev/lircd
You will then need to start lircd (the first command checks to make sure the device files are there, and the second command may require you to add '-d /dev/lirc?' substituting the ? with a number, which will probably be 0)
ls /dev/lirc* lircd
To test your work, run (include the '-d /dev/lirc?' if you needed to include this in running lircd):
mode2
Now press a few buttons on your remote while aiming it at the receiver. You should see some text spit out on your screen. If you don't, then something isn't working.
You will then need to get a lircrc file, and a lircd.conf file which will reside in /home/mythtv/.lircrc, /home/mythtv/.mythtv/lircrc, /etc/lircd.conf, and possibly (I forget) /etc/lircrc. There is a complete collection of all supported configs available at http://lirc.org/remotes.tar.bz2 and there is also a site that will help you create config files at http://lircconfig.commandir.com/
Using the Debian packages
The out-of-the-box packages from Debian GNU/Linux 4.0 do not provide a complete set to start LIRC. In fact, a pre-compiled lirc-modules-XXX.deb package is missing in the distribution. Therefor, we are going to build this one ourselves using the Debian tooling.
First step: install the base LIRC packages:
apt-get install lirc lirc-modules-source
Now extract the source in the linux source tree:
cd /usr/src tar -xvzf lirc-modules-source.tar.gz
If you don't have your linux kernel sources available install them as well:
apt-get install kernel-source
This should provide you with the kernel-headers for your running kernel. Now proceed with the installation of the linux kernel build tooling from Debian:
apt-get install kernel-package
Now you have everything you need to build the required lirc-modules package. Proceed with configuring your required lirc modules using:
dpkg-reconfigure lirc-modules-source
As example, for a MCE remote you need to check 'gpio', 'i2c' and 'mceusb'. The tool will give the opportunity to build the modules automagically. Re-run the step above if you need to change the required modules, or need to build modules for a newer kernel revision.
Wait for the build to complete and see in /usr/src for the resulting lirc-modules-XXX.deb package. Install that one using:
dpkg -i /usr/src/lirc-modules-*.deb
Now load the base module:
modprobe lirc_i2c
And try to start the LIRC daemon:
/etc/init.d/lircd start
and you have a complete LIRC installation on your system. You may need to add the 'lirc_i2c' module to the file /etc/modules to make it auto-load.