📄 c-booting2.html
字号:
<hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p></p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="84572">13.2.5 Boot Parameters Needed to Set Up Remote File Access and Get the VxWorks Image</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84574"> </a>To get a file containing the VxWorks run-time image, the boot program needs to know the name of the file containing the run-time image. The boot program also needs to know the identity of the machine that hosts the file. These are provided in the boot parameters: <b class="symbol_lc">had</b> and <b class="symbol_lc">fileName</b>. Typically, the boot program gets these parameters from a DHCP or BOOTP message.<b class="symbol_lc"><sup><a href="#foot"><b class="FootnoteMarker">5</b></a></sup></b></p><dd><p class="Body"><a name="84579"> </a>To retrieve the image, the boot program uses any of three protocols: TFTP, FTP, or RSH. If the 0x80 bit in the <b class="symbol_lc">flags</b> parameter is set, the boot program uses TFTP. Otherwise, the boot program uses FTP or RSH to retrieve the image. However, in order to use RSH, the boot program needs a user ID, <b class="symbol_lc">usr</b>. If the boot program must use FTP, it needs both a user ID and a password, <b class="symbol_lc">passwd</b>. In addition, if the VxWorks run-time image is resident on a SCSI drive, you can use the <b class="symbol_lc">other</b> parameter to specify the network interface to which the VxWorks image attaches after it boots. </p><dd><p class="Body"><a name="84580"> </a>To support remote file access for startup code in the VxWorks image, you also need to supply a host name, <b class="symbol_lc">hostName</b>. This parameter is not critical to the boot program. You can leave it empty, if you want. However, entering a meaningful <b class="symbol_lc">hostName</b> can make messages from the boot program a little easier to read. For detailed descriptions of boot parameters for remote file access, see <a href="c-booting2.html#84587">Table 13-3</a>. <p class="table"><h4 class="EntityTitle"><a name="84587"><font face="Helvetica, sans-serif" size="-1" class="sans">Table 13-3: Boot Parameters for Remote File Access</font></a></h4><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="84591"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Parameter Name from <br><b class="symbol_UC">BOOT_PARAMS</b></font></b></div></th><td width="10"> </td><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="84593"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Parameter Name from <b class="command">p</b> Command Listing <br>(followed by description)</font></b></div></th><td width="10"> </td></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84596"> </a><b class="symbol_lc">usr</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="84598"> </a><b class="symbol_lc">user (u)</b></div><div class="CellBody"><a name="84599"> </a>The user name to use with FTP or RSH. </div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84602"> </a><b class="symbol_lc">passwd</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="84604"> </a><b class="symbol_lc">ftp password (pw)</b> </div><div class="CellBody"><a name="84605"> </a>The password to use with FTP. If the password is empty, the boot program uses RSH instead of FTP. Supplying a password also has configuration consequences for remote file access and remote login. </div><div class="CellBody"><a name="84606"> </a>To access remote files, the target creates a device named according to the value of the <b class="symbol_lc">hostName</b> parameter. This device is an instance of the <b class="symbol_lc">netDrv</b> utility. This utility provides remote file access using either RSH or FTP to retrieve the remote file. If you enter a password here, <b class="symbol_lc">netDrv</b> uses FTP. For more information on <b class="symbol_lc">netDrv</b>, see <a href="c-network.html#"><i class="title">2.10.1 RSH and FTP</i></a>.</div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84612"> </a><b class="symbol_lc">other</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="84614"> </a><b class="symbol_lc">other (o)</b> </div><div class="CellBody"><a name="84615"> </a>If you are booting from the network, this parameter has no predetermined use. It is optional, and you can leave it empty. </div><div class="CellBody"><a name="84616"> </a>However, when booting from a disk (a subject outside the scope of this chapter), <b class="symbol_lc">bootDev</b> refers to the disk not the network device. If the boot program finds that you have entered a non-empty value for other, the boot program assumes that this value is the name of a network device that you want to attach. </div></td><td width="10"> </td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p></p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="84618">13.2.6 Optional Boot Parameters</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84622"> </a><a href="c-booting2.html#84626">Table 13-4</a> lists the optional boot parameters. Omitting these parameters from the boot line does not prevent the target from booting. <p class="table"><h4 class="EntityTitle"><a name="84626"><font face="Helvetica, sans-serif" size="-1" class="sans">Table 13-4: Optional Boot Parameters </font></a></h4><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="84630"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Parameter Name from <br><b class="symbol_UC">BOOT_PARAMS</b></font></b></div></th><td width="10"> </td><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="84632"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Parameter Name from <b class="command">p</b> Command Listing <br>(followed by description)</font></b></div></th><td width="10"> </td></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84635"> </a><b class="symbol_lc">hostName</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="84637"> </a><b class="symbol_lc">host name</b></div><div class="CellBody"><a name="84638"> </a>Can contain the name of the host that supplies the boot file. The startup code in the VxWorks run-time image uses this name for the <b class="symbol_lc">netDrv</b> device that it creates to handle remote file access, but this name is entirely optional. Leaving it empty breaks nothing, although using a meaningful name here does make the messages from the boot program a little easier to follow. For example, this parameter is used to name the current working directory (if any), which is the <b class="symbol_lc">netDrv</b> device "<i class="textVariable">hostName</i>:". The target also adds this name (if any) to its host table. </div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84641"> </a><b class="symbol_lc">targetName</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="84643"> </a><b class="symbol_lc">target name (tn)</b></div><div class="CellBody"><a name="84644"> </a>Contains the name of the target. VxWorks adds this name to its host and route tables. </div></td><td width="10"> </td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84647"> </a><b class="symbol_lc">startupScript</b></div></td><td width="10"> </td><td colspan=1 rowspan=1><div class="CellBody"><a name="84649"> </a><b class="symbol_lc">startup script (s)</b> </div><div class="CellBody"><a name="84650"> </a>Names the script, if any, to execute in a target shell upon completion of boot. </div></td><td width="10"> </td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p></p></dl></dl><a name="foot"><hr></a><p class="FootnoteNumberMarker">1: <span class="Footnote"><a name="84256"> </a>This boot line address is configurable. The relevant configuration macro is <b class="symbol_UC">BOOT_LINE_ADRS</b>. If this behavior is inappropriate for your target device, you can copy <b class="file">bootConfig.c</b>, modify the copy, and then use the resulting code as your boot program. </span><p class="FootnoteNumberMarker">2: <span class="Footnote"><a name="84263"> </a>The default boot line is configurable. The relevant configuration macro is <b class="symbol_UC">DEFAULT_BOOT_LINE</b>. </span><p class="FootnoteNumberMarker">3: <span class="Footnote"><a name="86002"> </a>If the target has NVRAM, and the user specified these parameters in a previous boot session, the boot program knows to save these parameters to an NVRAM boot line for the use of the next boot session. </span><p class="FootnoteNumberMarker">4: <span class="Footnote"><a name="84519"> </a>If you accidentally include both a DHCP and BOOTP client in a boot program, the program uses the DHCP client. </span><p class="FootnoteNumberMarker">5: <span class="Footnote"><a name="84577"> </a>If the target reaches the host through a gateway, the target also needs the <b class="symbol_lc">gad</b> value, which is included in the same DHCP or BOOTP message that provided the <b class="symbol_lc">had</b> value. </span><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="c-booting.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-booting.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-booting1.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-booting3.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p></body></html><!---by WRS Documentation (), Wind River Systems, Inc. conversion tool: Quadralay WebWorks Publisher 4.0.11 template: CSS Template, Jan 1998 - Jefro --->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -