Technical Helpweb

Dialogic® Diva® Service Release for Linux

Building Diva Server for Linux from Source

If there is no binary version of the driver for your specific kernel, or if you want to use the very latest driver available, then it will be necessary to download the source RPM, and then compile it.

The latest source rpm can be obtained via the 'download software' link on the Diva System Release for Linux page

After downloading the latest source driver, you will need to build it using the following instructions.

IMPORTANT: Perform all steps while logged in as root.

Requirements:
  • Kernel development tools must be installed. This includes:
    • modutils (package module-init-tools)
    • ncurses, ncurses-devel headers and libraries (package ncurses resp. libncurses)
    • c, c++ compiler (package gcc. gcc-g++)
    • make (package make)
    NOTE: Under your distribution the actual packages may have different names. Please use your package manager to identify the correct package to install. For example the c++ compiler package is called gcc-c++ under Fedora Core, but g++ under Debian.
  • Kernel source tree must be installed as well. The sources must match the currently running kernel. Please refer to your distribution on how to install your kernel source as this differs between distributions. If in doubt google "kernel source tree" and your distribution name.
  • Exception: If cross compiling, the following requirements must be met:
    • /usr/src/linux must point to your kernel source directory
    • A valid .config for the target system must be present in this path
    • A valid version.h must be present
  • for Slackware systems the following packages must be installed:
    • rpm (located in section ap)
    • cpio (located in section a)
    • diffutils (located in section ap)
  • for Debian systems the following package must be installed:
    • xinetd


Several tools exist to find out whether these packages are installed:
  • In RPM based systems use:
     rpm -qa |grep <package name>
    to list the status of the specified package.
  • In Slackware based systems use pkgtool and have a look in the section view whether the packages are installed.
  • In Debian based systems use
     dpkg -l <name*>
    to list all packages that include the specified name if you do not know the correct package name.


Check if you have the suitable sources for your installed kernel version. (if you are cross-compiling, see the note above).
  • To find out if source and kernel have the same version number do the following:
  • Type "uname -r" to display the current kernel version.
  • List the contents of "/usr/src/". There must be a folder e.g. "linux-2.4.27-1"
  • and a link named "linux" pointing into this directory. It should have the same name as the current kernel version.
  • If this link does not exist, create it pointing to the correct kernel source location:
     ln -s /usr/src/<kernel source directory> /usr/src/linux


The current kernel configuration file ".config" should be in the kernel source path. If the build procedure cannot find this configuration file, it will try to locate the config file of the running kernel in /boot or /proc/config.gz and use this one.

Build Procedure:

Install the source package:
  • In RPM based systems, type:
     rpm -ivh divas4linux_EICON-xxx.xxx.rpm 
    Do not use the graphical RPM Manager, otherwise the help screen with information about the build procedure will not be displayed after the installation.
  • In Debian based system, type:
     dpkg -i divas4linux-eicon-xxx.xxx.deb     
  • In Slackware based systems:
    • To list the dependencies use the following command:
       rpm -i --test divas4linux_EICON-xxx.xxx.i386.rpm  
    • update the database first to find all installed files with:
       updatedb
    • Check each dependency whether all needed files and libraries are installed:
       locate 
    • Extract the data content of the rpm into a cpio file:
       rpm2cpio divas4linux_EICON-xxx.xxx.i386.rpm > divas.cpio
    • Extract the rpm pre- and postinstall scripts into a file:
      rpm -q --scripts -p divas4linux_EICON-xxx.xxx.i386.rpm > pscripts
    • Do not delete this file. It is needed for the deinstallation procedure.
    • Change to the root directory and extract the data content of the cpio file into the filesystem:
       cd /
       cpio -i -make-directories < <path where the divas.cpio is>
    • Search in the pscripts file for "postinstall script (through /bin/sh)". The lines below with sh at the beginning must be executed in a commandline. For example:
       sh /usr/lib/eicon/divas/cfg_util.sh 3
       sh /usr/lib/eicon/divas/cfg_util.sh 7
    • To start the driver automatically do the following:
    • Create two directories: "/etc/rc.d/rc3.d" and /etc/rc.d/rc5.d"
    • Create two links:
       ln -s /usr/lib/eicon/divas/Start /etc/rc.d/rc3.d/S03DIVAS4LINUX
       ln -s /usr/lib/eicon/divas/Start /etc/rc.d/rc5.d/S03DIVAS4LINUX
  • Change to the directory "cd /usr/lib/eicon/divas/src".
  • Invoke "./Build".
  • The build procedure accepts the following switches:
    • -mrproper: A make mrproper will be performed in the kernel source dir This removes any .config files of previous runs and tries to locate these in /boot and /proc/config.gz.
      Important: Any applied configuration changes will be deleted!
    • -rpm: Builds a binary rpm for your configuration.
    • -nowait: The build procedure will start immediately without waiting 15 seconds for user intervention.
  • The build procedure will locate the kernel sources and .config itself.
  • Accept the License Agreement to build the Eicon Diva TTY Driver.
  • All drivers will be installed in the directory "/usr/lib/eicon/divas".
  • If errors occur, review the build log file "divas.log" in the build directory.
  • Change to the directory "cd /usr/lib/eicon/divas".
  • Use "./Config" to configure the Diva Server adapter(s) or follow the notes to activate the web based configuration.
  • Use "./Start" and "./Stop" to start/stop the Diva Server adapter(s) manually.


Deinstalling Diva Server for Linux

For RPM based systems, type:
 rpm -qa |grep divas |xargs rpm -e 
or
 rpm -e divas4linux_EICON-xxx.xxx-1 

For Debian based systems:
Uninstall package with:
 dpkg -r divas4linux-eicon

For Slackware based systems:
  • Create a file "preuninstall" and "postuninstall".
  • Open the file "pscripts" created during installation (see above).
  • Copy all lines between "preuninstall script (through /bin/sh)" and "postuninstall script (through /bin/sh)" in the file "preuninstall".
  • Insert the following line at the beginning: "#!/bin/sh".
  • Copy all lines below "postuninstall script (through /bin/sh)" in the file "postuninstall".
  • Insert the following line at the beginning: "#!/bin/sh".
  • Make the scripts executable (chmod).
  • Run preuninstall script.
  • Delete the following folders along with their subfolders:
    /usr/lib/eicon
    /usr/doc/packages/divas4linux_EICON
  • Run postuninstall script.

Note: On most Debian systems inetd fails to invoke the diva_httpd configuration webserver. It is generally recommended to use xinetd, which does not show this behaviour.




Feedback

Please rate the usefulness of this page:  
0 - not useful at all
1 - potentially useful
2 - quite useful
3 - very useful
4 - exactly the information I needed     

Please enter a comment about this page: