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

📄 dd kits.htm

📁 What is this ``device driver stuff anyway? Here s a very short introduction to the concept.
💻 HTM
📖 第 1 页 / 共 4 页
字号:
<html><head><title>Device Driver Kits Delivery Process</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="DevDriverKitDelivery"></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%20kits_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%20kits_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut16.html"><img src="DD%20kits_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<img src="DD%20kits_files/BLANK.GIF" border="0">
<a href="#DevDrvDevelopPhase"><img src="DD%20kits_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/drivertut18.html"><img src="DD%20kits_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%20kits_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%20kits_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h1>12&nbsp;&nbsp;&nbsp;&nbsp;Device Driver Kits Delivery Process</h1>
<p>
<a name="nx_id_529"></a>
The device driver kits delivery process is the mechanism for developing,
delivering, installing, and configuring device drivers on
systems that run Digital UNIX.
<a name="nx_id_530"></a>
Customers use the
<tt>setld</tt>
utility to install the device driver product and
then use a variety of system management utilities that
automatically configure drivers into the kernel.
This chapter provides an overview to the device driver kits delivery process,
using as an example a fictitious device driver development
company called
EasyDriver Incorporated.
</p><p>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut17.html#figHowtoDeliverKit">Figure 12-1</a>
shows the tasks and groups of people involved in the
device driver kits delivery process.
The figure shows that the device driver kits delivery process
involves at least three different audiences: the device driver writer,
the kit developer, and the system manager (who, from the device driver
writer's point of view, is the customer).
In addition to showing the groups of people,
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut17.html#figHowtoDeliverKit">Figure 12-1</a>
also shows the tasks each group does to develop, deliver, install, and
configure the device driver product: 
</p><ul>
<p></p><li>
Device driver development phase
<p>
In this phase, the
device driver writer writes the driver, creates a driver development
environment, produces the single binary module, statically and dynamically
configures the single binary module (the driver) into the kernel, and
tests the driver.
After testing the driver, the device driver writer provides the driver
product-related files and file fragments to the kit developer.
</p><p></p></li><li>
Device driver kit development phase
<p>
In this phase, the kit developer takes the driver product-related files
and file fragments and prepares
the device driver kit or kits and creates installation instructions, if
needed.
The kit developer also tests the installation procedure and ensures the
driver statically and dynamically configures into the kernel and
works with the appropriate utilities.
</p><p></p></li><li>
Device driver installation phase
<p>
In this phase, the customer loads
the device driver kit, runs
<tt>setld</tt>,
and
follows any installation instructions that the vendor supplies.
</p></li></ul><p>
</p><p>
<a name="figHowtoDeliverKit"></a>
</p><h3>Figure 12-1: People and Tasks Associated With the Device Driver Kits Delivery Process</h3>
<p><img src="DD%20kits_files/zk-0546U.gif"></p><p>
<a name="nx_id_531"></a>
</p><p>
The following sections give an overview of these tasks.
Because these tasks encompass more than one group of people, the following
discussions explicitly identify the
group typically associated with the specific tasks.
</p><p>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut18.html#ConfigModuleStaticDrv">Chapter 13</a>
describes how some of the system management utilities use the driver
configuration-related files and file fragments.
<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 want to follow the steps for statically or dynamically
configuring drivers (single binary modules) into the kernel without
reading the background information provided in
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut17.html#DevDriverKitDelivery">Chapter 12</a>
and
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut18.html#ConfigModuleStaticDrv">Chapter 13</a>,
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>.
<a name="nx_id_532"></a>
</p><blockquote><p align="center"><font size="+1"><strong>Note</strong></font></p><p>
Device driver examples are stored in an optional software subset
that the system manager must select when installing Digital UNIX.
If the
<tt>/usr/examples/devdriver</tt>
directory does not appear on your system, check with your system manager.
The system manager can use the
<tt>setld</tt>
utility to install this optional subset. 
</p><p>
The device driver configuration information described in
Part 4
of this book reflects the tools and methodology associated with
Digital UNIX Version 4.0.
Because the tools and methodology used to configure device drivers into
the kernel can change from release to release, see
the latest product documentation for the most current information
related to device driver configuration.
</p></blockquote><p>
<a name="DevDrvDevelopPhase"></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%20kits_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%20kits_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#DevDriverKitDelivery"><img src="DD%20kits_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<img src="DD%20kits_files/BLANK.GIF" border="0">
<a href="#WritetheDeviceDrv"><img src="DD%20kits_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/drivertut18.html"><img src="DD%20kits_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%20kits_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%20kits_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h2>
12.1&nbsp;&nbsp;&nbsp;&nbsp;Device Driver Development Phase
</h2>
<p>
<a name="nx_id_533"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut17.html#figTasksDrvDevelopPhase">Figure 12-2</a>
shows the tasks associated with the device driver development phase as
practiced at EasyDriver Incorporated.
You can choose to follow this model or devise an alternate one that
matches your device driver development environment.
The tasks that the driver writer at EasyDriver Incorporated performs during the
device driver development phase are:
</p><ul>
<p></p><li>
Write the device driver
<p></p></li><li>
Create the driver development environment
<p></p></li><li>
Create driver product-related files and file fragments
<p></p></li><li>
Produce the single binary module
<p></p></li><li>
Perform static configuration of the driver (single binary module)
<p></p></li><li>
Perform dynamic configuration of the driver (single binary module)
<p></p></li><li>
Test the driver
<p></p></li><li>
Provide driver product-related files and file fragments to the kit developer
</li></ul><p>
The sections following
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut17.html#figTasksDrvDevelopPhase">Figure 12-2</a>
provide an overview of the tasks associated with the device driver
development phase.
<a name="figTasksDrvDevelopPhase"></a>
</p><h3>Figure 12-2: Tasks for Device Driver Development Phase</h3>
<p><img src="DD%20kits_files/zk-1142U.gif"></p><p>
<a name="WritetheDeviceDrv"></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%20kits_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%20kits_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#DevDriverKitDelivery"><img src="DD%20kits_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#DevDrvDevelopPhase"><img src="DD%20kits_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#CreateDevDrvDevelopEnv"><img src="DD%20kits_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/drivertut18.html"><img src="DD%20kits_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%20kits_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%20kits_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
12.1.1&nbsp;&nbsp;&nbsp;&nbsp;Writing the Device Driver
</h3>
<p>
<a name="nx_id_534"></a>
The driver writer at EasyDriver Incorporated uses the techniques described
in previous chapters of this book to write device drivers.
The driver writer uses the guidelines presented in
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut5.html#SpecNamingScheme">Section 2.1.2.1</a>
for naming the device driver source file.
For the
<tt>/dev/none</tt>
device driver product, the source file is called
<tt>none.c</tt>.
For the
<tt>/dev/edgd</tt>
device driver product, the source file is called
<tt>edgd.c</tt>.
<a name="CreateDevDrvDevelopEnv"></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%20kits_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%20kits_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#DevDriverKitDelivery"><img src="DD%20kits_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#WritetheDeviceDrv"><img src="DD%20kits_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#SupplyInfoDrvRelFiles"><img src="DD%20kits_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/drivertut18.html"><img src="DD%20kits_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%20kits_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%20kits_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
12.1.2&nbsp;&nbsp;&nbsp;&nbsp;Creating the Device Driver Development Environment
</h3>
<p>
<a name="nx_id_535"></a>
The driver writer works with the kit developer to create a development
environment.
The driver writer for EasyDriver Incorporated works with the kit
developer
to create the driver development environment 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>.
This development environment consists of the directories and files
associated with the driver product.
(The
<tt>.mod</tt>
file will not appear in the directories until you actually produce it
from the
<tt>.c</tt>
file.)
</p><p>
A directory structure, such as the one 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>,
helps the kit developer to prepare the kit and
the driver writer to test the driver
under conditions similar to those experienced by customers.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut17.html#figDirStructEasyDrv">Figure 12-3</a>
contrasts the directories and files related to the system with the
directories and files related to the driver kit development
environment.
<a name="figDirStructEasyDrv"></a>
</p><h3>Figure 12-3: Driver Development Environment for EasyDriver Incorporated</h3>
<p><img src="DD%20kits_files/zk-0549U.gif"></p><p>
The directories and files related to EasyDriver Incorporated's system are as
follows.
</p><ul>
<p></p><li>
<tt>/usr/sys/conf</tt>
directory
<p>
This directory contains files that define the kernel configuration for
the generic (all-encompassing) and target machine kernels.
In the
<tt>/usr/sys/conf</tt>
directory for EasyDriver Incorporated, the generic kernel is called
<tt>GENERIC</tt>
and the target machine kernel is called
<tt>CONRAD</tt>.
This directory also contains the
<tt>/usr/sys/conf/.product.list</tt>
file and,
optionally, a
<tt>GENERIC.list</tt>
or
<tt>CONRAD.list</tt>
file.
Finally, it contains a
<tt>BINARY.list</tt>
file.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut18.html#TheNAMEFile">Section 13.1</a>
describes in more detail the
<tt>GENERIC</tt>
and
target configuration files.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut18.html#TheNAMElistFile">Section 13.2</a>
describes in more detail the
<tt>/usr/sys/conf/.product.list</tt>
file.
<a name="nx_id_536"></a>
</p></li></ul><p>
</p><p>
The directories and files related to EasyDriver Incorporated's driver
development environment (identified in darker type in the figure)
are as follows:
</p><ul>
<p></p><li>
A
<tt>/usr/opt</tt>
directory
<a name="nx_id_537"></a>
<p>
This directory contains subdirectories that represent each of the driver
products that EasyDriver Incorporated
developed.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut17.html#figDirStructEasyDrv">Figure 12-3</a>
shows two such directories:
<tt>ESA100</tt>
and
<tt>ESB100</tt>.
</p><p>
Driver writers can follow the naming conventions described in the
<cite>Guide to Preparing Product Kits</cite>
book.
The driver writer at EasyDriver Incorporated adheres to these conventions by
specifying directory names based on
3-character product and version codes.
Thus, the driver writer at EasyDriver Incorporated uses the product codes
<tt>ESA</tt>
and
<tt>ESB</tt>
to represent the directories that contain the files associated with the
<tt>/dev/none</tt>
and
<tt>/dev/edgd</tt>
drivers.
The version code
<tt>100</tt>
indicates that this is Version 1.0 of the driver products.
</p><p></p></li><li>
A
<tt>/usr/opt/ESA100</tt>
directory
<p>
This directory contains the files related to the
<tt>/dev/none</tt>
device driver product that EasyDriver Incorporated ships to its customers.
These files include the following product-related file fragments:
<tt>files</tt>
and
<tt>sysconfigtab</tt>.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut18.html#Thefilesfile">Section 13.3</a>
describes in more detail the
<tt>files</tt>
file fragment.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut18.html#ThesysconfigtabFileFragment">Section 13.4</a>
describes in more detail the
<tt>sysconfigtab</tt>
file fragment.
This directory also contains the driver header files, which have
<tt>.h</tt>
extensions; the driver source files, which have
<tt>.c</tt>
extensions;
and the single binary modules, which have
<tt>.mod</tt>
extensions.
</p><p></p></li><li>
A

⌨️ 快捷键说明

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