Summary:
In the SDTK a perl script called solinst.pl has been provided
in the install directory. This script is used to build,
configure, and install the SDTK drivers.
Before running the solinst.pl script you will need to decide two things:
You will configure the card ordering by listing the serial numbers of all of the Aculab PCI/cPCI cards that you have fitted in your system. You will need to read these serial numbers from the cards. The card ordering determines the switch card numbers and network port numbers that are assigned to each card.
For example: Suppose that one has two cards fitted in one's system and both have four network ports; and that one chooses the card with serial number 16 to be the first card and the card with serial number 36 to be the second card. The switch card numbers and network ports would be as follows:
| Card Serial # | Switch Card Number | Network port numbers |
|---|---|---|
| 16 | 0 | 0 to 3 |
| 36 | 1 | 4 to 7 |
For each port on card you will configure a protocol. You must ensure that
you have the appropiate call control protocol object files in the
call/driver or call/driver.m64 directories, otherwise
the script will be unable to properly link the driver.
In the example here the ETS300 and QSIG protocols have been chosen. These protocol objects are kept in seperate '.tgz' files that are downloaded from the Aculab website.
The call control protocol object modules for ETS300 and QSIG are contained in the following two archives:
When these archives are unpacked, the objects for
each protocol will be copied into the call/driver and
call/driver.m64 directories.
The card serial number is normally located on the reserve side of the card on a label. For example the label on a dual Prosody Processor card with a serial number of 32 would look something like this:
P/N ACU6150 S/N 32 WO N511
serialno program
The createlnk script, which will be run by solinst.pl,
needs to use the serialno program in the TiNG diag directory,
so make sure you have built the programs under TiNG in accordance with
building software components.
solinst.pl
The solinst.pl script is interactive and will ask you a number of
question about the system's configuration. It is written in Perl, and you
will need a Perl interpreter to run it. To run it, type
$ perl ./solinst.pl
The script will first display the contents of the TiNGTARGET
environment variable.
solinst.pl: v1.1.0 Aculab call,switch & speech drivers 32/64 bit build tool for Solaris Sparc Found environment variable TiNGTARGET=SOL building 32 bit Solaris Drivers
This environment variable is used to determine
whether the driver should be compiled as a 32-bit or 64-bit driver (for use
with the 32-bit or 64-bit Solaris kernel, respectively). How to set the
TiNGTARGET environment variable is described in
setting up the build environment.
Check that the variable name has a lower case 'i'. If
TiNGTARGET has none of the values listed in the following
table, then solinst.pl will display an error and abort.
Value of TiNGTARGET | Target platform |
|---|---|
| SOL_32 | Solaris 32-bit |
| SOL_64 | Solaris 64-bit |
The script will then ask you if you require call control support.
Do you wish to include call driver support (y/n)? [Y]: y
If you have a system that has cards without any PM4 modules fitted, then you do not require call control support and can select the 'N' option.
The script then asks how many cards are installed.
How many Aculab cards, are there, in total (1..6)? [1]: 2
If you enter the wrong number of cards the driver will fail to load correctly, because it will be unable to detect the number of cards that it is expecting to detect.
The script will then ask how many cards require call control, which means now many cards have PM4 modules installed.
How many cards, are there, that require call control? (1..2)? [2]:
Note that any cards without PM4 modules installed should be configured as the last cards in the system ordering.
The script will then iterate through each of the cards, in the order that they were chosen, first asking how many ports are fitted to the PM4 module, and then for each port asking which protocol you want installed.
Card 1: enter number of ports for this card (1, 2, 4 or 8) [8]: 4 Card 1: port 0: enter protocol for port 0: (? for options) [?]: ets Card 1: port 1: enter protocol for port 1: (? for options) [ets]: ets Card 1: port 2: enter protocol for port 2: (? for options) [ets]: qsig Card 1: port 3: enter protocol for port 3: (? for options) [qsig]: qsig Card 2: enter number of ports for this card (1, 2, 4 or 8) [8]: 4 Card 2: port 0: enter protocol for port 0: (? for options) [qsig]: Card 2: port 1: enter protocol for port 1: (? for options) [qsig]: Card 2: port 2: enter protocol for port 2: (? for options) [qsig]: ets Card 2: port 3: enter protocol for port 3: (? for options) [ets]: ets
In this example the choosen protocol is ETS300. Entering '?' provides a
list of the protocol objects the solinst.pl can find in the
call/driver and call/driver.m64 directories.
The script will then call another script called makedriver.pl
which is used to link the driver from the choosen configuration.
driver name: gen-SOL_32/ACU_eeqq----qqee---- running command: ./makedriver.pl gen-SOL_32/ACU_eeqq----qqee---- ld -r -M mapfile -B reduce -o gen-SOL_32/ACU_eeqq----qqee---- ../TiNG/driver/gen-SOL_32/TiNG.o ../switch/driver/swdrvr.o ../call/driver/ACUc2card.o ../call/driver/ets0.o ../call/driver/ets1.o ../call/driver/qsig2.o ../call/driver/qsig3.o ../call/driver/dummy4.o ../call/driver/dummy5.o ../call/driver/dummy6.o ../call/driver/dummy7.o ../call/driver/qsig8.o ../call/driver/qsig9.o ../call/driver/ets10.o ../call/driver/ets11.o ../call/driver/dummy12.o ../call/driver/dummy13.o ../call/driver/dummy14.o ../call/driver/dummy15.o
The driver filename is ACU_eeqq---qqee---, which tells us
that on the first four port card, ports 0 & 1 are running ETS300, ports
2 & 3 are running QSIG, and on the second four port card
ports 4 & 5 are running ETS300 and ports 6 & 7 are running QSIG.
The script will then ask if you want to install the driver.
Do you wish to install this driver now (y/n)? [Y]: y
If you choose to install the driver then you need to have knowledege of the superuser password, otherwise the drivers will not be allowed to install.
The script will then ask if you want to create a driver configuration file, and if so, prompt you for the serial numbers of each card.
Do you wish to create a driver configuration file used to order the cards (y/n)? [Y]: y Card 0: enter card's serial number [0]: 16 Card 1: enter card's serial number [0]: 36 Are these serial numbers correct (y/n)? [Y]: y Creating configuration file number of cards: 2 Creating driver configuration file /usr/kernel/drv/ACU_.conf its contents is as follows: card_16_call_swindex=0; card_16_switch_swindex=0; card_16_TiNG_swindex=0; card_36_call_swindex=1; card_36_switch_swindex=1; card_36_TiNG_swindex=1; running command: su root -c "cp ./tmp.conf /usr/kernel/drv/ACU_.conf"
If you choose to create a driver configuration file then you need to have knowledege of the card's serial numbers. If you choose not to create a driver configuration file, then when they are loaded the drivers will use the details in any existing configuration file that may exist. If no existing configuration file exists, the drivers will use the system default order.
The driver configuration filename is based on the driver name told by the install
script to Solaris kernel. The driver name given will always be ACU_,
hence its configuration file is ACU_.conf. The configuration file
will be located in the /usr/kernel/drv directory is used by both
32-bit and 64-bit Solaris kernels. Driver configuration options in this file
are described in Prosody Installation guide:
driver configuration options on Solaris, but all values are set
automatically to suitable values, so it not necessary to edit this file manually.
The script will then call a shell script called install to install the driver in the system.
running command: su root -c "./install gen-SOL_32/ACU_eeqq----qqee----" exit status = 0 devfsadm[1459]: verbose: mknod /devices/pci@1f,0/pci@1/pci12d9,2@2:@c:TiNG 0l/3l/20666 devfsadm[1459]: verbose: mknod /devices/pci@1f,0/pci@1/pci12d9,2@2:@c:ACUc 0l/3l/20666 devfsadm[1459]: verbose: mknod /devices/pci@1f,0/pci@1/pci12d9,2@2:@c:ACUs 0l/3l/20666 devfsadm[1459]: verbose: mknod /devices/pci@1f,0/pci@1/pci12d9,2@4:@d:TiNG 0l/3l/20666 devfsadm[1459]: verbose: mknod /devices/pci@1f,0/pci@1/pci12d9,2@4:@d:ACUc 0l/3l/20666 devfsadm[1459]: verbose: mknod /devices/pci@1f,0/pci@1/pci12d9,2@4:@d:ACUs 0l/3l/20666 Driver (ACU_) installed.
The actual driver name installed by the install script in the system is
ACU_ and should not be confused with ACU_eeqq----qqee---- the
driver filename. The driver file is copied by the install script to the
/usr/kernel/drv for 32 bit Solaris kernel or /usr/kernel/drv/sparcv9
for 64 bit Solaris kernel, and creates a symbolic link file in either directory called
ACU_, that points to the driver file, as shown below.
ACU_ -> /usr/kernel/drv/ACU_eeqq----qqee----
or
ACU_ -> /usr/kernel/drv/sparcv9/ACU_eeqq----qqee----
While the driver installs it can be useful to check the system log, because
the driver reports there if it has successfully found cards in the system or
found some problems. Depending from how the system is configured the system
log can be found in the /var/adm/messages file or on the
console device /dev/console. For more information see
Prosody guide: driver tracing on Solaris.
Finally the script will call a shell script called
createlnk to create symbolic link files in the
/dev/aculab directory.
running command: su root -c "./createlnk 16 36" /devices/pci@1f,0/pci@1,1/pci12d9,2@4:TiNG /devices/pci@1f,0/pci@1/pci12d9,2@2:TiNG Serial number 16 matched ln -s /devices/pci@1f,0/pci@1/pci12d9,2@2:TiNG /dev/aculab/Prosody_16 ln -s /devices/pci@1f,0/pci@1/pci12d9,2@2:ACUc /dev/aculab/ACUc0 ln -s /devices/pci@1f,0/pci@1/pci12d9,2@2:ACUs /dev/aculab/ACUs0 Serial number 36 matched ln -s /devices/pci@1f,0/pci@1,1/pci12d9,2@4:TiNG /dev/aculab/Prosody_36 ln -s /devices/pci@1f,0/pci@1,1/pci12d9,2@4:ACUc /dev/aculab/ACUc1 ln -s /devices/pci@1f,0/pci@1,1/pci12d9,2@4:ACUs /dev/aculab/ACUs1
These symbolic links are used by the Aculab call control, switch control,
and speech API libraries to communicate to the driver via an IOCTL
interface. These symbolic link files point to special character files
located in the /devices directory and can vary considerably
depending from the way the system PCI bus is organized. The serial numbers of
all the cards are passed into createlnk and the card order
determines the way the symbolic files are organised.
The Prosody driver needs a dedicated thread for each Prosody Processor that it handles. Since a Solaris device driver cannot itself create threads, a helper application is required and you must leave it running at all times. To run the helper, for each Prosody card run:
$(TiNG)/apilib/gen-SOL_32/daemon $(TiNG)/apilib/gen-SOL_32/prosody_thread -c Prosody_1234 &
where Prosody_1234 is the name of the card. (The card
names are fully described in
Prosody Guide - how to download firmware).
This starts the right number of threads. As it starts, it produces
messages like this:
Card Prosody_1234, mod:0x1 Card Prosody_1234, mod:0x2 Started 2 threads
This shows output generated on a system which has a PCI card with two Prosody Processors. Sometimes during testing you may see output like this:
Card Prosody_1234, mod:0x1 Card Prosody_1234, mod:0x2 Started 2 threads Prosody_1234: 0: ioctl failed: cannot start daemon thread: Device busy Prosody_1234: 1: ioctl failed: cannot start daemon thread: Device busy
this means that you are accidentally trying to start prosody_thread twice on the same card, so the second copy finds the card already in use.
Normally the helper application is started in one of the system boot
scripts in /etc/rc2.d/ or /etc/rc3.d/. A
typical script might contain this:
for card in `cd /dev/aculab; echo *` do /opt/aculab/TiNG/apilib/gen-SOL_32/daemon /opt/aculab/TiNG/apilib/gen-SOL_32/prosody_thread -c $card & done
which goes through each card in turn starting its helper. This is also a good place to download firmware.
When you have started the daemon threads you are now ready to prepare to build applications as described in Prosody installation guide.
If you ever want to uninstall the driver, this is described in Prosody installation guide: driver installation: Solaris: uninstalling