📄 building dd.htm
字号:
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
Device_User
</tt></strong>
</td>
<td align="left" valign="top">
The
<tt>Device_User</tt>
field is optional.
It specifies the user ID (UID) that owns the device
special files for block and character devices.
You can specify a decimal number or a string of alphabetic characters.
The default is the value zero (0).
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
Device_Group
</tt></strong>
</td>
<td align="left" valign="top">
The
<tt>Device_Group</tt>
field is optional.
It specifies the group ID (GID) to which the device
special files associated with the block and character devices belong.
You can specify a decimal number or a string of alphabetic characters.
The default is the value zero (0).
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
Device_Mode
</tt></strong>
</td>
<td align="left" valign="top">
The
<tt>Device_Mode</tt>
field is optional.
It specifies the protection mode for the device special
files.
You must specify an octal number.
The default is the octal number 0664.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
Module_Config_Name
</tt></strong>
</td>
<td align="left" valign="top">
The
<tt>Module_Config_Name</tt>
field specifies the driver name.
You should set
this field to the same name that was specified for the
<tt><var>entry_name</var></tt>
field in the
<tt>sysconfigtab</tt>
file fragment.
See Figure 14-5 for a description of the
<tt><var>entry_name</var></tt>
field that appears in the
<tt>sysconfigtab</tt>
file fragment.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
CMA_Option
</tt></strong>
</td>
<td align="left" valign="top">
The
<tt>CMA_Option</tt>
field provides the information that the Digital-provided
<tt>cma_dd</tt>
subsystem needs.
The
<tt>cma_dd</tt>
subsystem allocates physically contiguous memory on behalf of
a device driver that is dynamically configured into the kernel.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
EISA_Option
</tt></strong>
</td>
<td align="left" valign="top">
The
<tt>EISA_Option</tt>
field specifies the option data associated with the EISA bus.
See
<cite>Writing EISA and ISA Bus Device Drivers</cite>
for a description of the values that you can specify with this field.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
ISA_Option
</tt></strong>
</td>
<td align="left" valign="top">
The
<tt>ISA_Option</tt>
field specifies the option data associated with the ISA bus.
See
<cite>Writing EISA and ISA Bus Device Drivers</cite>
for a description of the values that you can specify with this field.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
PCI_Option
</tt></strong>
</td>
<td align="left" valign="top">
The
<tt>PCI_Option</tt>
field specifies the option data associated with the PCI bus.
See
<cite>Writing PCI Bus Device Drivers</cite>
for a description of the values that you can specify with this field.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
TC_Option
</tt></strong>
</td>
<td align="left" valign="top">
The
<tt>TC_Option</tt>
field specifies the option data associated with the TURBOchannel bus.
See
<cite>Writing TURBOchannel Device Drivers</cite>
for a description of the values that you can specify with this field.
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong><tt>
VBA_Option
</tt></strong>
</td>
<td align="left" valign="top">
The
<tt>VBA_Option</tt>
field specifies the option data associated with the VMEbus.
See
<cite>Writing VMEbus Device Drivers</cite>
for a description of the values that you can specify with this field.
</td>
</tr>
</tbody></table><p>
<a name="nx_id_603"></a>
<a name="nx_id_604"></a>
<a name="nx_id_605"></a>
<a name="nx_id_606"></a>
<a name="nx_id_607"></a>
<a name="nx_id_608"></a>
<a name="nx_id_609"></a>
<a name="nx_id_610"></a>
<a name="nx_id_611"></a>
<a name="nx_id_612"></a>
<a name="nx_id_613"></a>
<a name="nx_id_614"></a>
<a name="nx_id_615"></a>
<a name="nx_id_616"></a>
<a name="nx_id_617"></a>
<a name="nx_id_618"></a>
<a name="RunsourceconfigforSingBinMod"></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="building%20DD_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="building%20DD_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#ConfigModuleDynamicDrv"><img src="building%20DD_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#StaticConfigCresysconfigtab"><img src="building%20DD_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#RunMakeCommandSingBinMod"><img src="building%20DD_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/drivertut20.html"><img src="building%20DD_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="building%20DD_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="building%20DD_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
14.1.6 Step 6: Run the sourceconfig Program
</h3>
<p>
<a name="nx_id_619"></a>
Run the
<tt>sourceconfig</tt>
program from the
<tt>/usr/sys/conf</tt>
directory:
</p><p>
</p><pre># cd /usr/sys/conf <a name="co_id_98_rtn_1"></a><a href="#co_id_98_1"><strong>[1]</strong></a>
# ./sourceconfig BINARY <a name="co_id_98_rtn_2"></a><a href="#co_id_98_2"><strong>[2]</strong></a>
</pre>
<p>
</p><ol>
<p></p><li>
<a name="co_id_98_1"></a>
Shows that the driver writer at EasyDriver Incorporated changes to the
<tt>/usr/sys/conf</tt>
directory before running the
<tt>sourceconfig</tt>
program.
<p>
You should also change to this directory prior to running the
<tt>sourceconfig</tt>
program.
<a href="#co_id_98_rtn_1">[Return to example]</a>
</p><p></p></li><li>
<a name="co_id_98_2"></a>
Shows that the driver writer at EasyDriver Incorporated invokes the
<tt>sourceconfig</tt>
program followed by the
<tt>BINARY</tt>
configuration file name.
This generates a new
<tt>Makefile</tt>
in the
<tt>/usr/sys/BINARY</tt>
directory.
This
<tt>Makefile</tt>
contains the information necessary to compile the single binary module
or modules defined in the
<tt>BINARY.list</tt>
file and the
<tt>files</tt>
file fragment.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html#CreBINARYdotlistFileSingBinMod">Section 14.1.4</a>
(Step 4)
tells you how to create a
<tt>BINARY.list</tt>
file in the
<tt>/usr/sys/conf</tt>
directory.
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html#CrefilesFileFragforSingBinMod">Section 14.1.3</a>
(Step 3)
tells you how to create a
<tt>files</tt>
file fragment in the working directory for your product.
For example, the driver writer at EasyDriver Incorporated created the
<tt>files</tt>
file fragment in the
<tt>/usr/sys/io/ESA100</tt>
directory.
<p>
Your
<tt>files</tt>
file fragment resides in the directory that you created in
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html#CreDirContainDrvProdFiles">Section 14.1.1</a>
(Step 1).
<a href="#co_id_98_rtn_2">[Return to example]</a>
</p></li></ol><p>
<a name="RunMakeCommandSingBinMod"></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="building%20DD_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="building%20DD_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#ConfigModuleDynamicDrv"><img src="building%20DD_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#RunsourceconfigforSingBinMod"><img src="building%20DD_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#CreKernConfigDevelopAreaBinMod"><img src="building%20DD_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/drivertut20.html"><img src="building%20DD_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="building%20DD_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="building%20DD_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
14.1.7 Step 7: Run the make Program
</h3>
<p>
<a name="nx_id_620"></a>
Run the
<tt>make</tt>
program from the
<tt>/usr/sys/BINARY</tt>
directory:
</p><p>
</p><pre># cd /usr/sys/BINARY <a name="co_id_99_rtn_1"></a><a href="#co_id_99_1"><strong>[1]</strong></a>
# make none.mod <a name="co_id_99_rtn_2"></a><a href="#co_id_99_2"><strong>[2]</strong></a>
</pre>
<p>
</p><ol>
<p></p><li>
<a name="co_id_99_1"></a>
Shows that the driver writer at EasyDriver Incorporated changes to the
<tt>/usr/sys/BINARY</tt>
directory before running the
<tt>make</tt>
program.
<p>
You should also change to this directory prior to running the
<tt>make</tt>
program.
<a href="#co_id_99_rtn_1">[Return to example]</a>
</p><p></p></li><li>
<a name="co_id_99_2"></a>
Shows that the driver writer at EasyDriver Incorporated invokes the
<tt>make</tt>
program followed by the name of the device driver product followed by
the
<tt>.mod</tt>
extension.
This step creates the single binary module in the
<tt>/usr/sys/BINARY</tt>
directory.
In the example,
<tt>none.mod</tt>
is the single binary module for the
<tt>/dev/none</tt>
driver product, created in the
<tt>/usr/sys/BINARY</tt>
directory.
This step also creates a link from the
<tt>/usr/sys/BINARY</tt>
directory to the directory you created in
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/AA-PUBVD-TE_html/drivertut19.html#CreDirContainDrvProdFiles">Section 14.1.1</a>
(Step 1).
<p>
You should invoke the
<tt>make</tt>
program as in the example except replace
<tt>none</tt>
with the name of your driver product.
Invoke the
<tt>make</tt>
program for each driver product you want to compile.
The appropriate links get created as described in the previous
paragraph.
<a href="#co_id_99_rtn_2">[Return to example]</a>
</p></li></ol><p>
<a name="CreKernConfigDevelopAreaBinMod"></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="building%20DD_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="building%20DD_files/TOC.GIF" alt="[Contents]" border="0"></a>
<a href="#ConfigModuleDynamicDrv"><img src="building%20DD_files/REW.GIF" alt="[Previous Chapter]" border="0"></a>
<a href="#RunMakeCommandSingBinMod"><img src="building%20DD_files/PREV.GIF" alt="[Previous Section]" border="0"></a>
<a href="#RunsysconfigdbUtilityBinMod"><img src="building%20DD_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/drivertut20.html"><img src="building%20DD_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="building%20DD_files/INDEX.GIF" alt="[Index]" border="0"></a>
<a href="http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/HTML/HELP.html"><img src="building%20DD_files/HELP.GIF" alt="[Help]" border="0"></a>
</p><p></p><hr><p>
</p><h3>
14.1.8 Step 8: Create a Kernel Configuration Development Area
</h3>
<p>
<a name="nx_id_621"></a>
Use an editor such as
<tt>vi</tt>
to create a
<tt>sysconfigtab</tt>
file fragment:
</p><p>
Run the
<tt>doconfig</tt>
program from the
<tt>/usr/sys/conf</tt>
directory to create a kernel configuration development area:
</p><p>
</p><pre># cd /usr/sys/conf <a name="co_id_100_rtn_1"></a><a href="#co_id_100_1"><strong>[1]</strong></a>
# doconfig <a name="co_id_100_rtn_2"></a><a href="#co_id_100_2"><strong>[2]</strong></a>
</pre>
<p>
</p><ol>
<p></p><li>
<a name="co_id_100_1"></a>
Shows that the driver writer at EasyDriver Incorporated changes to the
<tt>/usr/sys/conf</
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -