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

📄 dd configure files.htm

📁 What is this ``device driver stuff anyway? Here s a very short introduction to the concept.
💻 HTM
📖 第 1 页 / 共 3 页
字号:
and
<tt>config</tt>
by creating an entry in the
<tt>.product.list</tt>
file.
<a name="nx_id_570"></a>
<p></p></li><li>
As the figure shows, the SCP calls
<tt>/sbin/kreg</tt>
and supplies it with the driver path to where the files related
to the
<tt>/dev/none</tt>
driver product are located.
The
<tt>/sbin/kreg</tt>
utility registers the path along with other supporting information in
the customer's
<tt>.product.list</tt>
file.
The three dots following the driver path in the figure indicate that
the supporting information is
contained in other fields in the
entry.
The key piece of information for the driver writer and the kit
developer is the location of the files associated with the driver
product.
<a name="nx_id_571"></a>
<a name="nx_id_572"></a>
<p>
<a name="figcompareproductslist"></a>
</p><h3>Figure 13-2: Comparison of .product.list File and NAME.list</h3>
<p><img src="DD%20configure%20files_files/zk-0689U.gif"></p><p>
<a name="nx_id_573"></a>
<a name="nx_id_574"></a>
</p><p>
</p><p></p></li><li>
The
<tt>doconfig</tt>
program, run by the system manager, reads the
<tt>.product.list</tt>
file and copies it to a file of the form
<tt><var>NAME</var>.list</tt>.
(This occurs only if the system manager (or the subset control program)
does not specify the
<tt>-c</tt>
option.
If the system manager (or the subset control program) specifies the
<tt>-c</tt>
option, the
<tt>doconfig</tt>
program builds a kernel based on the contents of the file specified
by the system manager.
In this case,
<tt>doconfig</tt>
does not perform the copy operation.)
The
<tt><var>NAME</var></tt>
variable usually specifies the name of the target configuration file.
For example,
<tt>TIGRIS.list</tt>
would be the name for the file that contains information about
statically
configured device drivers for the customer system described by the
target
configuration file called
<tt>TIGRIS</tt>.
<a name="nx_id_575"></a>
</li></ol><p>
</p><p>
The fields contained in the
<tt>/usr/sys/conf/.product.list</tt>
file are described in
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut18.html#SpecifyInfonameListFile">Section 13.2.1</a>.
</p><p>
Customers can edit the
<tt><var>NAME</var>.list </tt>file to exclude a driver entry, thus removing the entry's associated
functionality
from the rebuilt (tailored) kernel.
Otherwise, customers always get the driver products as they are
specified in the
<tt>/usr/sys/conf/.product.list</tt>
file.
Customers should never edit the
<tt>/usr/sys/conf/.product.list</tt>
file directly.
Instead, customers make required changes by using the
<tt>kreg</tt>
utility or by editing the
<tt><var>NAME</var>.list </tt>file.
<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 into a
<tt>/vmunix</tt>
kernel.
<a name="Thefilesfile"></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="#RelNAMElistprodlist"><img src="DD%20configure%20files_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#ThesysconfigtabFileFragment"><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.3&nbsp;&nbsp;&nbsp;&nbsp;The files File Fragment
</h2>
<p>
<a name="nx_id_576"></a>
<a name="nx_id_577"></a>
A
<tt>files</tt>
file contains the following information about device drivers:
</p><ul>
<p></p><li>
The location of the source code associated with the product drivers
<p></p></li><li>
Tags indicating when the product drivers are to be loaded into the
kernel
<p></p></li><li>
Whether the source code or the binary form of the product drivers
is supplied to the customer
</li></ul><p>
</p><p>
This information is encapsulated into modules.
A module is a collection of one or more objects linked together into a
single entity.
A module makes it possible to produce a single binary module (executable)
that can be statically or dynamically configured into the kernel.
</p><p>
You can view the
<tt>files</tt>
file fragment as a ``mini''
<tt>files</tt>
file.
That is, it contains the exact same information as the
<tt>files</tt>
file.
The
<tt>files</tt>
file fragment is the mechansm that third-party driver writers use to
make the information about their device driver products available to
customer's systems.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut18.html#figcompfilesfile">Figure 13-3</a>
shows the relationship between a
<tt>files</tt>
file fragment from EasyDriver Incorporated and a customer's
<tt>files</tt>
file.
<a name="nx_id_578"></a>
<a name="nx_id_579"></a>
<a name="nx_id_580"></a>
The
<tt>files</tt>
file fragment from EasyDriver Incorporated contains the modules for the
<tt>/dev/none</tt>
driver product.
The customer's
<tt>files</tt>
file contains similar module entries for other device drivers.
To have the
<tt>doconfig</tt>
program automatically generate the appropriate rules to build the
drivers, the driver writer must specify the
appropriate module information in the
<tt>files</tt>
file fragment.
</p><p>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut18.html#figcompfilesfile">Figure 13-3</a>
shows that the
<tt>config</tt>
program
(which is called from the
<tt>doconfig</tt>
program) run by the customer reads both
<tt>files</tt>
files and makes the information specified in them available to the
system.
The figure also shows that
<tt>config</tt>
does not append the information in
the supplied
<tt>files</tt>
file fragment to the customer's
<tt>files</tt>
file, but rather creates a virtual
<tt>files</tt>
file of the entries contained in both files.
It does not alter the supplied third-party
<tt>files</tt>
file fragment or the customer's
<tt>files</tt>
file.
</p><p>
This automated mechanism relieves the customer from having to make
tedious and potentially error-prone changes to the
<tt>files</tt>
file.
Driver writers must be particularly careful about choosing unique path
and file names in this file.
</p><p>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html#CrefilesFileFragforSingBinMod">Section 14.1.3</a>
describes the syntaxes that you use to specify information in the
<tt>files</tt>
file fragment.
</p><p>
<a name="figcompfilesfile"></a>
</p><h3>Figure 13-3: Comparison of files File Fragment and Customer's files File</h3>
<p><img src="DD%20configure%20files_files/zk-0552U.gif"></p><p>
<a name="nx_id_581"></a>
<a name="ThesysconfigtabFileFragment"></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="#Thefilesfile"><img src="DD%20configure%20files_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#BINARYdotlistFile"><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.4&nbsp;&nbsp;&nbsp;&nbsp;The sysconfigtab File Fragment
</h2>
<p>
The
<tt>sysconfigtab</tt>
file fragment contains device special file information, bus option data
information, and physically contiguous memory usage information for statically
and dynamically configured drivers.
When the user installs a kernel kit,
the
<tt>sysconfigtab</tt>
file fragment gets appended to the
<tt>/etc/sysconfigtab</tt>
database.
<a name="nx_id_582"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut18.html#figStanzaFileFormat">Figure 13-4</a>
shows the format associated with the fields in the
<tt>sysconfigtab</tt>
file fragment separated by colons (:).
It also shows that the syntax for a
<tt>sysconfigtab</tt>
entry contains:
</p><ul>
<p></p><li>
<tt><var>entry_name</var></tt>
<p>
Specifies the name of the device driver.
The figure
shows one sample driver entry called
<tt>none</tt>.
</p><p>
Typically, each driver contains a separate
<tt>sysconfigtab</tt>
entry.
</p><p></p></li><li>
Comments
<p>
A number sign (#) at the beginning of a line indicates a comment.
You can include comments at the beginning or the end of a driver
<tt>sysconfigtab</tt>
entry.
The figure
shows an example of a comment at the beginning of the entry for the
<tt>/dev/none</tt>
driver.
Comments are not allowed within the body of the
<tt>sysconfigtab</tt>
entry.
</p><p></p></li><li>
Trailing blanks
<p>
Tabs are allowed at the beginning or end of lines and, as the figure shows,
trailing blanks are allowed at the end of lines.
</p><p></p></li><li>
<tt><var>attribute_name</var></tt>
and
<tt><var>attribute_value</var></tt>
<p>
Specifies a valid
<tt>sysconfigtab</tt>
field.
The figure
shows that a valid
<tt>sysconfigtab</tt>
entry consists of a keyword that identifies
the field, an equal sign (=) separator, and one or more values.
The values can be strings (as in the figure) or valid keywords
as described
in
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html#StaticConfigCresysconfigtab">Section 14.1.5</a>.
</p><p>
Driver writers interested in learning about the other valid
<tt>sysconfigtab</tt>
keywords
should see
<tt>sysconfigtab</tt>
in
<cite>Reference Pages Section 4</cite>.
</p><p></p></li><li>
New lines
<p>
The figure also
shows that a new line terminates an attribute name and value pair.
</p></li></ul><p>
The following list describes restrictions associated with a
<tt>sysconfigtab</tt>
file fragment:
</p><ul>
<p></p><li>
An individual
<tt>sysconfigtab</tt>
entry can be a maximum of 40960 bytes in length.
The system ignores all bytes in excess of this limit. 
<p></p></li><li>
An individual line (attribute) within a
<tt>sysconfigtab</tt>
entry cannot exceed 1548
bytes.
<p></p></li><li>
An individual
<tt>sysconfigtab</tt>
entry cannot consist of over 2048 lines
(attributes).
<p></p></li><li>
At least one blank line is required between
<tt>sysconfigtab</tt>
entries.
</li></ul><p>
</p><p>
<a name="figStanzaFileFormat"></a>
</p><h3>Figure 13-4: Format of the sysconfigtab File Fragment</h3>
<p><img src="DD%20configure%20files_files/zk-0566U.gif"></p><p>
<a name="nx_id_583"></a>
<a name="nx_id_584"></a>
<a name="nx_id_585"></a>

⌨️ 快捷键说明

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