⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dd configure files.htm

📁 What is this ``device driver stuff anyway? Here s a very short introduction to the concept.
💻 HTM
📖 第 1 页 / 共 3 页
字号:
<html><head><title>Device Driver Configuration Files and File Fragments</title>

<meta name="ROBOTS" content="NOFOLLOW">
<meta name="DESCRIPTION" content="Writing Device Drivers Tutorial: DIGITAL UNIX Version 4.0B documentation set">
<meta name="AUTHOR" content="Copyright (c) Digital Equipment Corporation 1996. All Rights Reserved."></head>
<body>
<a name="ConfigModuleStaticDrv"></a>
<p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="DD%20configure%20files_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="DD%20configure%20files_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut17.html"><img src="DD%20configure%20files_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<img src="DD%20configure%20files_files/BLANK.GIF" border="0">
<a href="#TheNAMEFile"><img src="DD%20configure%20files_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html"><img src="DD%20configure%20files_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="DD%20configure%20files_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="DD%20configure%20files_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h1>13&nbsp;&nbsp;&nbsp;&nbsp;Device Driver Configuration Files and File Fragments</h1>
<p>
Device driver configuration consists of the tasks necessary to
incorporate device drivers into the kernel to make them available to
system management and other utilities.
There are two methods for configuring drivers into the kernel: static
and dynamic.
Digital recommends that you implement your driver products so that
customers can statically or dynamically configure them into the kernel.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut10.html#ImplConfigureRtn">Chapter 6</a>
shows how to implement the
<tt>/dev/none</tt>
driver's
<tt>configure</tt>
interface and associated attributes table to cooperate with the
<tt>cfgmgr</tt>
framework so that a system manager can statically or dynamically configure
it into the kernel.
<a name="nx_id_559"></a>
One of the tasks you must perform before configuring a device driver
into the kernel is to create and include appropriate information in the
driver configuration-related file fragments.
</p><p>
This chapter describes how some of the system management utilities use
the files and file fragments you were introduced to in
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut17.html#DevDriverKitDelivery">Chapter 12</a>
and that are needed for or related to device driver configuration.
</p><p>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html#ConfigModuleDynamicDrv">Chapter 14</a>
describes the syntax associated with each of the file fragments as part
of the steps to statically or dynamically configure device drivers
(single binary modules) into the kernel.
If you are not interested in learning about how the system management
utilities deal with the driver-related file fragments, then skip to
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html#ConfigModuleDynamicDrv">Chapter 14</a>.
</p><p>
Specifically, the chapter discusses the following files and file
fragments:
</p><ul>
<p></p><li>
Target and
<tt>GENERIC</tt>
configuration files
<p></p></li><li>
<tt>/usr/sys/conf/.product.list</tt>
and
<tt><var>NAME</var>.list </tt>files
<p></p></li><li>
<tt>files</tt>
file fragment
<p></p></li><li>
<tt>sysconfigtab</tt>
file fragment
<p></p></li><li>
<tt>BINARY.list</tt>
file
<p></p></li><li>
<tt><var>name</var>.kit </tt>file
</li></ul><p>
<a name="TheNAMEFile"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="DD%20configure%20files_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="DD%20configure%20files_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#ConfigModuleStaticDrv"><img src="DD%20configure%20files_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<img src="DD%20configure%20files_files/BLANK.GIF" border="0">
<a href="#TheNAMElistFile"><img src="DD%20configure%20files_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html"><img src="DD%20configure%20files_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="DD%20configure%20files_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="DD%20configure%20files_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h2>
13.1&nbsp;&nbsp;&nbsp;&nbsp;Target and GENERIC Configuration Files
</h2>
<p>
<a name="nx_id_560"></a>
<a name="nx_id_561"></a>
The
<tt>/usr/sys/conf/<var>NAME </var></tt>file (referred to as the target configuration file) is an ASCII text
file that defines the
components of the system.
The target configuration file name,
<tt><var>NAME</var></tt>,
is usually the name of the system.
By convention, the target configuration file name is capitalized.
There can be more than one target configuration file defined in
<tt>/usr/sys/conf</tt>,
each with a capitalized name.
As discussed in
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut17.html#DevDriverKitDelivery">Chapter 12</a>
and shown in
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut17.html#figDirStructEasyDrv">Figure 12-3</a>,
EasyDriver Incorporated has one target configuration file called
<tt>CONRAD</tt>.
Customers, too, can have one or more target configuration files to
represent different system configurations.
</p><p>
The Digital-supplied
<tt>GENERIC</tt>
configuration file is the configuration file for the
all-encompassing generic kernel that is originally installed on the
system.
It contains all the possible software and hardware options that Digital
supports.
The
<tt>GENERIC</tt>
configuration file is used
to build a kernel that represents all possible combinations of
statically configured drivers that Digital supports.
This kernel is booted during the operating system installation and is
often referred to as the generic kernel.
While running the generic kernel, the installation software determines
which subset of all possible device drivers should be used to build a
target kernel to match the hardware attached to the system being
installed.
The
<tt>GENERIC</tt>
kernel is also required for (tailored) kernels that customers generate.
<a name="TheNAMElistFile"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="DD%20configure%20files_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="DD%20configure%20files_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#ConfigModuleStaticDrv"><img src="DD%20configure%20files_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#TheNAMEFile"><img src="DD%20configure%20files_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#SpecifyInfonameListFile"><img src="DD%20configure%20files_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html"><img src="DD%20configure%20files_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="DD%20configure%20files_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="DD%20configure%20files_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h2>
13.2&nbsp;&nbsp;&nbsp;&nbsp;The .product.list and NAME.list Files
</h2>
<p>
<a name="nx_id_562"></a>
<a name="nx_id_563"></a>
The
<tt>/usr/sys/conf/.product.list</tt>
file stores information about device driver
products that are installed on Digital UNIX systems.
<a name="nx_id_564"></a>
The
<tt><var>NAME</var>.list </tt>file is a copy of the
<tt>.product.list</tt>
file that is created when the
<tt>doconfig</tt>
program is run without the
<tt>-c</tt>
option.
This is typically done in the subset control program.
<a name="nx_id_565"></a>
Device driver writers and kit developers do not supply
either of these files;
however, an understanding of the following topics related to these files
can help during device driver kit development and testing:
</p><ul>
<p></p><li>
Format of the
<tt><var>NAME</var>.list </tt>file
<p></p></li><li>
Relationship between
<tt><var>NAME</var>.list </tt>and
<tt>/usr/sys/conf/.product.list</tt>
</li></ul><p>
</p><blockquote><p align="center"><font size="+1"><strong>Note</strong></font></p><p>
If there are no products registered on your system, a
<tt>/usr/sys/conf/.product.list</tt>
file does not exist.
In this case, a
<tt><var>NAME</var>.list </tt>file would not be created.
</p></blockquote><p>
<a name="SpecifyInfonameListFile"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="DD%20configure%20files_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="DD%20configure%20files_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#ConfigModuleStaticDrv"><img src="DD%20configure%20files_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#TheNAMElistFile"><img src="DD%20configure%20files_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#RelNAMElistprodlist"><img src="DD%20configure%20files_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html"><img src="DD%20configure%20files_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="DD%20configure%20files_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="DD%20configure%20files_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
13.2.1&nbsp;&nbsp;&nbsp;&nbsp;Format of the NAME.list File
</h3>
<p>
In the device driver kits delivery process, the
<tt>kreg</tt>
utility sets up the
<tt>.product.list</tt>
and
<tt><var>NAME</var>.list </tt>files on the customer's system.
Although third-party driver writers and kit developers do not supply
these files, it is useful to understand the files' format.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut18.html#NAMElistforEasyDrv">Figure 13-1</a>
shows the format of such a file for
EasyDriver Incorporated.
<a name="nx_id_566"></a>
<a name="nx_id_567"></a>
</p><p>
<a name="NAMElistforEasyDrv"></a>
</p><h3>Figure 13-1: A NAME.list File for EasyDriver Incorporated</h3>
<p><img src="DD%20configure%20files_files/zk-0551U.gif"></p><p>
</p><p>
The figure shows that the
<tt><var>NAME</var>.list </tt>file has fields separated by colons (:), as follows:
</p><ul>
<p></p><li>
Driver files path field
<p>
The driver files path field contains the path that
points to the location of the files associated with the driver
product, which in the figure is
<tt>/usr/opt/ESA100</tt>.
The value in the driver files path field must be unique.
</p><p>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html#StaticConfigEditNAMElistfile">Section 14.2.1.1</a>
explains how to create a
<tt><var>NAME</var>.list </tt>file as part of the steps for statically configuring a single binary
module to produce a
<tt>/vmunix</tt>
kernel.
In this case, the only field you need is the driver files path field.
</p><p></p></li><li>
Subset ID field
<p>
The subset ID field contains the subset ID associated with the
<tt>setld</tt>
utility, which in the figure is
<tt>EASYDRV200</tt>.
</p><p></p></li><li>
Date field
<p>
The date field contains the date
when the product is ready for distribution.
The date has the form
<tt><var>yymmddhhmm</var></tt>,
where
<tt><var>yy</var></tt>
represents the year,
<tt><var>mm</var></tt>
represents the month,
<tt><var>hh</var></tt>
represents the hour (24-hour time),
and
<tt><var>mm</var></tt>
represents the minutes.
For EasyDriver Incorporated, the date field translates to:
</p><p>
</p><pre>November 17, 1996 1:44 PM
</pre>
<p>
</p><p></p></li><li>
Company name field
<p>
The company name field contains the company's name, which in the figure
is abbreviated to EasyDriverInc.
</p><p></p></li><li>
Product name field
<p>
The product name field contains the name of the product, which in the
figure is
<tt>NONEdriver</tt>.
</p><p></p></li><li>
Product version field
<p>
The product version field contains the version number of the product,
which in the figure is 1.0.
</p><p>
Note that the configuration software (namely, the
<tt>config</tt>
program)
uses only the path field.
</p></li></ul><p>
<a name="RelNAMElistprodlist"></a>
</p><p></p><hr><p align="center">
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/Digital_UNIX_Bookshelf.html"><img src="DD%20configure%20files_files/BOOKSHELF.GIF" alt="[Return to Library]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/TOC.html"><img src="DD%20configure%20files_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#ConfigModuleStaticDrv"><img src="DD%20configure%20files_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#SpecifyInfonameListFile"><img src="DD%20configure%20files_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#Thefilesfile"><img src="DD%20configure%20files_files/NEXT.GIF" alt="[Next Section]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html"><img src="DD%20configure%20files_files/FF.GIF" alt="[Next Chapter]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/INDEX.html"><img src="DD%20configure%20files_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="DD%20configure%20files_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
13.2.2&nbsp;&nbsp;&nbsp;&nbsp;Relationship between NAME.list and .product.list Files
</h3>
<p>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut18.html#figcompareproductslist">Figure 13-2</a>
shows the relationship between the
<tt><var>NAME</var>.list </tt>and
<tt>.product.list</tt>
files during kit installation:
</p><ol>
<p></p><li>
The system manager mounts the device driver kit and runs the
<tt>setld</tt>
utility.
<p></p></li><li>
The
<tt>setld</tt>
utility moves the contents of the kit to an appropriate destination
directory, reads the
device driver kit, and calls the subset control program
(SCP)
provided by the kit developer.
The SCP contains path specifications for all of the files related to the
driver product.
For example,
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut18.html#figcompareproductslist">Figure 13-2</a>
shows the path and one file associated with the
<tt>/dev/none</tt>
driver product.
<a name="nx_id_568"></a>
<a name="nx_id_569"></a>
<p></p></li><li>
The SCP calls the
<tt>/sbin/kreg</tt>
utility, which registers the statically configured product on the
customer's system.
This action makes the device driver product available to system
management-related programs such as
<tt>doconfig</tt>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -