📄 x-ix865.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="wrs.css"><title> Intel x86 </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="x-ix86.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="x-ix864.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="x-mips.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="85358">D.5 Board Support Packages</a></i></h3></font><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="85361">Boot Considerations for PC Targets</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="85362"> </a>For general information on booting VxWorks, see <i class="title">Tornado Getting Started</i>.</p><dd><p class="Body"><a name="85363"> </a>This section describes how to build a boot disk, how to boot VxWorks, and how to mount a DOS file system. VxWorks for x86 targets includes the following DOS diskettes (in 3.5" (1.44MB) format): </p></dl><dl class="margin"><p class="listspace"><ul class="Bullet" type="disc"><li><a name="85364"> </a>The diskette labeled "VxWorks Utility Disk" contains the DOS executables <b class="command">vxsys.com</b>, <b class="command">vxcopy.exe</b>, <b class="command">vxload.com</b>, and <b class="command">mkboot.bat</b>. </li></ul></p><p class="listspace"><ul class="Bullet" type="disc"><li><a name="85366"> </a>The diskette labeled "VxWorks Boot Disk" contains the VxWorks bootstrap loader file; the minimal boot program, <b class="file">bootrom.sys</b>, (renamed from <b class="file">bootrom_uncmp</b>); and standalone VxWorks, <b class="file">vxWorks.st</b>. These files work for all PC BSPs. (For additional boot images, see <a href="x-ix865.html#85675"><i class="title">VxWorks Images</i></a>.)</li></ul></p></dl><dl class="margin"><dd><p class="Body"><a name="85367"> </a>These utilities help you build new boot disks and are described in the following subsections.</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="86690"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">NOTE: </font></b></a>These utilities are also included in the Tornado tree at <br><i class="textVariable">installDir</i><b class="file">/host/x86-win32/bin</b>.</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="86707">Boot Process</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="88029"> </a>When a standard PC-AT computer is powered on, the system BIOS code loads and executes the <i class="term">bootstrap loader</i>. The bootstrap loader is written in 8088 16-bit assembly language. The BIOS obtains the bootstrap loader from the boot sector, which may be in one of several locations: a diskette, a hard disk, or some other alternatives such as a ROM.<sup><a href="#foot"><b class="FootnoteMarker">1</b></a></sup> When it finds the bootstrap loader, it executes it to find out where to find the <b class="file">bootrom.sys</b> file.</p><dd><p class="Body"><a name="88044"> </a>The VxWorks bootstrap loader must be written to the boot sector instead of the standard bootstrap loader in order to create a VxWorks boot disk (or diskette). In addition, you must create the appropriate <b class="file">bootrom.sys</b> file. This can be a bootable VxWorks kernel or it can be an intermediate kernel designed to load VxWorks from another source, such as a diskette, a hard disk, ROM, or flash. The following subsections describe how to do this from MS-DOS, from Solaris, and from VxWorks.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="85397">Building a Boot Disk/Diskette from MS-DOS</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="85398"> </a>The VxWorks Utility Disk includes several utility programs for creating VxWorks boot disks. These utilities write the VxWorks bootstrap loader to the boot sector, and then copy the VxWorks executables from the host to the disk in a format suitable for the bootstrap loader. The utilities mimic the corresponding MS-DOS utilities, but they can be run under a DOS session of Windows, not "pure" DOS. They are summarized as follows and described in more detail later in this section:</p></dl><dl class="margin"><dd><div class="Item"><a name="85399"> </a><b class="file">vxsys.com</b> </div><dl class="margin"><dd><div class="Indent"><a name="85400"> </a>installs a VxWorks bootstrap loader in a disk's boot sector.</div><br></dl><dd><div class="Item"><a name="85401"> </a><b class="file">vxcopy.exe</b> </div><dl class="margin"><dd><div class="Indent"><a name="85402"> </a>copies a VxWorks <b class="file">a.out</b> executable to the boot disk in the required format.</div><br></dl><dd><div class="Item"><a name="85403"> </a><b class="file">vxload.com</b> </div><dl class="margin"><dd><div class="Indent"><a name="85404"> </a>loads and executes VxWorks from MS-DOS (must be run under "pure" DOS).</div><br></dl><dd><div class="Item"><a name="85405"> </a><b class="file">mkboot.bat</b> </div><dl class="margin"><dd><div class="Indent"><a name="85406"> </a>an MS-DOS batch file that creates boot disks.</div><br></dl></dl><dl class="margin"><b class="HU-bullet"><li><a name="85408"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Creating a Boot Disk for PC-Compatible Targets</font></li></b></dl><dl class="margin"><dd><p class="Body"><a name="85409"> </a>To create a diskette or a bootable hard disk for PC-compatible targets, follow these steps:</p></dl><dl class="margin"><p><ol class="List"><li value="1."><a name="85410"> </a>On the development host, change to the BSP directory, for example, <b class="file">config/pc386</b>. Use <b class="command">make</b> to produce the minimal boot program (the target <b class="file">bootrom_uncmp</b>) or a bootable VxWorks (the targets <b class="file">vxWorks_rom</b>, <b class="symbol_lc">vxWorks_rom_low</b>, or <b class="file">vxWorks.st_rom</b>).<sup><a href="#foot"><b class="FootnoteMarker">2</b></a></sup> We recommend you copy the resulting file to a legal MS-DOS file name, such as <b class="file">bootrom.dat</b>, to simplify the rest of the process. </li></ol></p><dl class="margin"><dd><div class="Indent"><a name="85415"> </a>The commands for this sequence in a Windows DOS shell are as follows:</div><br></dl><dl class="margin"><dd><pre class="Code2"><b><a name="85416"></b><tt class="output"> C:\></tt><b> cd <i class="textVariable">installDir</i>\target\config\pc386 </b><tt class="output"> C:\></tt><b> make bootrom_uncmp </b><tt class="output"> C:\></tt><b> copy bootrom_uncmp bootrom.dat</a></b></pre></dl><p><ol class="List"><li value="2."><a name="85419"> </a>Transfer the executable image to a PC running MS-DOS. In many cases, the PC is networked with the workstation, using PC-NFS or a similar networking package. For example:</li></ol></p><dl class="margin"><dd><pre class="Code2"><b><a name="85420"> </b><tt class="output">C:\></tt><b> copy <i class="textVariable">drive</i>:bootrom.dat c:</a></b></pre></dl><dl class="margin"><dd><div class="Indent"><a name="85421"> </a>where<b> </b><i class="textVariable">drive</i> refers to the mounted file system on your PC.</div><br></dl><p><ol class="List"><li value="3."><a name="85424"> </a>Use the <b class="command">mkboot</b> utility (or a combination of <b class="command">vxsys</b> and <b class="command">vxcopy</b>) to create the boot disk. If this boot disk is a diskette, it must be a high-density diskette. The following example shows this step, assuming the diskette is in drive <b class="file">A</b>:</li></ol></p><dl class="margin"><dd><pre class="Code2"><b><a name="85425"> </b><tt class="output">C:\></tt><b> mkboot a: bootrom.dat</a></b></pre></dl><dl class="margin"><dd><div class="Indent"><a name="85426"> </a>The <b class="command">mkboot</b> utility uses <b class="command">vxsys</b> to create the VxWorks bootstrap loader in the disk's boot sector. <b class="command">mkboot</b> then runs <b class="command">vxcopy</b> to copy <b class="file">bootrom.dat </b>to the boot file <b class="command">bootrom.sys</b> on the target disk, excluding the <b class="command">a.out</b> header.</div><br></dl><p><ol class="List"><li value="4."><a name="85427"> </a>Check that <b class="command">bootrom.sys</b> is contiguous on the boot disk, using the MS-DOS <b class="command">chkdsk</b> utility. (The <b class="command">mkboot</b> utility runs <b class="command">chkdsk</b> automatically.) If <b class="command">chkdsk</b> shows that there are non-contiguous blocks, delete all files from the disk and repeat the <b class="command">vxcopy</b> operation to ensure that MS-DOS lays down the file contiguously. </li></ol></p><dl class="margin"><dd><div class="Indent"><a name="85429"> </a>The following example shows <b class="command">chkdsk</b> output where the boot file is not contiguous (note especially the last line of output):</div><br></dl><dl class="margin"><dd><pre class="Code2"><b><a name="85430"> </b><tt class="output">C:\></tt><b> chkdsk a:bootrom.sys</a></b><dd> <b><a name="85432"></b><tt class="output"> Volume Serial Number is 2A35-18ED 1457664 bytes total disk space 895488 bytes in 11 user files 562176 bytes available on disk</tt><b></a></b><dd> <b><a name="85437"></b><tt class="output"> 512 bytes in each allocation unit 2847 total allocation units on disk 1098 available allocation units on disk</tt><b></a></b><dd> <b><a name="85441"></b><tt class="output"> 655360 total bytes memory 602400 bytes free</tt><b></a></b><dd> <b><a name="85444"></b><tt class="output"> A:\BOOTROM.SYS Contains 2 non-contiguous blocks</tt><b></a></b></pre></dl><p><ol class="List"><li value="5."><a name="85445"> </a>To test your boot disk, first make sure that the correct drive holds the boot disk (in this example case, drive <b class="file">A:</b> holds the boot diskette).</li></ol></p><p><ol class="List"><li value="6."><a name="85446"> </a>Reboot the PC. </li></ol></p><dl class="margin"><dd><div class="Indent"><a name="85447"> </a>Depending on the configuration of your VxWorks image, if the boot is successful, the VxWorks boot prompt appears either on the VGA console or on the COM1 serial port. You can boot VxWorks by entering <b class="command">@</b>:</div><br></dl><dl class="margin"><dd><pre class="Code2"><b><a name="85449"></b><tt class="output"> [VxWorks Boot]:</tt><b> @</a></b></pre></dl></dl><dl class="margin"><b class="HU-bullet"><li><a name="85450"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">The MS-DOS Boot Utilities in More Detail</font></li></b></dl><dl class="margin"><dd><div class="Item"><a name="85452"> </a><b class="command">vxsys</b> <i class="textVariable">drive</i>:</div><dl class="margin"><dd><div class="Indent"><a name="85453"> </a>This command installs a VxWorks bootstrap loader in a drive's boot sector. The drive can be either a diskette (drive <b class="file">A:</b>), or a hard disk that is searched by the BIOS bootstrap (drive <b class="file">C:</b>).<sup><a href="#foot"><b class="FootnoteMarker">3</b></a></sup> The VxWorks bootstrap loader searches for the file <b class="file">bootrom.sys</b> in the root directory and loads it directly into memory at 0x8000. Execution then jumps to <b class="routine"><i class="routine">romInit</i></b><b>( )</b> at 0x8000.</div><br></dl></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="86744"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">NOTE: </font></b></a>After a bootstrap loader is installed in the disk's boot sector, you do not need to repeat the <b class="command">vxsys</b> operation for new ROM images. Just use <b class="command">vxcopy</b> to make a new version of <b class="file">bootrom.sys</b>.</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><div class="Item"><a name="85459"> </a><b class="command">vxcopy</b> <i class="textVariable">source_file</i> <i class="textVariable">target_file</i> </div><dl class="margin"><dd><div class="Indent"><a name="85460"> </a>This command copies the VxWorks image file from <i class="textVariable">source_file</i> to <i class="textVariable">target_file</i>. Normally this copies the <b class="file">bootrom_uncmp</b> output to <b class="file">bootrom.sys</b> on the boot disk. <b class="command">vxcopy</b> strips the 32-byte <b class="file">a.out</b> header from <i class="textVariable">source_file</i> as it copies.</div><br></dl><dd><div class="Item"><a name="85462"> </a><b class="command">mkboot</b> <i class="textVariable">drive</i>: <i class="textVariable">source_file </i></div><dl class="margin"><dd><div class="Indent"><a name="85463"> </a>This command is an MS-DOS batch file that uses <b class="command">vxsys</b> to install the VxWorks bootstrap loader in the drive's boot sector, and then uses <b class="command">vxcopy</b> to transfer <i class="textVariable">source_file</i> to <i class="textVariable">drive</i><b class="file">:bootrom.sys</b>. It also runs the MS-DOS utility <b class="command">chkdsk</b> to check whether <b class="file">bootrom.sys</b> is contiguous.</div><br></dl><dd><div class="Item"><a name="85465"> </a><b class="command">vxload</b> [<i class="textVariable">image_file</i>] </div><dl class="margin"><dd><div class="Indent"><a name="85466"> </a>This command is used during an MS-DOS session to load and execute the VxWorks image (normally <b class="file">vxWorks.st</b> or <b class="file">bootrom_uncmp</b>). It can be more convenient or quicker than loading the image via the PC boot cycle. <b class="command">vxload</b> takes an optional parameter, the image file name; the default is <b class="file">vxWorks.st</b> in the current directory.</div><br></dl></dl><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/caution.gif"></td><td><hr><div class="CalloutCell"><a name="86763"><b class="symbol_UC"><font face="Helvetica, sans-serif" size="-1" class="sans">CAUTION: </font></b></a><b class="command">vxload</b> cannot be used to load VxWorks if the MS-DOS session has a protected mode program in use. Typical examples include the MS-DOS RAM disk driver, <b class="file">vdisk.sys</b>, and the extended memory manager, <b class="file">emm386.exe</b>. To use <b class="command">vxload</b>, remove or disable such facilities.</div></td></tr><tr valign="top"><td></td><td><hr></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -