beautypg.com

Welltech SPCI2S Intel NetStructure SS7 Boards User Manual

Page 12

background image

SS7 Programmer’s Manual for SPCI2, SPCI4 and CPM8 Issue 2

Page 12

2.2.1 Creating Linux device nodes

The Linux device driver is a run-time loadable module. It can be loaded manually
using the ’insmod’ command and does not need the kernel to be rebuilt. However
prior to loading the device driver it is necessary to create a device file for each card
in the system.

The device file must be assigned an unallocated, major character device number
and a minor device number. First, it is necessary to establish an unallocated major
device number. If your LINUX distribution supports the /proc file system, the major
device numbers currently in use by character and block devices can be displayed
using:

more /proc/devices

Otherwise, refer to the operating system documentation for details on how to
allocate a major character device number.

Once a major device number is known, the ’mknod’ command must be run once for
each board in the system and the attributes of the device file must set using
’chmod’. Both these operations should be performed with root privileges.

The appropriate syntax is:

cd /dev
mknod septel c
chmod 0666 septel

where: MAJNO is the major device number, MINNO is in the range 0 to 15. MINNO
is the board_id.

For example, the commands to create two SPCI4 boards using major character
device number 126 are:

cd /dev
mknod septel0 c 126 0
mknod septel1 c 126 1
chmod 0666 septel0
chmod 0666 septel1

2.2.2 Loading the device driver

The device driver should be manually loaded using the ’insmod’ command from the
directory containing the device driver (i.e. sptpci.o) file whilst logged on with root
privileges. The command can be executed either in a system start-up script or
interactively by the user from a command shell if required.

The syntax is:

insmod -f sptpci.o majno=

This manual is related to the following products: