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

📄 c-booting4.html

📁 vxworks相关论文
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="wrs.css"><title>    Booting over the Network    </title></head><body bgcolor="FFFFFF"><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-booting3.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-booting5.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p><font face="Helvetica, sans-serif" class="sans"><h3 class="H2"><i><a name="84756">13.4  &nbsp;&nbsp;Booting from the Ethernet </a></i></h3></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84758"> </a>The following procedure describes how to boot from a UNIX host over the Ethernet for a VxWorks target that uses DHCP or BOOTP to retrieve boot parameters and TFTP to retrieve the file containing the run-time image. </p></dl><dl class="margin"><p><ol class="List"><li value="1."><a name="84763"> </a>Copy the VxWorks image to the boot directory on the boot host:<sup><a href="#foot"><b class="FootnoteMarker">1</b></a></sup></li></ol></p><dl class="margin"><dl class="margin"><dd><pre class="Code3"><b><a name="84764"></b><tt class="output">%</tt><b> cp vxWorks.st /usr/wind/target/vxBoot/vxWorks.vx245</a></b></pre></dl></dl><p><ol class="List"><li value="2."><a name="84765"> </a>Make sure that the permissions on the boot file make it accessible to all:</li></ol></p><dl class="margin"><dl class="margin"><dd><pre class="Code3"><b><a name="84766"></b><tt class="output">%</tt><b> chmod 644 vxWorks.vx245 </b><tt class="output">%</tt><b> ls -l </b><tt class="output">total 609 -rw-r--r-- 1 target 519880 Jul 6 19:36 vxWorks.vx245</tt><b> </a></b></pre></dl></dl><p><ol class="List"><li value="3."><a name="84770"> </a>On the target, set the flag value to 0xc0. This enables automatic configuration (using DHCP or BOOTP, 0x40) and file retrieval using TFTP (0x80).</li></ol></p><dl class="margin"><dd><div class="Indent"><a name="84771"> </a>To check the current value, enter <b class="command">p</b> at the boot prompt:</div><br><dl class="margin"><dd><pre class="Code3"><b><a name="84772"></b><tt class="output">[VxWorks&nbsp;Boot]: </tt><b>p</a></b></pre></dl><dd><div class="Indent"><a name="84773"> </a>The target responds: </div><br><dl class="margin"><dd><pre class="Code3"><b><a name="84774"></b><tt class="output">boot&nbsp;device&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;ln processor&nbsp;number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;0 flags&nbsp;(f)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;0xc0 unit&nbsp;number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;0</tt><b> </a></b></pre></dl><dd><div class="Indent"><a name="84778"> </a>To change a value, enter <b class="command">c</b> at the boot prompt. </div><br></dl><p><ol class="List"><li value="4."><a name="84779"> </a>Boot the target. To do this, enter an <b class="command">@</b> at the prompt:</li></ol></p><dl class="margin"><dl class="margin"><dd><pre class="Code3"><b><a name="84780"></b><tt class="output">[VxWorks Boot]: </tt><b>@</a></b></pre></dl></dl><dl class="margin"><dd><div class="Indent"><a name="84781"> </a>If the target uses DHCP, it responds:<b>(&nbsp;)</b></div><br><dl class="margin"><dd><pre class="Code3"><b><a name="84782"></b><tt class="output">boot&nbsp;device&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;ln unit&nbsp;number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;0&nbsp; processor&nbsp;number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;0&nbsp; user&nbsp;(u)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;stephenm flags&nbsp;(f)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;0x40&nbsp;  Attaching&nbsp;network&nbsp;interface&nbsp;ln0...&nbsp;done. Getting&nbsp;boot&nbsp;parameters&nbsp;via&nbsp;network&nbsp;interface&nbsp;ln0.  DHCP&nbsp;Server:147.11.46.24 &nbsp;&nbsp;&nbsp;&nbsp;Boot&nbsp;file:&nbsp;/usr/wind/target/vxBoot/vxWorks.vx245 &nbsp;&nbsp;&nbsp;&nbsp;Boot&nbsp;host:&nbsp;147.11.46.24 &nbsp;&nbsp;&nbsp;&nbsp;Boot&nbsp;device&nbsp;Addr&nbsp;(ln0):&nbsp;147.11.46.174 &nbsp;&nbsp;&nbsp;&nbsp;Subnet&nbsp;mask:&nbsp;0xffffff00 &nbsp;&nbsp;&nbsp;&nbsp;Subnet&nbsp;gateway:&nbsp;147.11.46.24 Attaching network interface lo0... done. Loading... 374624 + 57008 + 20036 Starting at 0x1000...   Host Name: bootHost  Target Name: vxTarget  User: target  Attaching network interface ln0... done. Attaching network interface lo0... done.</tt><b> </a></b></pre></dl><dd><div class="Indent"><a name="84791"> </a>If the target uses BOOTP, it responds: </div><br><dl class="margin"><dd><pre class="Code3"><b><a name="84792"></b><tt class="output">boot&nbsp;device&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;ln processor&nbsp;number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;0 flags&nbsp;(f)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;0xc0 Attaching network interface ln0... done. Getting boot parameters via network interface ln0. Bootp Server:150.12.1.159 Boot file: /usr/wind/target/vxBoot/vxWorks.vx245 Boot host: 150.12.1.159 Boot device Addr (ln0): 150.12.1.245 Subnet mask: 0xffffff00 Attaching network interface lo0... done. Loading... 374624 + 57008 + 20036 Starting at 0x1000...   Host Name: bootHost  Target Name: vxTarget  User: target  Attaching network interface ln0... done. Attaching network interface lo0... done.</tt><b> </a></b></pre></dl></dl></dl></dl><dl class="margin"><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84812">Getting a Symbol Table File </a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84815"> </a>VxWorks can be configured to omit the symbol table, by turning off the "downloadable symbol table" during configuration. The relevant configuration macro is <b class="symbol_UC">INCLUDE_NET_SYM_TBL</b>.<sup><a href="#foot"><b class="FootnoteMarker">2</b></a></sup> Instead, the run-time VxWorks image (not the boot program) downloads the symbol table file from the same remote directory that contained the VxWorks image. To retrieve this file, VxWorks uses the <b class="symbol_lc">netDrv</b> I/O driver. </p><dd><p class="Body"><a name="84820"> </a>When you copy the VxWorks image to the host boot directory:</p><dl class="margin"><dd><pre class="Code2"><b><a name="84821"></b><tt class="output">% </tt><b>cp vxWorks /usr/wind/target/vxBoot/vxWorks.vx245</a></b></pre></dl><dd><p class="Body"><a name="84822"> </a>You must also copy the symbol file to the same directory:</p><dl class="margin"><dd><pre class="Code2"><b><a name="84823"></b><tt class="output">%</tt><b> cp vxWorks.sym /usr/wind/target/vxBoot/vxWorks.vx245.sym</a></b></pre></dl><dd><p class="Body"><a name="84824"> </a>Note that the name of the symbol file is the bootfile name with a <b class="file">.sym</b> suffix.</p></dl></dl><dl class="margin"><dd><p class="table" callout><table border="0" cellpadding="0" cellspacing="0"><tr valign="top"><td valign="top" width="40"><br><img border="0" alt="*" src="icons/note.gif"></td><td><hr><div class="CalloutCell"><a name="85667"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">NOTE:  </font></b></a>Because <b class="symbol_lc">netDrv</b><b class="library"> </b>uses either RSH or FTP to access the remote files, the boot parameters must specify a value for the <b class="symbol_lc">usr </b>boot parameter. If you want to use FTP, you must also specify a <b class="symbol_lc">passwd</b>. Otherwise, the target uses RSH. For more information on <b class="symbol_lc">netDrv</b>, see <a href="c-network.html#"><i class="title">2.10.1&nbsp;RSH and FTP</i></a>. </div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="84839">13.4.1  &nbsp;&nbsp;Troubleshooting</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84841"> </a>If possible, put the BOOTP server in debugging mode.</p></dl></dl><dl class="margin"><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84842">No BOOTP Reply or Problems with TFTP </a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84843"> </a>If there is no BOOTP reply:</p></dl><dl class="margin"><ul class="BulletSingle" type="disc"><li><a name="84844"> </a>Make sure a BOOTP server is running on the host.</li></ul><ul class="BulletSingle" type="disc"><li><a name="84845"> </a>Verify that the target address is correct.</li></ul><ul class="BulletSingle" type="disc"><li><a name="84846"> </a>Be sure the boot file for the target exists and is accessible. </li></ul></dl><dl class="margin"><dd><p class="Body"><a name="84848"> </a>If the TFTP server is started with the <b class="command">-s</b> option, it roots its requests in the specified directory.  This can cause a conflict with BOOTP.  </p><dd><p class="Body"><a name="84849"> </a>For example, suppose the boot file is specified in <b class="file">bootptab</b> as<b class="file"> /tftpboot/vxBoot/vxWorks.vx245</b>. After getting the request, the BOOTP server checks for the existence of this file, and then sends a reply. In response to the BOOTP reply, the target sends a TFTP request to get the file <b class="file">/tftpboot/vxBoot/vxWorks.vx245</b>.  </p><dd><p class="Body"><a name="84850"> </a>However, if the TFTP server was started with the <b class="command">-s /tftpboot</b> option, the request fails because the server looks for the file in <b class="file">/tftpboot/tftpboot/vxBoot</b> rather than in<b class="file"> /tftpboot/vxBoot</b>.  If this is a problem, link<b class="file"> /tftpboot/tftpboot</b> to <b class="file">/tftpboot</b>.  To do this, use the following commands:</p><dl class="margin"><dd><pre class="Code2"><b><a name="84851"></b><tt class="output">%</tt><b> cd /tftpboot </b><tt class="output">%</tt><b> ln -s . tftpboot</a></b></pre></dl></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84853">Multiple BOOTP Servers</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84855"> </a>If there are multiple BOOTP servers on the network, the target uses the parameters specified in the first reply message it receives.  In the previous example, the server from which the reply message came is specified in an output line like the following:</p><dl class="margin"><dd><pre class="Code2"><b><a name="84857">Bootp Server:150.12.1.159</a></b></pre></dl></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="84858">Subnet Mismatch between DHCP Server and Client</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="84860"> </a>The DHCP server distributes IP addresses only to clients that reside on the same subnet as the server. If you want the client to use a server on a different subnet, you must setup a DHCP relay agent on the target's subnet. </p></dl></dl><a name="foot"><hr></a><p class="FootnoteNumberMarker">1:&nbsp;<span class="Footnote"><a name="84762"> </a>The file suffix, <b class="file">.vx245</b>, is of no special significance. It just distinguishes this image from other VxWorks images that might reside in the directory. </span><p class="FootnoteNumberMarker">2:&nbsp;<span class="Footnote"><a name="84818"> </a>You need this symbol table to be resident on the target only if you want to use target-resident (pre-Tornado) tools. Host-based tools do not require a target-resident symbol table. </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-booting3.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-booting5.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 + -