ISDN

Aus Neobikers Wiki
Version vom 29. September 2008, 18:23 Uhr von Neobiker (Diskussion | Beiträge) (udev Probleme fixen (/etc/udev/links.conf))
Zur Navigation springen Zur Suche springen

Zurück zum Portal

AVM Fritz!PCI Module kompilieren

Ich habe das in der XEN-Development-VM kompiliert, welche zum Kernel Kompilieren installiert wurde und natürlich alle notwendigen Software Pakete installiert hat.

Ein fertiges Kernel Modul fcpci.ko gibt es hier zum Download.

Linux-Sourcen für Kernel 2.6 downloaden und unter /usr/src installieren:

cd /usr/src
tar xzf sources/f/fcpci-suse93-3.11-07.tar.gz
mv fritz fritz-2.6

Jetzt muss in den Kernel-Sourcen noch eine doppelte Definition auskommentiert werden, damit man die Fritz-Treiber kompilieren kann.

vi /usr/src/fritz-2.6/src/tools.h

### Zeile 74 ff ###

/*
static inline unsigned long atomic_xchg (
        volatile atomic_t *     v,
        unsigned                value
) {
        return __xchg (value, &v->counter, sizeof (unsigned));
}*/ /* atomic_xchg */

Ausserdem muss noch ein XEN-Kernel-Symbol so exportiert werden, dass auch ein nicht-GPL-Modul wie das von AVM dieses verwenden kann.

vi /usr/src/xen/drivers/xen/core/evtchn.c

### Zeile 191 ff ###

EXPORT_SYMBOL(force_evtchn_callback);

Jetzt zuerst XEN übersetzen, anschliessend die AVM Module kompilieren und installieren.

cd /usr/src/

devel:/usr/src# l
insgesamt 6464
drwxr-xr-x   4 root root    4096 2006-03-04 13:50 fritz-2.6/
-rw-r--r--   1 root src  1652361 2006-10-06 19:17 fritz-2.6.tgz
lrwxrwxrwx   1 root src        3 2006-10-06 23:07 linux -> xen/
lrwxrwxrwx   1 root src       28 2006-10-06 19:29 xen -> xen-3.0.2-2/linux-2.6.16-xen/
drwxrwxr-x  14   94  141    4096 2006-10-06 22:26 xen-3.0.2-2/
-rwxr-----   1 root src  4937486 2006-09-30 22:10 xen-3.0.2-src.tgz*


cd xen-3.0.2-2
make world
make install

cd ../fritz-2.6
make
make install

Aus der Devel-VM müssen natürlich Kernel und Module in gewünschten XEN-VMs zu kopieren (XEN Host-System Dom0 und die XEN-VM, welche die FritzCard benutzen soll - per PCI-Delegation).

Dann noch /etc/modutils/aliases anpassen:

alias hisax             off
alias hisax_fcpcipnp    off

alias hdc               ide-scsi

alias char-major-43     capidrv
alias char-major-44     capidrv
alias char-major-45     capidrv

und updaten und ISDN/CAPI Pakete installieren:

update-modules.modutils

apt-get install -u capi4hylafax

Jetzt noch die FritzCard PCI einstellen, in /etc/isdn/capi.conf:

vm01:~# cat /etc/isdn/capi.conf
# card          file    proto   io      irq     mem     cardnr  options
#b1isa          b1.t4   DSS1    0x150   7       -       -       P2P
#b1pci          b1.t4   DSS1    -       -       -       -
#c4             c4.bin  DSS1    -       -       -       -
#c4             -       DSS1    -       -       -       -
#c4             -       DSS1    -       -       -       -       P2P
#c4             -       DSS1    -       -       -       -       P2P
#c2             c2.bin  DSS1    -       -       -       -
#c2             -       DSS1    -       -       -       -
#t1isa          t1.t4   DSS1    0x340   9       -       0
#t1pci          t1.t4   DSS1    -       -       -       -
fcpci           -       -       -       -       -       -
#fcclassic      -       -       0x150   10      -       -

Und schon sollte ein Reboot der XEN-VM folgendes auflisten:

...
INIT: Entering runlevel: 3
Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
 * Starting ISDN CAPI Cards...
CAPI Subsystem Rev 1.1.2.8
capifs: Rev 1.1.2.3
capi20: Rev 1.1.2.7: started up with major 68 (middleware+capifs)
fcpci: module license 'Proprietary' taints kernel.
fcpci: AVM FRITZ!Card PCI driver, revision 0.7.2
fcpci: (fcpci built on Oct  6 2006 at 23:12:57)
fcpci: -- 32 bit CAPI driver --
PCI: Enabling device 0000:02:0d.0 (0000 -> 0003)
fcpci: AVM FRITZ!Card PCI found: port 0x3800, irq 16
fcpci: Loading...
fcpci: Driver 'fcpci' attached to fcpci-stack. (152)
fcpci: Stack version 3.11-07
kcapi: Controller 1: fcpci-3800-16 attached
kcapi: card 1 "fcpci-3800-16" ready.
fcpci: Loaded.                                                           [ ok ]
Starting MTA: exim4.
...

und noch ein abschliessender Test :-)

vm01:~# uname -r
2.6.16-xen

vm01:~# capiinfo
Number of Controllers : 1
Controller 1:
Manufacturer: AVM GmbH
CAPI Version: 2.0
Manufacturer Version: 3.101-07  (49.23)
Serial Number: 1000001
BChannels: 2
Global Options: 0x00000039
   internal controller supported
   DTMF supported
   Supplementary Services supported
   channel allocation supported (leased lines)
B1 protocols support: 0x4000011f
   64 kbit/s with HDLC framing
   64 kbit/s bit-transparent operation
   V.110 asynconous operation with start/stop byte framing
   V.110 synconous operation with HDLC framing
   T.30 modem for fax group 3
   Modem asyncronous operation with start/stop byte framing
B2 protocols support: 0x00000b1b
   ISO 7776 (X.75 SLP)
   Transparent
   LAPD with Q.921 for D channel X.25 (SAPI 16)
   T.30 for fax group 3
   ISO 7776 (X.75 SLP) with V.42bis compression
   V.120 asyncronous mode
   V.120 bit-transparent mode
B3 protocols support: 0x800000bf
   Transparent
   T.90NL, T.70NL, T.90
   ISO 8208 (X.25 DTE-DTE)
   X.25 DCE
   T.30 for fax group 3
   T.30 for fax group 3 with extensions
   Modem
...

Ein fertiges Kernel Modul fcpci.ko gibt es hier zum Download.

Wenn es unter Kernel 2.6 mit udev zu Problemen kommt, hilft evtl. das ergänzen der folgenden Zeilen in /etc/udev/links.conf:

# ISDN
2 M isdn0 c 45 0
3 M isdn1 c 45 1
4 M isdn2 c 45 2
5 M isdn3 c 45 3
6 M isdn4 c 45 4
7 M isdn5 c 45 5
8 M isdn6 c 45 6
9 M isdn7 c 45 7
10 M isdnctrl0 c 45 64
11 M isdnctrl1 c 45 65
12 M isdnctrl2 c 45 66
13 M isdnctrl3 c 45 67
14 M isdnctrl4 c 45 68
15 M isdnctrl5 c 45 69
16 M isdnctrl6 c 45 70
17 M isdnctrl7 c 45 71
18 M isdninfo c 45 255
19
20 L isdnctrl /dev/isdnctrl0
21
22 M ippp0 c 45 128
23 M ippp1 c 45 129
24 M ippp2 c 45 130
25 M ippp3 c 45 131
26 M ippp4 c 45 132
27 M ippp5 c 45 133
28 M ippp6 c 45 134
29 M ippp7 c 45 135

Zurück zum Portal