kdb166: DFlex Serial I/O Linux Redhat Kernel 1.2.13 Installation

Title: DFlex Serial I/O Linux Redhat Kernel 1.2.13 Installation
Keywords: DFlex under Linux Redhat Kernel Version 1.2.13
Date: March 25, 1997
KDB: KDB-166
Revision: 0.00
Author: Support
Distribution: External

This tech note describes how to install a DFlex under Linux Kernel Version 1.2.13 system. We have tested a system with one DFlex-8 sharing one interrupt.

This procedure involves no extra drivers and only requires that your Linux system has the following:

  1. One interrupt (IRQ) available for the DFlex card serial adapter.
  2. An X number of port addresses available. X referring to the number of DFlex ports, i.e. 8 addresses required for a DFlex-8.
  3. That your computer is ISA bus compatible.

To install a DFlex under Linux Redhat Kernel Version 1.2.13 follow the procedure below.

In our sample setup we will use DX/4 100 MHz 486 system with one standard COM port enabled at address 0x3f8, IRQ 4 and one DFlex-8 set for port address 0x280, all ports interrupting on IRQ 10, and the status port is disabled.

Procedure

1. An appropriate number of devices must exist in the /dev directory. Linux associates /dev/cua#, and /dev/ttyS# with each serial port. Typically there are four of these devices existing on a standard Linux system. In this case we need to create additional devices for our DFlex-8.

2. To create additional devices, do the following:

cd into the /dev directory

Do an ls -l on a cua# device and on a ttyS#, take note of the major, and minor number of the last cua# and ttyS# device (probably will be cua3 and ttyS3). Now use mknod to create additional devices for the total amount of serial ports available. In our case we will have 9 serial ports in total.

Therefore make the following mknod entries:

(Here, we assume that devices cua0-cua3 already exist with a major number 5 and the last minor number is 67).

  • mknod -m 666 /dev/cua4 c 5 68
  • mknod -m 666 /dev/cua5 c 5 69
  • mknod -m 666 /dev/cua6 c 5 70
  • mknod -m 666 /dev/cua7 c 5 71
  • mknod -m 666 /dev/cua8 c 5 72

(We assume that devices ttyS0-ttyS3 already exist with a major number 4 and the last minor number is 67).

  • mknod -m 666 /dev/ttyS4 c 4 68
  • mknod -m 666 /dev/ttyS5 c 4 69
  • mknod -m 666 /dev/ttyS6 c 4 70
  • mknod -m 666 /dev/ttyS7 c 4 71
  • mknod -m 666 /dev/ttyS8 c 4 72

3. Linux uses a serial device manager program called setserial. Setserial is a program which allows you to look at and change various attributes of a serial device, including its port address, its interrupt, UART type and other serial port options.

The /etc/rc.d/rc.local file will need to be edited to reflect the new serial hardware being installed. Be sure to create a backup copy of the rc.local file before editing it.

Append the following lines to the rc.local file. If there are already entries within the file, comment them out.

  • /bin/setserial /dev/cua0 port 0x3f8 irq 4 uart 16550a /*Standard COM 1*/
  • /bin/setserial /dev/cua1 port 0x280 irq 10 uart 16550a /*DFlex-8 port 1*/
  • /bin/setserial /dev/cua2 port 0x288 irq 10 uart 16550a /* DFlex-8 port 2*/
  • /bin/setserial /dev/cua3 port 0x290 irq 10 uart 16550a /* DFlex-8 port 3*/
  • /bin/setserial /dev/cua4 port 0x298 irq 10 uart 16550a /* DFlex-8 port 4*/
  • /bin/setserial /dev/cua5 port 0x2a0 irq 10 uart 16550a /* DFlex-8 port 5*/
  • /bin/setserial /dev/cua6 port 0x2a8 irq 10 uart 16550a /* DFlex-8 port 6*/
  • /bin/setserial /dev/cua7 port 0x2b0 irq 10 uart 16550a /* DFlex-8 port 7*/
  • /bin/setserial /dev/cua8 port 0x2b8 irq 10 uart 16550a /* DFlex-8 port 8*/

Save the new rc.local file, and reboot the system.

When you reboot, Linux should see your serial ports at the address you set them.

Now if the above method does not work, you may try this alternate method:

a. Perform steps 1 and 2 above.

b. Modify the /serial/serial.c file to reflect all of the serial ports (including the DFlex ports) in this system. Generally the following entries would need to be inserted at the beginning of the structure async_struct rs_table[] after the definition of standard COM 1 (ttyS0).

{0, BASE_BAUD, 0x3f8, 4, STD_COM_FLAGs}

In our example we would need to add the following entries after the above standard COM 1 definition:

{0, BASE_BAUD, 0x280, 10, STD_COM_FLAGs}
{0, BASE_BAUD, 0x288, 10, STD_COM_FLAGs}
{0, BASE_BAUD, 0x290, 10, STD_COM_FLAGs}
{0, BASE_BAUD, 0x298, 10, STD_COM_FLAGs}
{0, BASE_BAUD, 0x2a0, 10, STD_COM_FLAGs}
{0, BASE_BAUD, 0x2a8, 10, STD_COM_FLAGs}
{0, BASE_BAUD, 0x2b0, 10, STD_COM_FLAGs}
{0, BASE_BAUD, 0x2b8, 10, STD_COM_FLAGs}

c. After making these modifications, save the serial.c file, and cd to /linux. Recompile the kernel here by typing the following command:

make zlilo

d. After recompiling the kernel, reboot the system, and all of your serial ports should be available. Note: that with this method, entries in the rc.local file are not required.

End of KDB-166

Go to Top