old-www/HOWTO/Infrared-HOWTO/infrared-howto-s-kernel.html

767 lines
18 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Kernel</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Linux Infrared HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Getting Started"
HREF="infrared-howto-c-getting-started.html"><LINK
REL="PREVIOUS"
TITLE="Software"
HREF="infrared-howto-s-software.html"><LINK
REL="NEXT"
TITLE="Kernel Module Options"
HREF="infrared-howto-s-kernel-module-options.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux Infrared HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="infrared-howto-s-software.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 2. Getting Started</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="infrared-howto-s-kernel-module-options.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="infrared-howto-s-kernel"
></A
>2.2. Kernel</H1
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN226"
></A
>2.2.1. Preface</H2
><P
>&#13;
Please read the
<A
HREF="http://tldp.org/HOWTO/Kernel-HOWTO/"
TARGET="_top"
>Kernel-HOWTO</A
>
from TLDP to get more information about the compilation process.
Thomas Hertweck has written another useful
<A
HREF="http://www.thomashertweck.de/kernel.html"
TARGET="_top"
>Linux-Kernel-HOWTO</A
>
(but it is only available in German and Italian).
Check the
<A
HREF="http://irda.sourceforge.net/"
TARGET="_top"
>Linux/IrDA Project</A
>
or the Linux/IrDA mailing list archives for latest patches.
</P
><P
>&#13; You'll find the Linux/IrDA Kernel code in:
</P
><P
>&#13; /usr/src/linux/net/irda (protocol stuff)
</P
><P
>&#13; /usr/src/linux/drivers/net/irda (device drivers)
</P
><P
>&#13; /usr/src/linux/include/net/irda (header files)
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN236"
></A
>2.2.2. General Parameters</H2
><P
>&#13; Make sure you use kernel 2.6 sources. I recommend not to use
any earlier kernel version, but this document will describe
differences to the kernel 2.4 series in the appropriate places.
If unsure about your kernel version try <B
CLASS="command"
>uname -r</B
>.
</P
><P
>&#13; For current 2.6 kernels there are no patches necessary.
In case there is a kernel patch from the Linux/IrDA project or
other places to apply (for example for kernel 2.4),
put it into the directory <TT
CLASS="filename"
>/usr/src</TT
>
or where else your kernel sources live and apply something like (replace
<TT
CLASS="filename"
>patch-2_4.0-irdaXXX</TT
> with the actual file name):
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>&#13;cd /usr/src
tar xvzf patch-2_4.0-irdaXXX.tar.gz
cd linux
patch -p1 -l &#60; ../patch-2_4.0-irdaXXX
</PRE
></FONT
></TD
></TR
></TABLE
>
For latest drivers experimental support has to be enabled
<B
CLASS="command"
>CONFIG_EXPERIMENTAL</B
>, at least in kernel 2.4.
</P
><P
>&#13; Enable sysctl in "General Setup" <B
CLASS="command"
>CONFIG_SYSCTL</B
>.
</P
><P
>&#13; You should have proc file system support <B
CLASS="command"
>CONFIG_PROC_FS</B
>.
</P
><P
>&#13; Also serial support for the SIR features <B
CLASS="command"
>CONFIG_SERIAL</B
>.
</P
><P
>&#13; I am not sure whether there has to be printer support for using a
printer with Linux/IrDA <B
CLASS="command"
>CONFIG_PRINTER</B
>. But I assume this feature is
not necessary.
</P
><P
>&#13; Networking support _must_ be enabled <B
CLASS="command"
>CONFIG_NET</B
>.
</P
><P
>&#13; Make sure you have module support <B
CLASS="command"
>CONFIG_MODULES</B
> in your kernel! Test
it e.g. with <B
CLASS="command"
>lsmod</B
>.
</P
><P
>&#13;
Also kerneld support <B
CLASS="command"
>CONFIG_KERNELD</B
>. But <B
CLASS="command"
>kmod</B
>
(<B
CLASS="command"
>CONFIG_KMOD</B
>) also
works. A monolithic kernel seems to work, too. But modules are highly
recommended!
</P
><P
>&#13; To use <B
CLASS="command"
>irdadump</B
> you probably have to set <B
CLASS="command"
>CONFIG_PACKET</B
>.
</P
><P
>&#13; If you only apply the Linux/IrDA patch, you should not have to do a
make clean, so that should save you some time. I suggest you do
something like this:
</P
><P
>&#13; For kernel 2.4 use:
<B
CLASS="command"
>make dep &#38;&#38; make all &#38;&#38; make modules
&#38;&#38; make install &#38;&#38; make modules_install</B
>.
For kernel 2.6 use:
<B
CLASS="command"
>make all &#38;&#38; make install &#38;&#38; make modules_install</B
>.
If you get really strange errors, then try to rebuild from scratch
after a <B
CLASS="command"
>make clean</B
>.
</P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN270"
></A
>2.2.3. IrDA Specific Parameters</H2
><P
>&#13; The following is from
<TT
CLASS="filename"
>../linux-2.4.3/Documentation/Configure.help</TT
> (kernel 2.4)
or
<TT
CLASS="filename"
>../linux-2.6.x/net/irda/Kconfig</TT
>,
<TT
CLASS="filename"
>../linux-2.6.x/drivers/net/irda/Kconfig</TT
> (kernel 2.6)
with some modifications by me.
Please consult the latest available kernel
documentation for current information and new drivers.
</P
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN276"
></A
>2.2.3.1. IrDA subsystem support</H3
><P
>&#13;CONFIG_IRDA
Say Y here if you want to build support for the IrDA (TM) protocols.
The Infrared Data Associations (tm) specifies standards for wireless
infrared communication and is supported by most laptops and PDA's.
</P
><P
>&#13; To use Linux support for the IrDA (tm) protocols, you will also need
some user-space utilities like irattach
. For more information, see the file
Documentation/networking/irda.txt. You also want to read the
InfraRed-HOWTO, available at
<A
HREF="http://tuxmobil.org/howtos.html"
TARGET="_top"
>TuxMobil</A
>
.
</P
><P
>&#13; This support is also available as a module called irda.o. If you
want to compile it as a module, say M here and read
Documentation/modules.txt.
</P
><P
>&#13;IrDA Cache last LSAP
</P
><P
>&#13;CONFIG_IRDA_CACHE_LAST_LSAP
Say Y here if you want IrLMP to cache the last LSAP used. This makes
sense since most frames will be sent/received on the same
connection. Enabling this option will save a hash-lookup per frame.
</P
><P
>&#13; If unsure, say Y.
</P
><P
>&#13;IrDA Fast RR's
</P
><P
>&#13;CONFIG_IRDA_FAST_RR
Say Y here is you want IrLAP to send fast RR (Receive Ready) frames
when acting as a primary station. This will make IrLAP send out a RR
frame immediately when receiving a frame if its own transmit queue
is currently empty. This will give a lot of speed improvement when
receiving much data since the secondary station will not have to
wait the max. turn around time before it is allowed to transmit the
next time. If the transmit queue of the secondary is also empty the
primary will back off waiting longer for sending out the RR frame
until the timeout reaches the normal value. Enabling this option
will make the IR-diode burn more power and thus reduce your battery
life.
</P
><P
>&#13; If unsure, say N.
</P
><P
>&#13;IrDA Debug
</P
><P
>&#13;CONFIG_IRDA_DEBUG
Say Y here if you want the IrDA subsystem to write debug information
to your syslog. You can change the debug level in
<TT
CLASS="filename"
>/proc/sys/net/irda/debug</TT
>
</P
><P
>&#13; If unsure, say Y (since it makes it easier to find the bugs).
</P
><P
>&#13;IrLAP Compression support
</P
><P
>&#13;CONFIG_IRDA_COMPRESSION
Compression is _not_ part of the IrDA(tm) protocol specification,
but it's working great! Linux is the first to try out compression
support at the IrLAP layer. This means that you will only benefit
from compression if you are running a Linux &#60;-&#62; Linux configuration.
</P
><P
>&#13; If you say Y here, you also need to say Y or M to a compression
protocol below.
</P
><P
>&#13;IrLAP Deflate Compression Protocol (EXPERIMENTAL)
</P
><P
>&#13;CONFIG_IRDA_DEFLATE
Say Y here if you want to build support for the Deflate compression
protocol. The deflate compression (GZIP) is exactly
the same as the one used by the PPP protocol.
</P
><P
>&#13; If you want to compile this compression support as a module, say M
here and read Documentation/modules.txt. The module will be called
irda_deflate.o.
</P
><P
>&#13;IrLAN Protocol
But currently the IrLAN protocol is no longer maintained
by the Linux/IrDA core team.
</P
><P
>&#13;CONFIG_IRLAN
Say Y here if you want to build support for the IrLAN protocol. If
you want to compile it as a module (irlan.o), say M here and read
Documentation/modules.txt. IrLAN emulates an Ethernet and makes it
possible to put up a wireless LAN using infrared beams.
</P
><P
>&#13; The IrLAN protocol can be used to talk with infrared access points
like the HP NetbeamIR, or the ESI JetEye NET. You can also connect
to another Linux machine running the IrLAN protocol for ad-hoc
networking!
</P
><P
>&#13;IrCOMM Protocol
</P
><P
>&#13;CONFIG_IRCOMM
Say Y here if you want to build support for the IrCOMM protocol. If
you want to compile it as a module (you will get <B
CLASS="command"
>ircomm.o</B
> and
<B
CLASS="command"
>ircomm-tty.o</B
>), say M here and read Documentation/modules.txt. IrCOMM
implements serial port emulation, and makes it possible to use all
existing applications that understands TTY's with an infrared link.
Thus you should be able to use application like PPP, minicom and
others. Enabling this option will create two modules called <TT
CLASS="filename"
>ircomm</TT
>
and <TT
CLASS="filename"
>ircomm-tty</TT
>.
</P
></DIV
><DIV
CLASS="sect3"
><H3
CLASS="sect3"
><A
NAME="AEN307"
></A
>2.2.3.2. Device Drivers</H3
><P
>&#13;IrTTY IrDA Device Driver
</P
><P
>&#13;CONFIG_IRTTY_SIR
Say Y here if you want to build support for the IrTTY line
discipline. If you want to compile it as a module (irtty.o), say M
here and read Documentation/modules.txt. IrTTY makes it possible to
use Linux's own serial driver for all IrDA ports that are 16550
compatible. Most IrDA chips are 16550 compatible so you should
probably say Y to this option. Using IrTTY will however limit the
speed of the connection to 115200 bps (IrDA SIR mode)
</P
><P
>&#13; If unsure, say Y.
</P
><P
>&#13;IrPORT IrDA Device Driver
</P
><P
>&#13;CONFIG_IRPORT_SIR
Say Y here if you want to build support for the IrPORT IrDA device
driver. If you want to compile it as a module (irport.o), say M here
and read Documentation/modules.txt. IrPORT can be used instead of
IrTTY and sometimes this can be better. One example is if your IrDA
port does not have echo-canceling, which will work OK with IrPORT
since this driver is working in half-duplex mode only. You don't
need to use <B
CLASS="command"
>irattach</B
> with IrPORT, but you just insert it the same
way as FIR drivers (<B
CLASS="command"
>insmod irport io=0x3e8 irq=11</B
>). Notice that
IrPORT is a SIR device driver which means that speed is limited to
115200 bps.
</P
><P
>&#13; If unsure, say Y.
</P
><P
>&#13;Winbond W83977AF IrDA Device Driver
</P
><P
>&#13;CONFIG_WINBOND_FIR
Say Y here if you want to build IrDA support for the Winbond
W83977AF super-io chipset. This driver should be used for the IrDA
chipset in the Corel NetWinder. The driver supports SIR, MIR and FIR
(4Mbps) speeds.
</P
><P
>&#13; If you want to compile it as a module, say M here and read
Documentation/modules.txt. The module will be called w83977af_ir.o.
</P
><P
>&#13;NSC PC87108 IrDA Device Driver
</P
><P
>&#13;CONFIG_NSC_FIR
Say Y here if you want to build support for the NSC PC87108 and
PC87338 IrDA chipsets. This driver supports SIR,
MIR and FIR (4Mbps) speeds.
</P
><P
>&#13; If you want to compile it as a module, say M here and read
Documentation/modules.txt. The module will be called nsc-ircc.o.
</P
><P
>&#13;Toshiba Type-O IR Port Device Driver
</P
><P
>&#13;CONFIG_TOSHIBA_FIR
Say Y here if you want to build support for the Toshiba Type-O IR
chipset. This chipset is used by the Toshiba Libretto 100CT, and
many more laptops. If you want to compile it as a module, say M here
and read Documentation/modules.txt. The module will be called
toshoboe.o.
</P
><P
>&#13;SMC IrCC (Experimental)
</P
><P
>&#13;CONFIG_SMC_IRCC_FIR
Say Y here if you want to build support for the SMC Infrared
Communications Controller. It is used in the Fujitsu Lifebook 635t
and Sony PCG-505TX. If you want to compile it as a module, say M
here and read Documentation/modules.txt. The module will be called
smc-ircc.o.
</P
><P
>&#13;ALi M5123 FIR Controller Driver (Experimental)
</P
><P
>&#13;CONFIG_ALI_FIR
Say Y here if you want to build support for the ALi M5123 FIR
Controller. The ALi M5123 FIR Controller is embedded in ALi
M1543C, M1535, M1535D, M1535+, M1535D South Bridge. This
driver supports SIR, MIR and FIR (4Mbps) speeds.
</P
><P
>&#13; If you want to compile it as a module, say M here and read
Documentation/modules.txt. The module will be called ali-ircc.o.
</P
><P
>&#13;Serial dongle support
</P
><P
>&#13;CONFIG_DONGLE
Say Y here if you have an infrared device that connects to your
computer's serial port. These devices are called dongles. Then say Y
or M to the driver for your particular dongle below.
</P
><P
>&#13; Note that the answer to this question won't directly affect the
kernel: saying N will just cause this configure script to skip all
</P
><P
>&#13;ESI JetEye PC Dongle
</P
><P
>&#13;CONFIG_ESI_DONGLE
Say Y here if you want to build support for the Extended Systems
JetEye PC dongle. If you want to compile it as a module, say M here
and read Documentation/modules.txt. The ESI dongle attaches to the
normal 9-pin serial port connector, and can currently only be used
by IrTTY. To activate support for ESI dongles you will have to
start irattach like this: <B
CLASS="command"
>irattach -d esi</B
>.
</P
><P
>&#13;ACTiSYS IR-220L and IR220L+ dongle
</P
><P
>&#13;CONFIG_ACTISYS_DONGLE
Say Y here if you want to build support for the ACTiSYS
IR-220L and IR220L+ dongles. If you want to compile it as a module,
say M here and read Documentation/modules.txt. The ACTiSYS dongles
attaches to the normal 9-pin serial port connector, and can
currently only be used by IrTTY. To activate support for ACTiSYS
dongles you will have to start irattach like this:
<B
CLASS="command"
>irattach -d actisys</B
> or <B
CLASS="command"
>irattach -d actisys+</B
>.
</P
><P
>&#13;Tekram IrMate 210B dongle
</P
><P
>&#13;CONFIG_TEKRAM_DONGLE
Say Y here if you want to build support for the Tekram IrMate 210B
dongle. If you want to compile it as a module, say M here
and read Documentation/modules.txt. The Tekram dongle attaches to
the normal 9-pin serial port connector, and can currently only be
used by IrTTY. To activate support for Tekram dongles you will have
to start <B
CLASS="command"
>irattach</B
> like this: <B
CLASS="command"
>irattach -d tekram</B
>.
</P
><P
>&#13;Greenwich GIrBIL dongle
</P
><P
>&#13;CONFIG_GIRBIL_DONGLE
Say Y here if you want to build support for the Greenwich GIrBIL
dongle. If you want to compile it as a module, say M here and read
Documentation/modules.txt. The Greenwich dongle attaches to the
normal 9-pin serial port connector, and can currently only be used
by IrTTY. To activate support for Greenwich dongles you will have to
insert <B
CLASS="command"
>irattach -d girbil</B
> in the /etc/irda/drivers script.
</P
><P
>&#13;Parallax Litelink dongle
</P
><P
>&#13;CONFIG_LITELINK_DONGLE
Say Y here if you want to build support for the Parallax Litelink
dongle. If you want to compile it as a module, say M here and read
Documentation/modules.txt. The Parallax dongle attaches to the
normal 9-pin serial port connector, and can currently only be used
by IrTTY. To activate support for Parallax dongles you will have to
start irattach like this <B
CLASS="command"
>irattach -d litelink</B
>.
</P
><P
>&#13;Old Belkin dongle
</P
><P
>&#13;CONFIG_OLD_BELKIN_DONGLE
Say Y here if you want to build support for the Adaptec Airport 1000
and 2000 dongles. If you want to compile it as a module, say M here
and read Documentation/modules.txt. The module will be called
old_belkin.o. Some information is contained in the comments at the
top of drivers/net/irda/old_belkin.c.
</P
></DIV
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN352"
></A
>2.2.4. Current Kernel Patches</H2
><P
>&#13; Note: <B
CLASS="command"
>donauboe</B
> is a new version of
<B
CLASS="command"
>toshoboe</B
> better FIR support
and compatibility with Donauoboe chip from
<A
HREF="http://libxg.free.fr/irda/lib-irda.html"
TARGET="_top"
>lib-irda</A
>.
Note: the <B
CLASS="command"
>toshoboe</B
> drivers has been removed
from the 2.6 kernel series.
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="infrared-howto-s-software.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="infrared-howto-s-kernel-module-options.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Software</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="infrared-howto-c-getting-started.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Kernel Module Options</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>