30
M3i.48xx / M3i.48xx-exp Manual
Linux
Software Driver Installation
Linux
Overview
The Spectrum M2i/M3i/M4i/M4x cards and digitizerNETBOX/generatorNETBOX products are delivered with Linux drivers suitable for
Linux installations based on kernel 2.4, 2.6, 3.x or 4.x, single processor (non-SMP) and SMP systems, 32 bit and 64 bit systems. As each
Linux distribution contains different kernel versions and different system setup it is in nearly every case necessary, to have a directly matching
kernel driver for card level products to run it on a specific system. For digitizerNETBOX/generatorNETBOX products the library is suffcient
and no kernel driver has to be installed.
Spectrum delivers pre-compiled kernel driver modules for a number of common distributions with the cards. You may try to use one of these
kernel modules for different distributions which have a similar kernel version. Unfortunately this won’t work in most cases as most Linux system
refuse to load a driver which is not exactly matching. In this case it is possible to get the kernel driver sources from Spectrum. Please contact
your local sales representative to get more details on this procedure.
The Standard delivery contains the pre-compiled kernel driver modules for the most popular Linux distribu-
tions, like Suse, Debian, Fedora and Ubuntu. The list with all pre-compiled and readily supported distribu-
tions and their respective kernel version can be found under:
http://spectrum-instrumentation.com/de/supported-linux-distributions or via the shown QR code.
The Linux drivers have been tested with all above mentioned distributions by Spectrum. Each of these distri-
butions has been installed with the default setup using no kernel updates. A lot more different distributions
are used by customers with self compiled kernel driver modules.
Standard Driver Installation
The driver is delivered as installable kernel modules together with libraries to access the kernel driver. The installation script will help you with
the installation of the kernel module and the library.
This installation is only needed if you are operating real locally installed cards. For software emulated demo
cards, remotely installed cards or for digitizerNETBOX/generatorNETBOX products it is only necessary to in-
stall the libraries as explained further below.
Login as root
It is necessary to have the root rights for installing a driver.
Call the install.sh <install_path> script
This script will install the kernel module and some helper scripts to a given directory. If you do not specify a directory it will use your home
directory as destination. It is possible to move the installed driver files later to any other directory.
The script will give you a list of matching kernel modules. Therefore it checks for the system width (32 bit or 64 bit) and the processor (single
or smp). The script will only show matching kernel modules. Select the kernel module matching your system. The script will then do the follow-
ing steps:
• copy the selected kernel module to the install directory (spcm.o or spcm.ko)
• copy the helper scripts to the install directory (spcm_start.sh and spc_end.sh)
• copy and rename the matching library to /usr/lib (/usr/lib/libspcm_linux.so)
Udev support
Once the driver is loaded it automatically generates the device nodes under /dev. The cards are automatically named to /dev/spcm0, /
dev/spcm1,...
You may use all the standard naming and rules that are available with udev.
Start the driver
Starting the driver can be done with the spcm_start.sh script that has been placed in the install directory. If udev is installed the script will only
load the driver. If no udev is installed the start script will load the driver and make the required device nodes /dev/spcm0... for accessing
the drivers. Please keep in mind that you need root rights to load the kernel module and to make the device nodes!
Using the dedicated start script makes sure that the device nodes are matching your system setup even if new hardware and drivers have
been added in between. Background: when loading the device driver it gets assigned a „major“ number that is used to access this driver.
All device nodes point to this major number instead of the driver name. The major numbers are assigned first come first served. This means
that installing new hardware may result in different major numbers on the next system start.