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

📄 c-booting6.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-booting5.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-4.3upgrade.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="84935">13.6  &nbsp;&nbsp;Booting from the Serial Line </a></i></h3></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84937"> </a>VxWorks can communicate with the host operating system over serial connections as well as over networks and backplanes. Over a serial line connection, you can boot VxWorks using either SLIP or PPP. </p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="84938">13.6.1  &nbsp;&nbsp;Booting VxWorks Using SLIP</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84939"> </a>If you have configured VxWorks to use SLIP, you can use the Serial Line Internet Protocol to boot VxWorks. The relevant configuration macro is <b class="symbol_UC">INCLUDE_SLIP</b>. SLIP supports IP layer software with point-to-point configurations such as RS-232 serial connections between machines or long-distance telephone lines. If either end of a SLIP connection has other network interfaces (such as Ethernet), it can forward packets to other machines.</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="85740"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">NOTE:  </font></b></a>Both target and host must agree on the MTU size. On a VxWorks system, the default MTU size is 576.</div></td></tr><tr valign="top"><td></td><td><hr></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p callout><dl class="margin"><dd><p class="Body"><a name="84948"> </a>Optionally, you can use compressed TCP/IP headers over SLIP. This variant of the protocol is known as CSLIP (compressed SLIP).  Only the TCP/IP headers are compressed, not the data itself; this implies that CSLIP improves the responsiveness of interactive communications (such as remote shells), where the ratio of header size to data is large, but makes little difference for large data transfers (such as downloading object code).  Because compression applies only to TCP/IP headers, not to other forms of IP, CSLIP has no impact on applications that use UDP rather than TCP (for example, CSLIP has no effect on NFS).<sup><a href="#foot"><b class="FootnoteMarker">1</b></a></sup></p><dd><p class="Body"><a name="84953"> </a>When booting using SLIP (or its CSLIP variant), specify the boot device as follows:</p><dl class="margin"><dd><pre class="Code2"><b><a name="84954">boot device: sl&nbsp;&nbsp; &nbsp;or&nbsp;&nbsp;&nbsp;sl=<i class="textVariable">device</i></a></b></pre></dl><dd><p class="Body"><a name="84955"> </a>Using the form <b>sl=</b><i class="textVariable">device</i> allows you to specify the SLIP <i class="acronym_lc">tty</i>, overriding the configuration constant <b class="symbol_UC">SLIP_TTY</b>.  </p><dd><p class="Body"><a name="84959"> </a>The following is a boot example for the configuration shown in <a href="c-booting6.html#84964">Figure&nbsp;13-2</a>:</p><dl class="margin"><dd><pre class="Code2"><b><a name="84960">boot device             : sl=/tyCo/1 processor number        : 0 host name               : phobos file name               : /usr/wind/target/config/ads302/vxWorks inet on ethernet (e)    : 150.12.1.2 host inet (h)           : 150.12.1.1 user (u)                : jane target name (tn)        : vxJane </b><tt class="output"><div class="frame"></pre><h4 class="EntityTitle"><a name="84964"><font face="Helvetica, sans-serif" size="-1" class="sans">Figure 13-2:&nbsp;&nbsp;SLIP Configuration Example</font></a></h4><dl class="margin"><div class="Anchor"><a name="84988"> </a><img class="figure" border="0" src="images/c-bootinga1.gif"></div></dl></div></tt><b></a></b></pre></dl><dd><p class="Body"><a name="84990"> </a>When the boot device is SLIP, the SLIP interface is configured by <b class="routine"><i class="routine">usrSlipInit</i></b><b>(</b>&nbsp;<b>)</b> in<b class="file"> target/src/config/usrNetwork.c</b>.  This sets up the SLIP <i class="acronym_lc">tty</i>, and configures the point-to-point connection using the target and host IP addresses specified in the boot parameters.  If a gateway address is specified, the SLIP driver adds a routing entry from the gateway address to the host address.  If a gateway address is not specified, the SLIP driver assumes that the point-to-point peer address on the other end of the serial line is the gateway and enters the appropriate routing entry.</p><dd><p class="Body"><a name="84991"> </a>If you do not have a second serial port, then you must use the console port as the SLIP port. To do this:</p></dl><dl class="margin"><p><ol class="List"><li value="1."><a name="84992"> </a>Set the console serial port (configuration constant <b class="symbol_UC">CONSOLE_TTY</b>) to <b class="symbol_UC">NONE</b> and define the SLIP channel identifier (configuration constant <b class="symbol_UC">SLIP_TTY</b>): </li></ol></p><dl class="margin"><dd><pre class="Code2"><b><a name="84993">#define&nbsp;&nbsp;&nbsp;CONSOLE_TTY&nbsp;&nbsp;&nbsp;NONE #define&nbsp;&nbsp;&nbsp;SLIP_TTY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* use port number 0 for slip */</a></b></pre></dl><p><ol class="List"><li value="2."><a name="84995"> </a>Remake VxWorks and burn new boot ROMs before booting.</li></ol></p></dl><dl class="margin"><dd><p class="Body"><a name="84996"> </a>To access a UNIX file system, the Internet addresses specified in the target boot parameters must be consistent with those specified when the host connection is created. </p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="84999">13.6.2  &nbsp;&nbsp;Booting VxWorks Using PPP</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85003"> </a>To boot VxWorks using PPP, first configure PPP into the system (see <a href="c-network.html#"><i class="title">PPP Configuration</i></a>) and remake the VxWorks and boot ROM images. After a new boot ROM image has been built, burned into ROM, and installed in the target board, bootstrap the target board to the VxWorks boot ROM prompt. </p><dd><p class="Body"><a name="85005"> </a>When booting using PPP, specify the boot device with one of the following options:</p></dl><dl class="margin"><dd><div class="Item"><a name="85006"> </a><b class="symbol_lc">boot device: ppp </b></div><dl class="margin"><dd><div class="Indent"><a name="85008"> </a>If using <b class="symbol_lc">boot device: ppp</b>, the serial channel is set to <b class="symbol_UC">PPP_TTY</b> in the VxWorks configuration and the baud rate is set to the default baud rate of the channel. </div><br><dd><div class="Indent"><a name="85010"> </a>When the boot device is <b class="symbol_lc">ppp</b>, the PPP interface is initialized by <b class="routine"><i class="routine">usrPPPInit</i></b><b>(&nbsp;)</b>. This configures the point-to-point connection using the serial device, target, and host IP addresses specified in the boot parameters. And it configures in the options defined at compile-time in the configuration (see the Tornado User's Guide: Projects for more information on configuring VxWorks). If a gateway address is specified, the PPP driver adds a routing entry from the gateway address to the host address. If a gateway address is not specified, the PPP software assumes that the point-to-point peer address is on the other end of the serial line and enters the appropriate routing entry.</div><br></dl><dd><div class="Item"><a name="85014"> </a><b class="symbol_lc">ppp=</b><i class="textVariable">device </i></div><dl class="margin"><dd><div class="Indent"><a name="85015"> </a>Specifying <b>ppp=</b><i class="textVariable">device</i> allows you to choose the PPP <i class="acronym_lc">tty</i> (serial channel), overriding the <b class="symbol_UC">PPP_TTY</b> constant. </div><br></dl><dd><div class="Item"><a name="85016"> </a><b class="symbol_lc">ppp=</b><i class="textVariable">device,baudrate </i></div><dl class="margin"><dd><div class="Indent"><a name="85017"> </a>Specifying <b class="symbol_lc">ppp=</b><i class="textVariable">device,baudrate</i> allows you to choose the PPP <i class="acronym_lc">tty</i> (serial channel) and the baud rate of the channel. </div><br></dl><dd><div class="Item"><a name="85018"> </a><b class="symbol_lc">ppp</b><i class="textVariable">,baudrate</i> </div><dl class="margin"><dd><div class="Indent"><a name="85019"> </a>The default baud rate used by the PPP <i class="acronym_lc">tty</i> (serial channel) can be configured into the system by defining the constant <b class="symbol_UC">PPP_BAUDRATE</b><b class="symbol_lc"> </b>(in <b class="file">config.h</b>) as the required baud rate, and remaking VxWorks and the boot ROM images. </div><br></dl></dl><dl class="margin"><dd><p class="Body"><a name="85021"> </a>However, the baud rate supplied as a part of the boot device overrides any default settings. The following is a boot example for the configuration shown in <a href="c-booting6.html#85029">Figure&nbsp;13-3</a>:</p><dl class="margin"><dd><pre class="Code2"><b><a name="85025">boot device&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: ppp=/tyCo/2,38400 processor number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: 0 host name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: mars file name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: /usr/vw/config/mv167/vxWorks inet on ethernet (e)&nbsp;&nbsp;&nbsp;: 90.0.0.10 host inet (h)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: 90.0.0.1 user (u)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: jane target name (tn)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: vxJane <div class="frame"></pre><h4 class="EntityTitle"><a name="85029"><font face="Helvetica, sans-serif" size="-1" class="sans">Figure 13-3:&nbsp;&nbsp;PPP Configuration Example</font></a></h4><dl class="margin"><div class="Anchor"><a name="85050"> </a><img class="figure" border="0" src="images/c-bootinga2.gif"></div></dl></div></a></b></pre></dl><dd><p class="Body"><a name="85051"> </a>If you want to boot VxWorks over a PPP link but do not have a console device, the following additional modifications must be made:</p></dl><dl class="margin"><p><ol class="List"><li value="1."><a name="85052"> </a>Set the console serial port (configuration constant <b class="symbol_UC">CONSOLE_TTY</b>) to <b class="symbol_lc">NONE</b> and define the <i class="acronym_lc">tty</i> port number using the constant <b class="symbol_lc">PPP_TTY</b> in <b class="file">config.h</b>: </li></ol></p><dl class="margin"><dd><pre class="Code2"><b><a name="85053">#define&nbsp;&nbsp;&nbsp;PPP_TTY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* use port number 0 for PPP */</a></b></pre></dl><p><ol class="List"><li value="2."><a name="85055"> </a>Specify the default boot line (configuration constant <b class="symbol_UC">DEFAULT_BOOT_LINE</b>) before making your boot ROMs. Changing any of the default PPP settings requires new boot ROMs. An example of a default boot line is:</li></ol></p><dl class="margin"><dd><pre class="Code2"><b><a name="85056">"ppp(0,0)mars:/usr/vw/config/mv167/vxWorks h=90.0.0.1 e=90.0.0.10 u=jane"</a></b></pre></dl><p><ol class="List"><li value="3."><a name="85057"> </a>If your system has nonvolatile RAM (NVRAM), edit <b class="library">sysLib.c</b> and change <b class="routine"><i class="routine">sysNvRamGet</i></b><b>(</b>&nbsp;<b>)</b> to return <b class="symbol_UC">ERROR</b>. This forces the use of the default boot line, instead of the value stored in NVRAM. </li></ol></p><p><ol class="List"><li value="4."><a name="85058"> </a>Initialize PPP on the remote peer.</li></ol></p><p><ol class="List"><li value="5."><a name="85060"> </a>Boot VxWorks with the new boot ROMs. </li></ol></p></dl></dl><a name="foot"><hr></a><p class="FootnoteNumberMarker">1:&nbsp;<span class="Footnote"><a name="84952"> </a>If your host operating system does not include SLIP or CSLIP facilities, consider using a publicly available implementation.  One popular implementation for SunOS 4.1.<i class="textVariable">x</i>, the Van Jacobson CSLIP 2.7 release, is provided in <b class="file">target/unsupported/cslip-2.7</b>.  This code is publicly available, and is not supported by Wind River Systems. It is included only as a convenience. </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-booting5.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-4.3upgrade.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 + -