PDDREF:Installation of External Loadable Device Drivers
System installation provides the ability to install Device Support Diskettes. The user who has hardware not currently supported by OS/2 2.1 (or later) can install a specific hardware device driver from a Device Support Diskette during the system installation.
Note: The user can install device drivers after OS/2 installation using one of the following methods:
- Entering DDINSTALL command at an OS/2 command prompt
- Double-clicking the Device Driver Install object (located in the System Setup folder)
The user can install external loadable device drivers through the system utility program DDINSTAL.EXE. A Device Driver Profile (a file with a DDP file name extension) must be provided (by the device driver programmer) to control the installation of the device driver using DDINSTAL.EXE. The format of this file is described under Device Driver Profile. A diskette containing device drivers with their corresponding Device Driver Profiles is called a Device Support diskette. DDINSTAL.EXE installs all Device Driver Profiles that are on a Device Support diskette. When the installation is finished, DDINSTAL.EXE prompts the user to restart the system, causing the updated CONFIG.SYS file to take effect.
- Note
- DDINSTAL.EXE is not intended for the installation of presentation drivers.
Device Driver Profile
The Device Driver Profile (DDP) is composed of four sections, the :TITLE section, the :CONFIG section, the :FILES section, and the :OS2INI section. Each section is optional and can appear any number of times, but the profile must contain at least one section. Blank lines are ignored and an asterisk (*) begins a comment, which is terminated by the end of the line.
:TITLE This section contains a description of the DDP file. The first noncomment line in this section is displayed on the multiselection panel as the title of the DDP file. The title should not exceed 64 characters in length. DDINSTAL is modified to read the :TITLE section for up to 24 DDP files on the diskette, and presents a multiple selection list (List Box) to the user. DDINSTAL then installs only the DDP files selected by the user.
:CONFIG The section describes the CONFIG.SYS statements required for loading the device driver when the system is initialized. Each line in this section is added to the end of CONFIG.SYS. These lines must be valid CONFIG.SYS statements. Because the complete line is appended to the CONFIG.SYS file, lines in this section should not be commented.
Before adding a line to CONFIG.SYS, DDINSTAL checks to see if the line already exists. This is done by performing a case-insensitive string comparison with the lines in CONFIG.SYS. If no match is found, the line is added. If a match is found, the line is ignored with no indication to the user.
:FILES This section describes the files to be copied to the hard disk by DDINSTAL.EXE. Each line in this section contains the source name and destination name (separated by spaces) of a file to be copied. The default drive and path for the source name is A:\, and the default drive and path for the destination name is the boot drive. The date, time, and attributes of the file are preserved during the copy. If the destination path does not exist, it is created before the file is copied.
There are two methods of specifying the destination name. The first one is:
\devdrvr\devdrvr.sys
In this method, the path specified is appended to the drive letter entered on the command line. The second method is:
devdrvr\devdrvr.sys
In this method, the path specified is appended to the path entered on the command line.
Before copying a file to the destination, DDINSTAL checks to see if the file already exists. If it exists, its date/time stamp is compared to the date/time stamp of the source file. If the source file is more recent, it is copied to the destination. If the source file is older, it is not copied and no indication is given to the user. This ensures that the most recent files are installed on the destination.
:OS2INI This section contains the OS2.INI statements. The format of OS2INI is:
VIO_xxx DEVICE=xxx.DLL [PtrDevP=ptr$] [PtrDevR=Ptr$]
This statement is subject to change, according to the Base Video Subsystem (BVS) specifications. The first parameter is VIO_xxx, where xxx is a descriptive name for the device. The second parameter must have a list of DLL and device names, separated by commas. The PtrDevP and PtrDevR tags are optional and contain the pointer device driver names for real and protect modes. For example:
VIO_XGA DEVICE=XGA.DLL,MBUFFUP.DLL,XGA$ PtrDevP=XGAPTR$ VIO_IBMCGA DEVICE=WINCGA.DLL,BVSCGA.DLL PtrDevP=Pointer$
The following sample illustrates the format of a physical device driver profile:
************************ A Sample Physical Device Driver Profile ********************** * This is a physical device driver profile for a fictitious piece of hardware. * * It is used by DDINSTAL to install loadable OS/2 device drivers and display drivers.* * It is not intended to install Presentation Manager device drivers. This software * * consists of a physical device driver, an I/O subsystem, and test programs. * ****** The Physical Device Driver ****** :TITLE * This section contains the title text. A .DDP File Example :CONFIG * This section contains CONFIG.SYS statements for the DEVICE=\devdrvr\devdrvr.sys * physical device driver. :FILES * This section contains the files for the device driver devdrvr.sys\devdrvr\devdrvr.sys * If the directory doesn't exist, it is created. ****** The I/O Subsystem ****** :CONFIG * This section contains CONFIG.SYS statements for the IOPL=devdrvr * I/O subsystem. The IOPL statement specifies the * module name in the DLL. :FILES * This section contains files for the I/O subsystem. devdrvr.dll\os2\dll\devdrvr.dll * Copy to the DLL directory. ****** The Test Programs ****** :FILES * This section contains files for the test programs. devdrvr1.exe \devdrvr\devdrvr1.exe * Test program 1. devdrvr2.exe \devdrvr\devdrvr2.exe * Test program 2. :OS2INI video_displays vio_d10a display=devdrvr1.dll
DDINSTAL displays a list of the drivers found on the Device Support Diskette. This list is a multiple selection panel that lists the titles found in the :TITLE section of each Device Driver Profile (DDP). If no :TITLE section is found, the title defaults to "[No Title] -- filename.DDP". Each of the items selected is then installed.
Up to 24 DDP files are supported per diskette. Extra DDP files (over 24) are ignored. If there are 12 or fewer DDP files on the diskette, a nonscrolling multiselection panel is used. Otherwise, a scrolling selection panel with a maximum of twenty-four selections is used. The user is then asked if there is another Device Support Diskette to be installed. If yes, this process is repeated for the next diskette.
If any files fail to copy because they replace open DLLs or programs, then those files are copied into a temporary subdirectory. A DPP file is created with the names of the failing files and the :CONFIG and :OS2INI statements. The user is then prompted to insert the Installation diskette and restart the system. After the diskette restarts, the DDINSTAL.EXE is called again to continue the device driver installation. The remaining files in the temporary subdirectory are copied, the :CONFIG statements are added to CONFIG.SYS, and the :OS2INI statements are added to OS2\OS2.INI. The temporary subdirectory is cleaned up, and the user is told that the device driver installation is complete and to restart from the hard disk.
If no files fail to copy from the device driver diskette, then the :CONFIG statements are added to CONFIG.SYS and the OS2INI statements are added to OS2\OS2.INI. The user is then told that the device driver installation is complete and to restart from the hard disk.
The OS/2 operating system provides the functions necessary to install loadable device drivers to the OS/2 partition and to update the system configuration files.