BRIEF GUIDE FOR INSTALLING IKON HARDCOPY BOARD AND DRIVER IN HP-UX EISA MACHINE IKON Corporation 2617 Western Avenue Seattle, Washington 98121 phone: (206) 728-6465 fax (206) 728-1633 26 August, 1994 REPLACES INSTALL NOTES & DRIVER ON DISKETTE DATED 20 OCTOBER, 1992 This guide includes instructions for installing an IKON Model 10092, 10097, or 10111 ISA/EISA hardcopy board and driver on an HP 700 series machine. Please note that only the 10111 is "officially" supported by this driver. As of August, 1992, all three boards operate correctly under the driver. In the future, the driver may be modified in ways that exclude support of the 10092, and 10097. The following is derived from information contained in the HP-UX Driver Development Guide, published by Hewlett Packard. 1) Configure and install the board in the appropriate EISA slot. All board configuration is done via switches. See the appropriate board manual. Select a board address suitable for your configuratioin. If there are no conflicts with other vendor's board addresses, 0x310 is recommended. It will be used in the following as an example. Refer to the individual board manual for switch configuration information. The driver is currently available in three versions - ik310, ik320, and ik330, which each support a different board address and a different slot. The addresses and slots are 0x310 & slot 1, 0x320 & slot 2, and 0x330 & slot 3, respectively. This allows up to three boards to be installed. It also allows selecting a particular address and driver combination to avoid another vendor's fixed board address. The assignment of a specific slot to an address and driver is done to avoid problems when multiple ISA cards (10111s or other ISA boards) are installed in the same machine. HP-UX calls each ISA board's driver for each board installed. If there are three ISA boards installed, each attach will be called three times. Since each driver probes all slots with a ISA read to determine if a board is installed, each driver will try to attach its board every time it is called. To avoid this problem, each 10111 driver will only respond to an attach call if it is called for the slot in which it expects the board to be installed. This is a terribly crude approach, but does avoid the problem. It requires that that each board address, driver, and slot be used as a set. If it is necessary to use other address and slot combinations, the driver can be edited and re-compiled. This will obviously not be necessary for the single slot machines in which most of these boards will be installed. Select a suitable DMA channel and interrupt level, and - in the case of a 10111 - decide whether the DMA channel will be used in byte or word mode. Since the 10111 can handle odd byte counts when used with a 16 bit channel, selecting 16 bit operation will give maximum efficiency. The 10092, and 10097 will select byte or word operation depending on the DMA channel chosen. Channels 0, 1, 2, and 3 are byte channels, 5, 6, and 7 are word channels. The board(s) and driver(s) will support any DMA channel and interrupt level available on the bus. Make sure that the channel and level selected do no conflict with other devices on the EISA bus. Later versions of the configuration file will provide for help in avoiding conflicts. Configure the other options on the board appropriately for your device and application. Below is a sample switch set-up for a 10111 board. It is configured for DMA channel 7 in 16 bit mode with no byte swapping, an interrupt level 9, and an address of 0x310. Tri-state DMA and interrupt control is disabled. The device-related portion of the switch set-up is: Special handshake off, BUSY used in handshake, 8 bit data streaming (although data streaming probably won't be enabled by the driver), and the fastest device handshake timing. The above device-related portion of the setup presumes that the board's interface select jumper cable is connected to the internal CENTRONICS connector. This set-up can also be used in a Versatec configuration. In that case, the handshake mode switches would have no effect on the operation of the board. Note that the address select switch bits at U5 are complemented; OFF or OPEN decodes a 1 in that address bit position. W S S B D T T I I I I D D D Z S S S S S S S R W P S S S S S S S S S S S E A A A A A A A D P C Y T 0 1 0 1 2 3 0 1 2 N 3 4 5 6 7 8 9 ----------------- ----------------- ----------------- ON |*| | | |*| |*|*| |*| | |*|*|*|*| | | |*| |*|*|*| | | CLOSED ----------------- ----------------- ----------------- OFF | |*| |*| |*| | | | |*|*| | | | |*| |x| |*| | | |*|*| OPEN ----------------- ----------------- ----------------- U2 U4 U5 2) Create a directory that will contain the IKON provided files and the results of any compile, configure, or make operations, and copy the IKON files to this directory (the "IKON" directory). 3) Copy the configuration file for the board to the directory /etc/eisa. The config file for these boards is !IKN1110.CFG. If it was loaded into the "IKON" directory over a network from a non-HP machine, it may not have the leading "!" in the filename. In this case, change the filename to include the leading "!". Currently, it is a skeleton, and does not provide any installation choices or help. It is there only to keep the config routine happy. 4) Use the eisa_config command to configure the board into the system. (consult the eisa_config man pages.) The add command within eisa_config will be used: add !IKN1110.CFG 1 The 1 above refers to slot number. Replace with the appropriate number if the board is not in slot 1. Remember that drivers, addresses, and slots must be used in sets. Slot 1 for ik310, 2 for ik320, and slot 3 for ik330. Slot 1 is the first available slot. Slot 0 refers to the system board. Exit from eisa_config with the quit command. (This will also save the configuration.) 5) If any changes are to be made to the driver source code, make them now. Three compile scripts are provided, one for each driver code module. The source modules are: ikreg.h provides "internal" definitions used by all versions of the driver ikio.h provides "external" ioctl command definitions used by all versions of the driver, and by the calling application. must be #include(d) in the calling routine. ik310.c, ik320.c, ik330.c Three separate source code modules for the three currently supported board addresses. The compile scripts are compile310, compile320, and compile330. The command "csh compile310" will compile the source and generate the ik310.o object file. NOTE: It appears that the HZ parameter - the number of real time clock "ticks" per second - varies between HP models. This may cause the timeout settings to be scaled by the difference between the HZ in effect when the object was compiled and the one used in the target system. Re-compiling the driver on the target system will correct this problem. Alternatively, the ioctl call to set the timeout value may be used with a suitably scaled argument to give the desired timeout. It will be necessary to experiment (perhaps using iktest.c) to determine what the scaling factor is. NOTE: The driver objects (ikxxx.o) were compiled under HP-UX 8.07 . It will be necessary to re compile them before they are linked with a later version of HP-UX. If an object is not re compiled before the kernel is built, the kernel will seem to build correctly, but when plotting is attemted, the kernel will panic. Since the machine on which the objects were originally made, and the machine on which they will be used will likely be different, it is probably a good idea to re-compile the driver(s) for any installation. 6) Copy the file /etc/master to the "IKON" directory. Copy the appropriate dfile from /etc/conf to the to dfile.mine in the "IKON" directory. The dfile is the description file for your particular system. (See config(1M) to get full information about this dfile.) Some choices include: dfile.min minimum system configuration dfile.full full system config without LAN dfile.full.lan full system config with LAN dfile.sam if you used sam(1m) to make a custom kernel You may use an update tool to get your current dfile as follows: /system/TOOL/get_kdfile /hp-ux > dfile.mine 7) Edit dfile.mine to add the driver name to the first section, which may be listed under the line "*drivers". The driver name should be ik310, ik320, or ik330, whichever is being used. 8) Edit master (in the "IKON" directory) to add a line for each version of the driver to be used. The line will include six fields. An entry for ik310 would look like: ik310 ik310 1 1D8 -1 38 The 38 in the above is the device major number. HP reserves numbers 38, 39, 40, 42, and 43 for third party character device drivers. The major number must be unique for each version of the driver installed on a given machine, and must be different from all other major numbers in master. NOTE: Earlier editions of this document incorrectly specified the third field of the above master file entry as 21 rather than 1. This caused no problems on HP-UX 8.x, but will cause the kernel make to fail on HP-UX 9.0 (and later). 9) Execute the following command to generate the files used to create a new kernel: /etc/config -m master dfile.mine The above is done while in the "IKON" directory. 10) Step 9 should have created the file config.mk in the "IKON" directory. Edit this file to include the driver object(s). Find the line in config.mk that looks like something like: OFILES= Change to look like: OFILES=ik310.o 11) Execute the command: make -f config.mk This will take a few moments to link the driver with HP-UX and will create a file named hp-ux in the "IKON" directory. 12) Save the existing kernel and copy the new one to the root directory: cp /hp-ux /SYSBCKUP cp ./hp-ux /hp-ux 13) Re-boot the os: exec reboot During booting, the ik310 attach code should display a message indicating that the board is attached, and listing the baord's address, DMA channel, interrupt level, interface selection, and DMA mode. 14) Once the system is operating, make the device node: mknod /dev/ihcp0 c 38 0x410000 The ihcp0 is the device name that will be used by calling applications. It may be anything that does not conflict with other device names. ihcp0 will preserve compatibility with applications transported from Sbus machines. The number 38 is the major device number, and must match the number used in master. The 0x410000 is the minor device number. The 1 in this number is the slot number of the board, and must be changed if another slot is used. Make a device node for each board - and driver - that is to be used. At this point, the device should be available for use by application programs. Included on the distribution media is a file called iktest.c. This sample program demonstrates the calling sequences required to issue ioctls to issue board commands and/or set driver parameters, to write to the device attached to the board, and to read back the board's registers.