## Installing Tibbo Virtual Serial Port Driver under Linux ### Pre-installation #### Downloading VSPDL Make sure that you are using the latest version of VSPDL. You can always get the latest version from [/soi/vspdl.html](/soi/vspdl.html) #### Unpacking VSPDL #### Unpacking from RPM

[root@dvhome vspd.tmp]# rpm -ivh ./vspd-1.11-linux.i586.rpm Preparing... ####################### [100%] - vspd ######################### [100%]

*RPM may report there about failed dependecies #### Unpacking from TAR

[root@dvhome vspd.tmp]# tar xvfz ./vspd-1.11-linux.tar.gz -C / usr/local/vspd-1.11-dist/ usr/local/vspd-1.11-dist/bin/ usr/local/vspd-1.11-dist/bin/vsptty usr/local/vspd-1.11-dist/bin/vspd.sh.in usr/local/vspd-1.11-dist/bin/vspm.sh.in .... (skipped) .... usr/local/vspd-1.11-dist/remove.sh usr/local/vspd-1.11-dist/configure usr/local/vspd-1.11-dist/README

#### Error reporting during the RPM installation

[root@dvhome vspd.tmp]# uname -a >> ./report.txt [root@dvhome vspd.tmp]# rpm -ivv ./vspd-1.11-linux.i586.rpm 2>> ./report.txt

Please, attach ./report.txt to your message when requesting support from Tibbo. ### Installation After completing 'pre-installation' section you should have /usr/local/vspd-x.yy-dist directory:

[root@dvhome local]# ls -l /usr/local/vspd-1.11-dist/ total 84 drwxr-xr-x 2 root root 4096 Dec 7 01:20 bin/ -rwx------ 1 root root 47674 Dec 2 11:13 configure* drwxr-xr-x 2 root root 4096 Dec 7 01:20 etc/ drwxr-xr-x 2 root root 4096 Dec 2 11:13 include/ -rwx------ 1 root root 2595 Dec 2 11:13 install.sh* drwxr-xr-x 3 root root 4096 Dec 7 01:20 lib/ drwxr-xr-x 2 root root 4096 Dec 7 01:20 man/ -rw-r--r-- 1 root root 3720 Dec 2 11:13 README -rwx------ 1 root root 714 Dec 2 11:13 remove.sh* drwxr-xr-x 2 root root 4096 Dec 7 01:20 sbin/

#### Distribution contents

[root@dvorkin local]# ls -1 -R /usr/local/vspd-1.11-dist/ /usr/local/vspd-1.11-dist/: bin/ /* binaries and startup scripts templates */ configure* /* configuration script for building VSP module */ etc/ /* configuration files templates */ include/ /* */ install.sh* /* main installation script */ lib/ /* module building directory */ man/ /* manuals */ README /* comments */ remove.sh* /* uninstall script */ sbin/ /* VSPDaemon directory */ /usr/local/vspd-1.11-dist/bin: vspd.sh.in* /* VSPDaemon startup script template */ vspm.sh.in* /* VSPModule startup script template */ vsptty* /* simple tty interaction utility */ /usr/local/vspd-1.11-dist/etc: vspd.conf.in /* VSPDaemon configuration file template */ vspd.conf.sample /* VSPDaemon configuration file example */ vspm.conf /* VSPModule configuration file template */ /usr/local/vspd-1.11-dist/include: /* */ /usr/local/vspd-1.11-dist/lib: src/ /* VSPModule sources */ /usr/local/vspd-1.11-dist/lib/src: bsd/ /* BSD-specific makefiles directory */ config.h /* module parameters */ ioctl_sys.h ioctl_vspd.h ioctl_vspm.h /* ioctl headers */ linux/ /* LINUX-specific makefiles directory */ Makefile-fake.in /* fake makefile */ Makefile.in /* general makefile template (includes OS-specific makefile) */ _makewrapper.in /* make wrapper (called automatically from install.sh) */ README /* README file */ sysheaders.h /* system-specific headers */ TODO /* driver developer comments */ vspm.c /* VSPModule source */ vspm.h /* VSPModule header */ /usr/local/vspd-1.11-dist/lib/src/bsd: Makefile-4.3.in /* BSD-4.3 makefile */ /usr/local/vspd-1.11-dist/lib/src/linux: Makefile-2.2-flags /* Linux 2.2.x specific compilation flags */ Makefile-2.2.in /* Linux-2.2 specific makefile template */ Makefile-2.4-flags /* Linux 2.4.x specific compilation flags */ Makefile-2.4.in /* Linux-2.4 specific makefile template */ Makefile-2.6.in /* Linux-2.6 specific makefile template */ /usr/local/vspd-1.11-dist/man: vspd vspm /* VSPD manuals */ /usr/local/vspd-1.11-dist/sbin: vspd* /* VSPDaemon binary */

#### Running the installation script :

[root@dvhome local]# cd /usr/local/vspd-1.11-dist/ [root@dvhome vspd-1.11-dist]# ./install.sh /usr/local/vspd installing to /usr/local/vspd creating cache ./config.cache checking for target KERNEL... ok checking for target KERNEL name... linux checking for target KERNEL version... 2.4.22-10mdk checking for target KERNEL subversion... 2.4 checking for target KERNEL path... /usr/src/linux-2.4.22-10mdk checking for target MAKE_ARGS... make checking for DEVFS... ok ********************* checking for required programms ****************** checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking for install... /usr/bin/install checking for cp... /bin/cp ****************** checking for required header files ****************** checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for ctype.h... yes *********************** checking for functions ************************* checking for strerror... yes ************************ current settings ****************************** CC: gcc CXX version: gcc-3.3.1 (GCC) 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk) Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. CXXFLAGS: EXTRA_DEFINES: EXTRA_SOURCES: Using kernel: linux Using kernel version: 2.4.22-10mdk Using kernel subversion: 2.4 ********************** making config.h and Makefile ******************** updating cache ./config.cache creating ./config.status creating lib/src/_makewrapper creating lib/src/Makefile creating lib/src/linux/Makefile-2.4 creating ./bin/vspd.sh creating ./bin/vspm.sh creating ./etc/vspd.conf compiling the vspm kernel module ... gcc -Wall -O2 -fomit-frame-pointer -I./ -D__KERNEL__ -DLINUX -DMODULE -DEXPORT_SYMTAB -I/usr/src/linux-2.4.22-10mdk/include/ -c vspm.c -o ../vspm.ko /* line split for documentation purposes - the two above should be one line. */ ... (skipped) ... installing ... installing vspm ... installing vspd ... setting runlevels for vspm ... setting runlevels for vspd ...

it may take a long time to compile VSPModule on 2.6.x kernels, because some Linux distributions do not include precompiled kernel source tree. #### Installation results

[root@dvorkin vspd-1.11-dist]# ls -1 -R /usr/local/vspd/ /usr/local/vspd/: bin/ /* vsptty and startup scripts */ etc/ /* configuration files */ lib/ /* compiled VSPModule */ man/ /* manuals and docs*/ sbin/ /* VSPDaemon directory */ var/ /* logs directory */ /usr/local/vspd/bin: vspd.sh* /* VSPDaemon startup script */ vspm.sh* /* VSPModule startup script */ vsptty* /* simple tty interaction programm */ /usr/local/vspd/etc: vspd.conf /* running VSPDaemon configuration */ vspd.conf.in /* VSPDaemon configuration template */ vspd.conf.sample /* VSPDaemon configuration example */ vspm.conf /* VSPModule configuration */ /usr/local/vspd/lib: vspm.ko* /* VSPModule compiled binary */ /usr/local/vspd/man: vspd vspm /* VSPDaemon and VSPModule manuals */ /usr/local/vspd/sbin: vspd* /* VSPDaemon binary */ /usr/local/vspd/var: /* directory for log files */

#### Advanced installation notes **install.sh** shell script takes one command-line parameter: Installation path.

[root@dvorkin vspd-1.11-dist]# ./install.sh You don't have to install to the same path Use ./install.sh

First, it runs **./configure** script. The ./configure script takes system enviroment and creates ./lib/src/_makewrapper (from ./lib/src/_makewrapper.in), ./lib/src/Makefile (from ./lib/src/Makefile.in) and ./lib/src/linux/Makefile-X.Y (from ./lib/src/linux/Makefile-x.y.in, where is linux kernel subversion code). The ./configure script takes a number of parameters:

[root@dvorkin vspd-1.11-dist]# ./ [root@dvorkin vspd-1.11-dist]# ./configure --help Usage: configure [options] [host] Options: Configuration: --cache-file=FILE cache test results in FILE ... (skipped) ... --enable and --with options recognized: --with-kernel=: compile for kernel (example: "linux") --with-kernel-ver=: compile for kernel version (example: "2.4.22-10mdk") --with-kernel-subver=: compile for kernel version (example: "2.4")

You can change script parameters by editing install.sh ./configure script tries to detect your kernel version and use suitable kernel sources from /usr/src/linux-x.y…/. You must have kernel sources in /usr/src/linux-…/ directory to successfully install VSPDL Second, **install.sh** runs **/usr/local/vspd-x.yy-dist/lib/src/_makewrapper** script, created from /usr/local/vspd-x.yy-dist/lib/src/_makewrapper.in by ./configure script. ./_makewrapper returns 0 (on success) or error code (on compilation error) to ./install.sh shell sript. ./_makewrapper runs “make ”. It uses ./lib/src/linux/Makefile-x.y, included in ./lib/src/Makefile. You can change compilation parameters (for example, to compile for other kernel subversions) by editing ./lib/src/Makefile and ./lib/src/linux/Makefile-x.y. Third, install.sh places startup scripts into your RC.* directories, and creates /usr/local/vspd directory tree. #### Error reporting during the installation

[root@dvorkin vspd-1.11-dist]# cd /usr/local/vspd-1.11-dist/ [root@dvorkin vspd-1.11-dist]# uname -a >> ./report.txt [root@dvorkin vspd-1.11-dist]# ./install.sh /usr/local/vspd >> ./report.txt 2>> ./report.txt [root@dvorkin vspd-1.11-dist]# cat ./lib/src/Makefile >> ./report.txt [root@dvorkin vspd-1.11-dist]# cat ./lib/src/linux/* >> ./report.txt

Please, attach ./report.txt to your message when requesting support from Tibbo. ### Configuration There are four configuration files in the VSPD installation directory:

[root@dvorkin vspd-1.11-dist]# ls /usr/local/vspd/etc/ [root@dvorkin src]# ls -1 /usr/local/vspd/etc vspd.conf /* VSPDaemon configuration file */ vspd.conf.in /* VSPDaemon configuration template */ vspd.conf.sample /* VSPDaemon configuration example */ vspm.conf /* VSPModule configuration file */

#### VSPModule configuration

[root@dvorkin etc]# cat /usr/local/vspd/etc/vspm.conf # Virtual Serial Port module config file # Copyright (C) 2003, Tibbo Technology Inc. # ----- module section # You may use # as comment # For example if you want to set MAXDEV as default, # you have to comment the string # "MAXDEV=100" -> "#MAXDEV=100" # maximum number of devices # default MAXDEV=128 #MAXDEV=128 # major number for serial devices # set major number, if you aren't using devfs # default MAJOR0=100 MAJOR0=100 # major number for daemon devices MAJOR1=101 # debug level # 0 = no debug # 1 = simple kernel messages # 2 = development debug # 3 = development debug with