Blue Heat/PCI Software Installation Guide for Linux 2.4

Introduction

The instructions below are designed to assist users with the device driver installation of Blue Heat/PCI serial adapters under a Linux platform. Although this document was written with Red Hat distributions (2.2.X and 2.4.X kernels) in mind, it will apply for other Linux distributions as well.

NOTE: To perform the installation, please be sure you are logged in as root.

To make the installation instructions are easy to follow, all commands given on the command line are written in bold text. Before beginning the software installation procedure, please be sure to carefully read the Blue Heat/PCI User’s Manual that came with the host adapter for hardware installation/configuration instructions.

Obtaining the Driver

There are several ways that you may obtain the necessary files for the installation:

The CD that comes with the Blue Heat/PCI serial adapter will have all the files necessary to complete the installation.

If you don’t have the CD, you can download an updated driver package which contains all of the necessary files from the Connect Tech websiteunder the Blue Heat/PCI product page.

Extracting the Driver

You will need to copy the necessary files from the Blue Heat/PCI CD to a directory on your system. It is suggested that you copy the files to the /usr directory. You should place the files in an empty directory (or a newly created directory). The directory that you chose to copy the files to will be referred to as {ctidrv}. To copy the files to the {ctidrv} directory, issue the following command:

# cd {direct}
# tar -xvzf BH-LN24-*.tar.gz
* denotes the current release of the serial driver and patches.

To unzip the serial driver, issue the following command:

# tar -xvzf serial-5.05.10.tar.gz

You will now have the serial driver in a subdirectory called serial-5.05.10. This directory will be referred to as {serial}.

Installing the Serial Driver

NOTE: We strongly recommend you back up your kernel source tree before installing the serial driver.

NOTE: This driver has been tested successfully up to 2.4.26 NOTE: 2.4.11 and 2.4.15 are known to be bad. These kernels are not supported.

The Linux kernel source tree is typcially located in /usr/src/linux, and this is where the installation script will look for your kernel source tree by default. If this is the location of your kernel source tree, you will not have to pass the installation script any arguments. However, if your kernel source tree is located in a directory other than /usr/src/linux, you must pass the location of your kernel source tree to the install script.

If your kernel source tree is located in /usr/src/linux (the default location), you would issue the command:
# ./{serial}/install-in-kernel If you have your kernel source located in /usr/local/redhat, you would issue the command:
# ./{serial}/install-in-kernel /usr/local/redhat

Configuring/Building the Kernel

NOTE: Red Hat 7.2 installs: There is a circular dependency in the “make config” step. Please execute “make oldconfig” between the “make mrproper” and “make menu/config” steps to work around this.

# cd {Linux}
# make mrproper

At this point, you have a choice of two configuration utilities that you can use to configure your kernel. One utility, named config, is text based, and the other, named menuconfig, has a simple GUI (Graphical User Interface). The menuconfig utility is easier to use than config, so unless you have specific reasons use the menuconfig utility.

To use the menuconfig / config utility:

# make menuconfig
Or
# make config

Once the configuration utility you choose is running, make sure that the following options are selected. Below shows the setting that must be enabled using the menuconfig and config utilities.

config: CONFIG_PCI
menuconfig: (General Setup -> PCI Support)

config: CONFIG_SERIAL
menuconfig: (Character Devices -> Standard/generic (dumb) serial support)

config: CONFIG_SERIAL_EXTENDED
menuconfig: (Character Devices -> Extended dumb serial driver options)

config: CONFIG_SERIAL_MANY_PORTS
menuconfig: (Character Devices -> Support more than 4 serial ports)

config: CONFIG_SERIAL_SHARE_IRQ
menuconfig: (Character Devices -> Support for sharing serial interrupts)

config: CONFIG_SERIAL_MULTIPORT
menuconfig: (Character Devices -> Support special multiport boards)

After all of the options have been checked and enabled, select exit. You will be prompted to save the new kernel configuration. Select yes. After you have finished configuring your kernel, issue the two following commands:

# make dep
# make clean
# make bzImage
# make modules
# make modules_install

Installing the Kernel

The “make bzImage” step created the kernel in the subdirectory {Linux}/arch//boot. If you don’t know what CPU type you’re using, you can find the new kernel by:

# ls -l {Linux}/arch/*/boot/bzImage

/arch//boot will be referenced by {arch}.

# cp {Linux}/arch//boot /boot/vmlinuz-bh
# cp {Linux}/System.map /boot/System.map-bh

You may choose any postfix, -bh is a handy one. The postfix merely distinguishes between the kernel you’ve just built and other kernels already installed. It has no other purpose.

Updating your Boot Loader

NOTE: You will only need to update one of the boot loaders. Please follow the instructions appropriate for the boot loader used on your system.

Updating lilo

# vi /etc/lilo.conf

Image sections start with an image= keyword and end at the end of the file or the next image= keyword. Copy one section. Update the image= and label= keywords:

image=/boot/vmlinuz-bh
label=Linux-bh

Exit the editor.

NOTE: Running lilo here is critical. Lilo builds some information about the kernels listed in its configuration file. If you copy a new kernel over an old one and omit running lilo, the information will be wrong, and the new kernel may not work. The errors produced by this will usually appear to be unrelated to a misconfigured lilo, making this very difficult to debug.

# lilo

Reboot your machine to load the newly installed kernel. Remember to choose linux-bh at the boot prompt.

Updating grub

# vi /boot/grub/grub.conf

Image sections start with a title keyword and end at the end of the file or the next title keyword. Copy one section. Update the title, kernel keywords and root= variables:

title Linux-bh
kernel /vmlinuz-bh ro root=/dev/hda1

Note that pathnames in grub have a root of /boot by default, so the kernel keyword above actually refers to (/dev/hda1)/boot/vmlinuz-bh.

Exit the editor.

Reboot your machine to load the newly installed kernel. Remember to choose linux-bh at the boot prompt.

Creating Nodes (ports) for the Host Adapter

Now that we have the new kernel in place capable of supporting the Blue Heat/PCI serial adapter we must create nodes, or ports, to allow the host adapter to communicate with other devices.

NOTE: This procedure sometimes does not have to be done with 2.4.X kernels and above. If you are using a 2.4.X kernel, check to see if the nodes have been created automatically.

To begin, boot the new kernel. After the kernel boots, open up the messages file using the vi editor, or your favorite text editor:

# vi {log_path}/messages
Where {log_path} is where the system logs are stored. Typically, {log_path} = /var/log but this may be different in some distributions/systems.

Go to the bottom of the file and search backwards for references to “ttySxx” where xx is a number. You should see ttyS0 and ttyS1 for the standard serial ports, as well as a ttySxx entry for each installed Blue Heat port. In order to use the new ports, these ttySxx entries must exist in the /dev directory. If they do not exist (they aren’t created automatically, but do persist after reboots) you must make them with the following command:

# mknod -m [mode] /dev/ttySxx c 4 yy
[mode] is the file mode (permissions) you wish the device to have. 600 is often good.
xx is the number associated with the device which you have seen in the messages file.
yy is just xx + 64

You may also wish to make the corresponding cuaxx devices, but they are being phased out:

# mknod -m {mode} /dev/cuaxx c 5 yy
xx and yy should match the xx and yy from the previous mknod command

Here is an example of what you would do to add the nodes to your /dev directory:
First I opened the Vi editor and searched for ttyS*. The results of the search show I have ttyS00 and ttyS01 (the standard serial ports) entries, as well as four other entries: ttyS05, ttyS06, ttyS07 and ttyS08. These four entries correspond to the four new ports for my CTI host adapter. (Right now, we are assuming a four-port card. You may have fewer or more ports, depending on the type of card you have). Now I would like to make the nodes. From the command line, I typed in the four following entries:

# mknod -m 600 /dev/ttyS05 c 4 69
# mknod -m 600 /dev/ttyS06 c 4 70
# mknod -m 600 /dev/ttyS06 c 4 71
# mknod -m 600 /dev/ttyS07 c 4 72

and optionally execute:

# mknod -m 600 /dev/cua12 c 5 69
# mknod -m 600 /dev/cua13 c 5 70
# mknod -m 600 /dev/cua14 c 5 71
# mknod -m 600 /dev/cua15 c 5 72

With the nodes in place, this finishes off our installation

RS-485 Line Mode Support

The utility set485 can be used to set the line mode interactively or from a startup script. Settings stick until changed or the system is rebooted.

The Linux header file ioctls.h now contains definitions for TIOCSER485GET and TIOCSER485SET. These ioctls can be used on Connect Tech 485 capable boards to set the line mode. The mode (passed as an integer) can be one of TIOCSER485FULLDUPLEX, TIOCSER485HALFDUPLEX or TIOCSER485SLAVEMULTIPLEX for full or half duplex or slave multidrop mode, respectively.

Go to Top