PCI.412 manual
31.03.2004
Page 10 of 26
Installation für Linux
Der Treiber besteht aus einem ladbaren Kernel Modul für alle
Karten. Beispiele für Gnu C werden ebenfalls mitgeliefert.
Installation for Linux
The driver consists of a loadable kernel module for all boards.
Examples for Gnu C are also delivered.
Login
Loggen Sie sich als root ein oder als Benutzer mit dem Recht
Module zu laden und Devices anzulegen.
Auswahl des richtigen Treibers
Die Verwendung von Linux-Kernel-Modulen hängt stark von der
Kernelversion sowie der verwendeten Distribution ab. Diesem
Umstand Rechnung tragend werden die Spectrum Treiber in
verschiedenen Versionen ausgeliefert. Bitte wählen Sie das am
besten passende Archiv für Ihre Installation aus.
Treiber laden
Der Linux Treiber wird als ladbares Kernel Modul spc.o
ausgeliefert. Der Treiber enthält alle Spectrum PCI, CompactPCI
und ISA Karten. Die PCI und CompactPCI Karten werden
automatisch erkannt.
Laden Sie das Modul mit insmod f spc.o.
Der insmod Befehl kann die Warnung generieren, daß das
Kernel Modul für eine andere Kernel Version kompiliert wurde.
Dies Meldung können Sie ignorieren.
Wenn das Kernel-Modul nicht in Ihrere Linux Installation geladen
werden kann, so ist es notwendig den Treiber auf Ihrem System
neu zu kompilieren. Bitte setzen Sie sich mit Spectrum in
Verbindung, um die benötigten Sourcedateien zu bekommen.
Major Number
Für den Zugriff auf den Treiber benötigen Sie die zugeteilte
Major number. Sie finden diese Zahl in /proc/devices. Der
Treiber trägt den Namen spec. Normalerweise ist diese
Nummer 254, kann aber auch je nach vorher installierten
Treibern davon abweichen.
Device anlegen
Als letzten Schritt muß ein Device mit dem Treiber verknüpft
werden. Dieses geschieht über den Befehl mknod. Als Major
number wird die in /proc/devices gefunden Zahl eingetragen.
Als Minor Number der Index der Karte die angesprochen wird.
Die Indexzählung beginnt bei 0.
mknod /dev/spc0 c 254 0 für die erste Karte
mknod /dev/spc1 c 254 1 für die zweite Karte
Stellen Sie sicher, daß alle Benutzer, die mit dem Treiber
arbeiten müssen Schreibrechte für das neu angelegte Device
haben. Dafür können Sie allen Personen Schreibrechte für das
Device erteilen: chmod a+w /dev/spc0.
Ende
Die Karte kann jetzt über das angelegte Device angesprochen
werden. Das genaue Vorgehen kann aus den Beispielen
entnommen werden.
Nach einem Neustart von Linux ist es nur nötig das Treiber
Modul zu laden. Das Device muß nur geändert werden, falls die
Major Number nicht mehr stimmt.
Login
Login as root or login as a user who has the right to load
modules and to install devices.
Select the right driver
Linux kernel modules are heavily depending on the kernel
version and distribution. Therefore the kernel driver for the
Spectrum boards is shipped in different versions. Please select
the archieve that is best matching your installed version.
Load Driver
The linux driver is shipped as the loadable kernel module spc.o.
The driver includes all Spectrum PCI, CompactPCI and ISA
boards. All PCI and CompactPCI boards are recognised
automatically.
Load the module with insmod f spc.o
The insmod command could generate a warning that the driver
module was compiled for an other kernel version. You could
ignore this warning.
It is not possible to use the driver module with linux versions prior
to kernel version 2.0.
If the kernel module could not be loaded in your linux installation
it is necessary to compile the driver directly on your system.
Please contact Spectrum to get the needed source files.
Major Number
For accessing the device driver it is necessary to know the major
number of the driver. This number is listed in /proc/devices. The
device driver is called spec in this list. Normally this number is
254 but this depends on the already installed device drivers.
Installing the Device
You connect a device to the driver with the mknod command.
The major number is the number found in /proc/devices. The
minor number is the index of the board starting with 0.
mknod /dev/spc0 c 254 0 for the first board
mknod /dev/spc1 c 254 1 for the second board
Make sure that the users that should work with the driver has
write rights to access the device. Therefore you should give all
persons all rights to the device: chmod a+w /dev/spc0
End
The board could now be accessed using the device. See the
example files for more information.
After restarting linux it is only necessary to load the driver again.
The device must only be changed if the major number has
changed.