UbuntuHelp:InstallLirc/Dapper
来自Ubuntu中文
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
This guide will describe how to install lirc support in Ubuntu Dapper.
Introduction
Most of the info on this page comes from http://www.abarbaccia.com/ and http://www.ubuntuforums.org/archive/index.php/t-20952.html. Really thanks to the authors. The guide is specific for an home-brew serial reciver.
Preparing the system
The first step is to get the kernel source packages. This is done by first finding out what kernel we are running.$ uname -rThis should spit out a line like "2.6.15-26-386". Note: this will vary according to the kernel version you are using. We only want the first 3 numbers: e.g. 2.6.15. To download the source:
$ sudo apt-get install linux-source-<kver> linux-headers-`uname -r`
Where <kver> is the three numbers mentioned above (2.6.15 in my case).
Now we need to extract the source we just downloaded and link it to the appropriate directory.$ sudo tar xvjf /usr/src/linux-source-*.tar.bz2 -C /usr/src/ $ sudo ln -s /usr/src/linux-source-<kver> /usr/src/linux $ sudo ln -s /usr/src/linux /lib/modules/`uname -r`/buildand install the required packages.
$ sudo apt-get install build-essential kernel-package lirc-modules-source dialogTo finish setting up our build environment, we need to copy over a few specialized config files for our kernel by doing this:
$ sudo cp /boot/config-`uname -r` /usr/src/linux/.config $ cd /usr/src/linux $ sudo make oldconfig
Compiling the lirc module
$ cd /usr/src/linux $ sudo make include/linux/version.h $ sudo make modules
That last line will take a while.
Extract the lirc modules source.$ cd /usr/src $ tar -xvzf lirc-modules.tar.gz