configdevs(1) —
NAME
configdevs − configure the X11 server for installable input devices
SYNOPSIS
configdevs [−help] [−outfile output_file ] [−linkfile link_file ]
[−dir server_directory ] [−infile input_file ]
DESCRIPTION
The configdevs utility is used by the sysadm addserver command to configure installable devices. It processes its input files and produces several files used to build the server.
The options to configdevs are:
−help
Print out a summary of command line options.
−outfile output_file
Specify an alternate C code output file in place of ./tables.c.
−linkfile link_file
Specify an alternate link output file in place of ./linkfile.
−dir server_directory
Specify an alternate server directory in place of /usr/lib/X11/Xservers. This directory contains subdirectories for each installable driver module, each of which contains a devconfig file and a libdirname.a or driver.o object module.
−infile input_file
Specify a devconfig-like file to use for input instead of scanning the server directory for devconfig files.
The configdevs utility scans the server directory (normally /usr/lib/X11/Xservers) looking for directories containing files named devconfig, processing each file, and then producing several output files used to generate a new X server. Each devconfig file contains lines of the format:
| dirname | installed | resource | type | initfunc |
For example, the file /usr/lib/X11/Xservers/mscmouse/devconfig contains the following:
mscmouseYmouseMSC−SatMouseMSCInit
mscmouseYmouseMSC−BatMouseMSCInit
mscmouseYmouseMSCatMouseMSCInit
mscmouseYmouseLOGI−BatMouseMSCInit
mscmouseYmouseMS−BatMouseMSCInit
The dirname field should match the name of the module’s directory name. The installed field should contain the letter Y if the module is to be configured into the server and N if the module is to be left out. The module must be configured into the server for a user to use the device. As distributed, all of the standard modules are configured into the server.
The resource field specifies the general class of resource this module supports. Acceptable resources are keyboard, mouse, and tablet. At the present time, the resource display is accepted, but it is not actually used.
The type field specifies the name of the device type supported by the driver, and corresponds to the type field of the /usr/lib/X11/Xconfig file.
The initfunc field specifies the name of the module’s initialization function, called at server start-up time when the device is specified in the Xconfig(5) file. This function should be the only globally-accessible data in the module’s object file.
The devconfig file may contain multiple lines specifying several type names supported by the driver. In the example, the mscmouse driver supports the types MSC−S, MSC−B, MSC, LOGI−B, and MS-B, each using the entry point atMouseMSCInit. Each line does not have to use the same initialization function, which permits the use of shared routines and/or data between devices while preserving different entry points. Additionally, blank lines and lines beginning with a sharp sign (#) are treated as comments and ignored.
The configdevs utility takes this information and outputs information for each configured module to two files, the output_fileand the link_file. The output_file is C-language source code that contains tables used by the server for looking up each resource and type pair specified in the Xconfig file, allowing it to call the appropriate initialization function for that device. The link_file lists the driver object files that need to be linked into the X server. The configdevs utility expects the object files to be named either libmodule.a, for an object archive file (see ar(1)), or driver.o, for a single object file. It will search for the archive file first, then the object file, producing an error message if neither one is found.
The sysadm addserver command normally uses these files when linking the server using the commands shown in the following example:
cc −c tables.c
/bin/idld −s −o Xservername /usr/lib/X11/Xservers/common/Xserver1.o \
tables.o ‘cat linkfile‘ \
/usr/lib/X11/Xservers/servername/libservername.a \
/usr/lib/X11/Xservers/common/Xserver2.o
FILES
/usr/lib/X11/Xservers server directory
/usr/lib/X11/Xservers/*/devconfig
devconfig files for each device
/usr/lib/X11/Xservers/*/lib*.a
archive module supporting the device
/usr/lib/X11/Xservers/*/driver.o
object module supporting the device
SEE ALSO
\*U — Version 1.0