特殊:Badtitle/NS100:InstallLirc/Dapper

来自Ubuntu中文
Wikibot留言 | 贡献2010年5月19日 (三) 22:54的版本
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航跳到搜索

{{#ifexist: :InstallLirc/Dapper/zh | | {{#ifexist: InstallLirc/Dapper/zh | | {{#ifeq: {{#titleparts:InstallLirc/Dapper|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:InstallLirc/Dapper|1|-1|}} | zh | | }}

<<Include(Tag/Unsupported)>> <<Include(Tag/Deletion)>> 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 -r

This 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`/build

and install the required packages.

$  sudo apt-get install build-essential kernel-package lirc-modules-source dialog

To 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