个人工具

“UbuntuHelp:LircSupport”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第6行: 第6行:
 
The guide is specific for an home-brew serial reciver.
 
The guide is specific for an home-brew serial reciver.
 
== Preparing the system ==
 
== 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.
+
The first step is to get the kernel source packages.  This is done by first finding out what kernel we are running.<pre><nowiki>
<pre><nowiki>
+
 
$  uname -r</nowiki></pre>
 
$  uname -r</nowiki></pre>
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:
+
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:<pre><nowiki>
<pre><nowiki>
+
 
$  sudo apt-get install linux-source-<kver> linux-headers-`uname -r`</nowiki></pre>
 
$  sudo apt-get install linux-source-<kver> linux-headers-`uname -r`</nowiki></pre>
 
Where <kver> is the three numbers mentioned above (2.6.15 in my case).   
 
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.
+
Now we need to extract the source we just downloaded and link it to the appropriate directory.<pre><nowiki>
<pre><nowiki>
+
 
$  sudo tar xvjf /usr/src/linux-source-*.tar.bz2 -C /usr/src/
 
$  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-source-<kver> /usr/src/linux
 
$  sudo ln -s /usr/src/linux /lib/modules/`uname -r`/build</nowiki></pre>
 
$  sudo ln -s /usr/src/linux /lib/modules/`uname -r`/build</nowiki></pre>
and install the required packages.
+
and install the required packages.<pre><nowiki>
<pre><nowiki>
+
 
$  sudo apt-get install build-essential kernel-package lirc-modules-source dialog</nowiki></pre>
 
$  sudo apt-get install build-essential kernel-package lirc-modules-source dialog</nowiki></pre>
To finish setting up our build environment, we need to copy over a few specialized config files for our kernel by doing this:
+
To finish setting up our build environment, we need to copy over a few specialized config files for our kernel by doing this:<pre><nowiki>
<pre><nowiki>
+
 
$  sudo cp /boot/config-`uname -r` /usr/src/linux/.config
 
$  sudo cp /boot/config-`uname -r` /usr/src/linux/.config
 
$  cd /usr/src/linux
 
$  cd /usr/src/linux
第32行: 第27行:
 
$  sudo make modules</nowiki></pre>
 
$  sudo make modules</nowiki></pre>
 
That last line will take a while.
 
That last line will take a while.
Extract the lirc modules source.
+
Extract the lirc modules source.<pre><nowiki>
<pre><nowiki>
+
 
$  cd /usr/src
 
$  cd /usr/src
 
$  tar -xvzf lirc-modules.tar.gz</nowiki></pre>
 
$  tar -xvzf lirc-modules.tar.gz</nowiki></pre>

2007年12月6日 (四) 10:41的版本

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