📄 c-buildera7.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="wrs.css"><title> Projects </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="GuideIX.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-builder.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-builder6.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-tools.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="103278">4.7 Configuring and Building a VxWorks Boot Program</a></i></h3></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="103279"> </a>The default boot image included with Tornado for your BSP is configured for a networked development environment. The boot image consists of a minimal VxWorks configuration and a boot loader mechanism. You need to configure and build a new boot program (and install it on your boot medium) if you:</p></dl><dl class="margin"><p class="listspace"><ul class="Bullet" type="disc"><li><a name="103653"> </a>Are working with a target that is not on a network.</li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="103657"> </a>Do not have a target with NVRAM, and do not want to enter boot parameters at the target console each time it boots. </li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="104014"> </a>Want to use an alternate boot process, such as booting over the Target Server File System (TSFS).</li></ul></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/warning.gif"></td><td><hr><div class="CalloutCell"><a name="104328"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">WARNING: </font></b></a>Configuration of boot programs is handled independently of the project facility. However, any changes you make to <b class="file">config.h </b>may be absorbed by your projects unless they are masked by project facility selections (see page <a href="c-builder1.html#105098">74</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><dl class="margin"><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="104137">Configuring Boot Parameters</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="104246"> </a>To customize a boot program for your development environment, you must edit <b class="file">c:\tornado\target\config\</b><i class="textVariable">bspname</i><b class="file">\config.h</b> (the configuration file for your BSP). The file contains the definition of <b class="symbol_UC">DEFAULT_BOOT_LINE</b>, which includes parameters identifying the boot device, IP addresses of host and target, the path and name of the VxWorks image to be loaded, and so on. For information about the boot line parameters defined by <b class="symbol_UC">DEFAULT_BOOT_LINE</b>, see <a href="c-start5.html#84962"><i class="title">2.5.4 Description of Boot Parameters</i></a> and <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Help</font></b>><b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Manuals Contents</font></b>><b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">VxWorks Reference Manual</font></b>><b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Libraries</font></b>><b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">bootLib</font></b>.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="103684">Building a Boot Image</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="104250"> </a>To build the new boot program, select <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Build</font></b>><b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Build Boot ROM</font></b> from the Tornado GUI. Then select the BSP for which you want to build the boot program and the type of boot image in the <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">Build Boot ROM</font></b> dialog box (<a href="c-builder1.html#88798">Figure 4-1</a>). Then click <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">OK</font></b>. <div class="frame"><h4 class="EntityTitle"><a name="103688"><font face="Helvetica, sans-serif" size="-1" class="sans">Figure 4-48: Build Boot ROM</font></a></h4><dl class="margin"><div class="CellBody"><a name="103693"> </a><img class="figure" border="0" src="images/c-buildera29.gif"></div></dl></div></p><dd><p class="Body"><a name="103916"> </a>The three main options for a boot images are:</p></dl><dl class="margin"><dd><div class="Item"><a name="103917"> </a><b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">bootrom</font></b></div><dl class="margin"><dd><div class="Indent"><a name="103918"> </a>A compressed boot image.</div><br></dl><dd><div class="Item"><a name="103919"> </a><b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">bootrom_uncmp</font></b> </div><dl class="margin"><dd><div class="Indent"><a name="103920"> </a>An uncompressed boot image.</div><br></dl><dd><div class="Item"><a name="103923"> </a><b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">bootrom_res</font></b> </div><dl class="margin"><dd><div class="Indent"><a name="103924"> </a>A ROM-resident boot image.</div><br></dl></dl><dl class="margin"><dd><p class="Body"><a name="104570"> </a>The <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">.hex</font></b> options are variants of the main options, with Motorola S-Record output.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="103792">TSFS Boot Configuration</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="104377"> </a>The simplest way to boot a target that is not on a network is over the TSFS (which does not involve configuring SLIP or PPP). The TSFS can be used to boot a target connected to the host by one or two serial lines, or a NetROM connection. </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/warning.gif"></td><td><hr><div class="CalloutCell"><a name="104614"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">WARNING: </font></b></a>The TSFS boot facility is not compatible with WDB agent network configurations. See <a href="c-builder6.html#99096"><i class="title">4.6 Configuring the Target-Host Communication Interface</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 class="margin"><dd><p class="Body"><a name="104208"> </a>To configure a boot program for TSFS, edit the boot line parameters defined by <b class="symbol_UC">DEFAULT_BOOT_LINE</b> in <b class="file">config.h</b> (or change the boot parameters at the boot prompt). The boot device parameter must be <b class="symbol_lc">tsfs</b>, and the file path and name must be relative to the root of the host file system defined for the target server (see <a href="c-buildera7.html#104137"><i class="title">Configuring Boot Parameters</i></a> and <a href="c-tools2.html#90892"><i class="title">Target Server File System</i></a>). </p><dd><p class="Body"><a name="104225"> </a>Regardless of how you specify the boot line parameters, you must reconfigure (as described below) and rebuild the boot image.</p><dd><p class="Body"><a name="104661"> </a>If two serial lines connect the host and target (one for the target console and one for WDB communications), <b class="file">config.h</b> must include the lines: </p><dl class="margin"><dd><pre class="Code2"><b><a name="105886">#undef CONSOLE_TTY #define CONSOLE_TTY 0 #undef WDB_TTY_CHANNEL #define WDB_TTY_CHANNEL 1 #undef WDB_COMM_TYPE #define WDB_COMM_TYPE WDB_COMM_SERIAL #define INCLUDE_TSFS_BOOT</a></b></pre></dl><dd><p class="Body"><a name="104386"> </a>If one serial line connects the host and target, <b class="file">config.h</b> must include the lines: </p><dl class="margin"><dd><pre class="Code2"><b><a name="104393">#undef CONSOLE_TTY #define CONSOLE_TTY NONE #undef WDB_TTY_CHANNEL #define WDB_TTY_CHANNEL 0 #undef WDB_COMM_TYPE #define WDB_COMM_TYPE WDB_COMM_SERIAL #define INCLUDE_TSFS_BOOT</a></b></pre></dl><dd><p class="Body"><a name="103824"> </a>For a NetROM connection, <b class="file">config.h</b> must include the lines:</p><dl class="margin"><dd><pre class="Code2"><b><a name="104640">#undef WDB_COMM_TYPE #define WDB_COMM_TYPE WDB_COMM_NETROM #define INCLUDE_TSFS_BOOT</a></b></pre></dl><dd><p class="Body"><a name="104420"> </a>With any of these TSFS configurations, you can also use the target server console to set the boot parameters by defining the <b class="symbol_UC">INCLUDE_TSFS_BOOT_VIO_CONSOLE</b> macro in <b class="file">config.h</b>. This disables the auto-boot mechanism, which might otherwise boot the target before the target server could start its virtual I/O mechanism. (The auto-boot mechanism is similarly disabled when <b class="symbol_UC">CONSOLE_TTY</b> is set to <b class="symbol_UC">NONE</b>, or when <b class="symbol_UC">CONSOLE_TTY</b> is set to <b class="symbol_UC">WDB_TTY_CHANNEL</b>.) Using the target server console is particularly useful for a single serial connection, as it provides an otherwise unavailable means of changing boot parameters from the command line. </p><dd><p class="Body"><a name="104427"> </a>When you build the boot image, select <b class="guiLabel"><font face="Helvetica, sans-serif" size="-1" class="sans">bootrom.hex</font></b> for the image type (<a href="c-buildera7.html#103684"><i class="title">Building a Boot Image</i></a>). </p><dd><p class="Body"><a name="104654"> </a>See the <i class="title">VxWorks Programmer's Guide: Local File Systems</i> for more information about the TSFS.</p><dd><p class="Body"><a name="104514"> </a></p></dl></dl><a name="foot"><hr></a><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="GuideIX.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-builder.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-builder6.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-tools.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 + -