LINUX/UNIX

Install Decision PCCOM PCI 4/8-Port Cards to LINUX (KERNEL 2.2.0 - KERNEL 2.2.13)

1.
Login as a root user.
2.
Manually Configure the Decision PCCOM PCI 2/4/8 card driver into the LINUX Kernel.
2.0
Overview

In the LINUX system, the source programs can be normally be found under /usr/src/linux.
The program file /usr/src/linux/drivers/char/serial.c is modified to be able to drive Decision PCCOM PCI 2/4/8-Port.
Totally, there are four files needed to be modified as follows.

- Config.in, serial.c in /usr/src/linux/drivers/char
- serial.h in /usr/src/linux/include/asm
- pci.h in /usr/src/linux/include/linux
- oldproc.c in /usr/src/linux/drivers/pci

2.1

Replace /usr/src/linux/drivers/char/serial.c

# cd /usr/src/linux/drivers/char; mv serial.c serial.c.old
# mcopy a:serial.c /usr/src/linux/drivers/char

2.2

Replace /usr/src/linux/include/asm/serial.h

# cd /usr/src/linux/include/asm; mv serial.h serial.h.old
# mcopy a:serial.h /usr/src/linux/include/asm

2.3

 Modify "Config.in"

1.
The file, "Config.in", contains the definitions of the configurationoptions and default assignments about the character devices and isinterrogated to see which components are to be included in the kernel.
2.

Locate the following paragrah in "Config.in"
bool ' Support the Bell Technologies HUB6 card' CONFIG_HUB6

3.

Insert the following entry

bool ' Support the Decision PCCOM PCI card' CONFIG_DCIPCCOM_PCI

after the paragraph you have located as follows
bool ' Support the Bell Technologies HUB6 card' CONFIG_HUB6
-----> bool ' Support the Decision PCCOM PCI card' CONFIG_DCIPCCOM_PCI


2.4
Modify "pci.h"
1.
If new pci devices are added, generally, "pci.h" should be changed for the standard PCI identification procedure.
2.
Therefore, the information about the new devices should be added including Vendor ID and Device ID.
3.

Add the following lines into the file "pci.h" for Decision PCCOM PCI 2/4/8-Port cards.

#define PCI_VENDOR_ID_DECISION 0x6666
#define PCI_DEVICE_ID_DECISION_PCCOM4 0x0001
#define PCI_DEVICE_ID_DECISION_PCCOM8 0x0002
#define PCI_DEVICE_ID_DECISION_PCCOM2 0x0004

4.
In the file "oldproc.c", there is a table "dev_info[]" containing all PCI devices which can be identified by the Linux kernel. The table is sorted in ascending order by vendor and device and is looked up by binary search. If you add a device make sure it is sequential by both vendor and device id.
5.
Add the following lines into the able "dev_info[]" in the file "oldproc.c". Generally, the following lines are added beforeIntel devices(because the Intel vendor ID is 0x8086).

#ifdef CONFIG_DCIPCCOM_PCI
DEVICE( DECISION, DECISION_PCCOM4,"Decision PCCOM PCI 4-Port"),
DEVICE( DECISION, DECISION_PCCOM8,"Decision PCCOM PCI 8-Port"),
DEVICE( DECISION, DECISION_PCCOM2,"Decision PCCOM PCI 2-Port"),
#endif /* CONFIG_DCIPCCOM_PCI */

6.
Please find the string "PCI_VENDOR_ID_DCI" in the file "oldproc.c" and replace the string with "PCI_VENDOR_ID_DECISION".


3.
Build the LINUX kernel with the Decision PCCOM PCI 2/4/8-Port Driver.
3.1
 # cd /usr/src/linux
3.2
 # make config
When the following prompt messages displayed,
Standard/generic serial support? (CONFIG_SERIAL) [N/y/?] Y
Extended dumb serial driver options (CONFIG_SERIAL_EXTENDED) [Y/n/?] Y
Support more than 4 serial ports (CONFIG_SERIAL_MANY_PORTS) [Y/n/?]Y
Support for sharing serial interrupts (CONFIG_SERIAL_SHARE_IRQ) [Y/n/?]Y
Support the Decision PCCOM PCI card (CONFIG_DCIPCCOM_PCI) [N/y/?]Y

3.3
 # make depend
3.4
 # make clean
3.5
 # make zlilo (if error occur make bzlilo)
3.6
 # make modules
3.7
 # make modules_install
3.8
 if necessary modify the lilo.conf (your only going to modify this if the lilo doesnt point to the latest kernel you have build)

4.

Configure and enable serial ports

4.1
The patched serial driver enabled for Decision PCCOM PCI 2/4/8-port cards is able to support two cards at most.
4.2
The corresponding device nodes are:
ttyS44 - ttyS47, cua44 - cua47 for the first 4-Port card,
ttyS52 - ttyS55, cua52 - cua55 for the second 4-Port card,
ttyS44 - ttyS51, cua44 - cua51 for the first 8-Port card,
ttyS52 - ttyS59, cua52 - cua59 for the second 8-Port card.
ttyS44 - ttyS45, cua44 - cua45 for the first 2-Port card,
ttyS52 - ttyS53, cua52 - cua53 for the second 2-Port card.

4.3
Enable serial ports
4.3.1. cd /etc/rc.d
4.3.2. edit rc.serial
For the first 4-Port card
# {SETSERIAL} /dev/cua4 ${AUTO_IRQ} autoconfig
# {SETSERIAL} /dev/cua5 ${AUTO_IRQ} autoconfig
# {SETSERIAL} /dev/cua6 ${AUTO_IRQ} autoconfig
# {SETSERIAL} /dev/cua7 ${AUTO_IRQ} autoconfig
+--- ucomment it by deleting "#"

4.4

Make these device nodes of (ttyS44 - ttyS59, and cua44 - cua59)
if they are not existent

# cd /dev
# MAKEDEV ttyS44 ttyS45 ttyS46 ttyS47 ttyS48 ttyS49 ttyS50 ttyS51
# MAKEDEV ttyS52 ttyS53 ttyS54 ttyS55 ttyS56 ttyS57 ttyS58 ttyS59


5.

Reboot your LINUX system to startup the new kernel and environment

to extract
tar -xvzf linuxpci.tar.gz



HOME