Next: , Previous: Introduction, Up: Top


2 Installation

2.1 Preparation

KSWv4lcmn package should be installed into your system ahead of this package installation.

Backup of /etc/* is highly recommended.

[Solaris 8 only] Confirm that shared memory segment is larger than 6.1MB. Example:

     % sysdef | grep SHMMAX
      33554432	max shared memory segment size (SHMMAX)

This example shows that system reserves 33554432 bytes (=32MB) for shared memory segment; that's enough size. If this size is smaller than limit, edit or add line to /etc/system like this:

     set shmsys:shminfo_shmmax=0x2000000

See System V Shared Memory in the "Solaris Tunable Parameters Reference Manual" at http://docs.sun.com.

2.2 Hardware Installation

Shutdown machine and plug capture card into vacant PCI slot of workstation/PC. 32bit slot and 33MHz PCI clock is preferred (SAA713x works on 33MHz/32-bit bus). Beware not to skewed or shallowly plugged. Connect audio cable and antenna cable.

After boot up, verify device recognition of kernel. Run /opt/KSWv4lcmn/sbin/report-v4l script to do it.

Example (x86 machine):

     % /opt/KSWv4lcmn/sbin/report-v4l
     Solaris release... 5.10
     Machine architecture... i86pc
     Hardware architecture... i86pc
     Searching device node for Bt8x8...
     Searching aliases for bt848x driver...
     Searching major device number for bt848x...
     Searching for installed instances of bt848x node...
     Searching naming rules of special files for bt848x...
     Searching for kernel module for bt848x...
     Searching device node for SAA713x...
       pci1131,0              1131 7130 1131 0000
     Searching aliases for saa713x driver...
     Searching major device number for saa713x...
     Searching for installed instances of saa713x node...
     Searching naming rules of special files for saa713x...
     Searching for kernel module for saa713x...
     Searching special files...
     %

Look for result of “Searching device node for SAA713x”. it shows one device node instance named “pci1131,0” with PCI vendor ID 0x1131, PCI device ID 0x7130, PCI subsystem ID 0x1131 and PCI subsystem device ID 0x000.

On SPARC system, you will find device named “video”, which is taken from PCI device class code.

2.3 Package Installation

There are two ways for package installation: using distributed package file, or creating user's private package file from source code.

2.3.1 Installation by distirbuted package file

Our project distribute package files at download site at http://sourceforge.net. Third parties may distribute original or modified package files.

Package file has .pkg.gz or .pkg suffix, say KSWxxx.pkg.gz for example, gain root priviledge and install it as follows:

     # gzip -d KSWxxx.pkg.gz
     # pkgadd -d KSWxxx.pkg all

2.3.2 Installation using source code

You can create your own package file and install it. Source code is distributed as tar.gz file normarlly.

     % gzip -dc xxx.tar.gz | tar xf -
     % cd xxx-x.y.z
     % sh configure.sh
     % make
     % make package
     % ls */pkg-*/*.pkg
     # pkgadd -d xxx/pkg-xxx/xxx.pkg

configure.sh script can accept several options. Run sh configure.sh --help for details.

2.3.3 Verification of Driver Installation

At this stage, driver should work with default operationg paramter. Run /opt/KSWv4lcmn/sbin/report-v4l script again.

Example:

     Solaris release... 5.10
     Machine architecture... i86pc
     Hardware architecture... i86pc
     Searching device node for Bt8x8...
     Searching aliases for bt848x driver...
     Searching major device number for bt848x...
     Searching for installed instances of bt848x node...
     Searching naming rules of special files for bt848x...
     Searching for kernel module for bt848x...
     Searching device node for SAA713x...
       pci1131,0              1131 7130 1131 0000
     Searching aliases for saa713x driver...
     Searching major device number for saa713x...
       saa713x 82
     Searching for installed instances of saa713x node...
       "/pci@0,0/pci1131,0@14" 0 "saa713x"
     Searching naming rules of special files for saa713x...
     Searching for kernel module for saa713x...
       167 f9b53000  1caf0  82   1  saa713x (SAA713x video captor 1.0.0-pre1)
     Searching special files...
       42991620    0 crw-------   1 root     sys       82,   0 Sep  4 06:20 /devices/pci@0,0/pci1131,0@14:video
       2041365    1 lrwxrwxrwx   1 root     other          37 Aug 21 22:53 /dev/video0 -> ../devices/pci@0,0/pci1131,0@14:video

Result of “Searching aliases for bt848x driver...” and “Searching major device number for saa713x...” show that driver is registered correctly to the system.

“Searching for installed instances of saa713x node...” and “Searching for kernel module for saa713x...” show that current kernel loads saa713x driver. If you don't use driver for a while, kernel will unload driver temporarily. This is normal behavior.

The files shown in the result of “Searching special files...” are device files for application.

Then, try dmesg command. You will find probing message like this (details may vary):

     Sep  6 02:03:07 etta unix: saa713x: video capture driver for SAA713x 1.0.0-pre2 loaded
     Sep  6 02:03:07 etta unix: i2c: i2c-core version 2.7.0 loaded
     Sep  6 02:03:07 etta unix: saa713x0: system: 1131:7130, revision: 1, model: SAA7130
     Sep  6 02:03:07 etta unix: saa713x0: subsystem: 1131:4e85, board: SKNet Monster TV [card=5,autodetected]
     Sep  6 02:03:07 etta unix: saa713x0: board init: gpio is 407f
     Sep  6 02:03:07 etta unix: saa713x-video: init1: V4L1 buffer config: 884736 bytes x 4

If card is configured automatically from PCI IDs, you will get “autodetected” message. In this case, you probably need not further manual configuration. Skip next chapter.

If else, you will get warning to configure manually. Go to next chapter for configuration. After configuration, warning will disappear and you will get “driver.conf” message like this:

     Sep  6 02:03:07 etta unix: saa713x0: subsystem: 1131:0000, board: Kworld/KuroutoShikou SAA7130-TVPCI [card=10,driver.conf]