📄 vxw_pt2.html
字号:
<li>Type <code>vxcopy bootrom.dat d:bootrom.sys</code>.vxcopy copys & converts the bootrom_uncmp file to the required format.</li></ul></blockquote>(From: Ezra Koper, ezra_k@arelnet.com)<p><hr WIDTH="50%"><a NAME="2.3-L"></a><p>Q: When booting using the wu_ftpd shipped with RedHat 6.2 the bootinghangs during the download.<p>A: The system does not hang, if you wait until the connection times-outyou will see that the system boots.<br>Some more research turned up a plausible explanation of the problem onthe wu ftp web site (the Red Hat Linux ftp server) and the fix waspretty simple.<br>Basically, the ftp server has been made more RFC "insistent" and thiscaused the VxWorks boot code to break (it also broke Lynx,Midnight Commander and various other programs so WRS were not alone!).<br>The patch is to close the data connection immediately afterthe read returns EOF (ie the other end has signalled a close). This isconsistent with the FTP RFC 959.<br>The patch should be safe (the data connection is no longer used), and itworks for me with the ftp daemon (wu ftpd) on Linux Red Hat 6.0, 6.2, aswell as the ftp supplied fom WRS for Windows - wftpd version 2.03.<br>So, in bootConfig.c, in the 2 places where the connection is terminated(normal case and error case). Move the close(fd) up after the read. Thatis:<pre> /* Empty the Data Socket before close. PC FTP server hangs otherwise */ while ((read (fd, command, sizeof (command))) > 0); /* Close data connection now close (fd);</pre>See <a href="http://www.wu-ftpd.org/broken-clients.html">http://www.wu-ftpd.org/broken-clients.html</a> for more info.<p>(From: paulvroberts@my-deja.com)<p><hr WIDTH="50%"><a NAME="2.3-M"></a><p>Q: What does the "hostname" field in the boot-parameters mean?<p>A: The host name field in the boot line refers to the card/machine thathas the host inet address. This hostname will appear on your 'devs'list so that you can access the host machine through the target.<br>There's another field called target name that used for the name of thecard/machine that the image is running on.<br>Look in Section 13 of the VxWorks Networks Programmer's Guide for anexplanation of all the fields.<br>(From: Christian Gan, cgan@iders.ca)<p><hr WIDTH="50%"><a NAME="2.3-N"></a><p>Q: I boot from my Disk On Chip, but now I get unresolved symbols when I tryto access a symbol.<p>A: First you have to generate the symbol table. When you include this withyour image you have to copy this (much larger) VxWorks file to your target.When you create a seperate symbol file you must put the vxworks.sym (thesymbol table ) in the same site of the vxworks image. vxworks.sym is createdwhen you build the vxworks image.<br>(From: ilavin@alumnos.uva.es)<p><hr WIDTH="50%"><a NAME="2.3-O"></a><p>Q: After copying the file BOOTROM.SYS to a disk my PC-board does notstart. It only shows <code>VxLd ....... [etc]</code>.<p>A: Verify that the file BOOTROM.SYS is not fragmented from MS-DOS's point ofview. You can verify this with<pre>chkdsk C:\bootrom.sys</pre>(assuming your flash disk has drive letter C)<br>There will be a line at the end of the output, that tells you whether it isor not.<br>If it is fragmented, VxLd loads garbage from disk into memory, 'cause itonly searches for the start of BOOTROM.SYS and reads the following physicalsectors into memory. It's completely random if the system just hangs orcrashes immediately.<br>(From: Werner Schiendl, ws-news@gmx.at)<p><hr WIDTH="60%"><p><h3><a NAME="2.4"><center>2.4 Adding component to your VxWorks configuration</center></a></h3><a NAME="2.4-A"></a>Q: How do I add a new component to my configuration?<p>A: The component structure is defined in the .cdf files, so study thesefirst. Before you start to add your component you should answer 3 questions:<ol TYPE=A><li>During which startup routine should the initialization takeplace? (see prjConfig.c for startup routines)</li><li>Where in the component structure should your component bedefined?</li><li>What items should be visible (and editable) to the usersduring configuration? Also define a constant that should be used to enablethe component.</li></ol>The following actions should be taken after you answered these questions:<ol><li>Create a CDF file for your component. This file can includethe following item (some of these are required):<ul TYPE=DISC><li>NAME: The name of your component, as it should appear in the component list.</li><li>SYNOPSIS: The description of your component.</li> <li>MODULES: The object modules to load.</li><li>INIT_RTN: The routine that should be called to initialize your component</li><li>HDR_FILES: The header file.</li><li>CONFIGLETTES: The source files that define your component. This sourcefile will be included in the prjConfig.c.</li><li>CFG_PARAMS: The configuration parameters. These will appear as defines inthe file prjParams.h. For each of the parameters an extra parameter definitioncan be given. In this item the name, the type and the default value canbe defined</li></ul>Be sure to place the header and source file in a place that will be searched.The CDF file should have the name 00<component name>.cdf. If it is a architectureindependent component place it in target\config\comps\vxWorks, otherwiseplace it in target\comps\vxWorks\arch\<Architecture>.<br>For a good example see the item FOLDER_CLOCK, and follow all the items.</li><li>Find the right InitGroup item in the file 00VxWorks.cdf.This file is located in target/config/comps/vxWorks. Now add the line INCLUDE_<component>at the right place in the list of include statements. Don't forget to adda backslash to this line (or the one above if the component is added atthe end).</li><li>Now find in the file 00VxWorks.cdf or 00BSP.cdf (in the samedirectory) the right folder to put your component. Add don't forget thebackslash.</li></ol>For an example look here:<a href="memDrv.html">Add memDrv as a component</a><p>NOTE: there is probably a better way to define new components using extratools. I don't have these tools so I had to find another way to includemy new components.<p><hr WIDTH="60%"><p><h3><a NAME="2.5"><center>2.5 VME problems</center></a></h3><a NAME="2.5-A"></a>Q: How do I implement VME Bus Auto ID on the MVME-2604 Power PC.The BSP states it supports the VME-64 standard.<p>A: Andrew Fraser wrote some notes about this. This can be found here:<a href="vmeAutoId.html">vmeAutoId.html</a><p><hr WIDTH="50%"><a NAME="2.5-B"></a><p>Q: Is it possible to configure vxWorks so that it makes use of externalVME memory as part of the local memory?<p>A: Your VME-memory should be accessible via standard VME-setup, if not changeyour sysPhysMemDesc[] in sysLib.c and / or your VME-settings parameters.On boot you may add your memory by a call to memAddToPool(). I wouldrecommend to insert this call in function sysHwInit2() in sysLib.c.<br>(From: "Michael Lawnick, Lawnick@softec.de)<p><hr WIDTH="50%"><a NAME="2.5-C"></a><p>Q: Another card on the VME bus is generating a bus error. How can I avoid that my SW will be stoppen by this error?<p>A: I was able to make my own version of VxMemProbe that's a lot faster andrecovers from bus errors. Here's what worked for me:<pre>jmp_buf myEnv;void mySigHandler(int sigNum){ longjmp(myEnv, ERROR);}// Call this once before calling the Probe() routine below.void myByteProbeInit(){ struct sigaction newSig, oldSig; newSig.sa_handler = mySigHandler; newSig.sa_mask = 0; newSig.sa_flags = 0; sigaction(SIGBUS, &newSig, &oldSig); sigaction(SIGSEGV, &newSig, &oldSig);}STATUSmyByteProbe(char *addr, int mode, char *data){ if(setjmp(myEnv) == 0) { if(mode == READ) *data = *addr; else *addr = *data; } else return (ERROR);}</pre>(From: Mark A. Naivar, mnaivar@alvie-mail.lanl.gov)<p><hr WIDTH="60%"><p><h3><a NAME="2.6"><center>2.6 VxWorks environment</center></a></h3><p><hr WIDTH="60%"><p><h4><a NAME="2.6.1"><center>2.6.1 usrSerial.c</center></a></h4><a NAME="2.6.1-A"></a>Q: When I define more than 10 serial lines I only get 10 serial lines.<p>A: There is an error in usrSerial.c, in the function itos. In this functionthere is the following line:<pre> val = val - (val %= 10);</pre>This should be changed into:<pre> val = (val - (val % 10))/10;</pre><p><hr WIDTH="60%"><p><h4><a NAME="2.6.2"><center>2.6.2 prj_vxworks.tcl</center></a></h4><a NAME="2.6.2-A"></a><p>Q: When I create a new bootable project all items in the VxWorks tab aremarked as "not installed". How can I get these back?<p>A: This is caused by the fact that an extra library has been defined inyour BSP Makefile (LIB_EXTRA = ...). The project is generated only with thefirst library to look for the objects needed for the BSP.<br>It is possible to change this. The file where the project is generatedis <em>prj_vxWorks.tcl</em>. This file can be found in <em>host/resource/tcl/app-config-Project</em>.In this file the following changes must be made:<pre>*** prj_vxWorks.tcl-old Mon Jan 24 12:08:26 2000--- prj_vxWorks.tcl Mon Aug 7 14:33:51 2000*** 895,905 **** set wcc [file tail $bspDir] wccCreate $hProj $wcc wccCdfPathSet $hProj $cdfPath foreach lib [bspMakeGet LIBS] {! if {[string match *lib[bspMakeGet CPU]*.a $lib]} {! set mxrLibs [file tail $lib]! break! } } if {![info exists mxrLibs]} { set mxrLibs lib[bspMakeGet CPU][bspMakeGet TOOL]vx.a--- 895,905 ---- set wcc [file tail $bspDir] wccCreate $hProj $wcc wccCdfPathSet $hProj $cdfPath+ set mxrLibs "" foreach lib [bspMakeGet LIBS] {! if {[string match *lib[bspMakeGet CPU]*.a $lib]} {! lappend mxrLibs [file tail $lib]! } } if {![info exists mxrLibs]} { set mxrLibs lib[bspMakeGet CPU][bspMakeGet TOOL]vx.a</pre><p><hr WIDTH="60%"><a NAME="2.7-A"></a><p><h3><a NAME="2.7"><center>2.7 PCI problems</center></a></h3>Q: Information about PCI configuration.<p>A: From James Marshall (james_marshall@agilent.com):<br>I've just broken through into a clearing in the jungle of PCI Configuration& VxWorks on various PC platforms including CompactPCI. Some things I founduseful on the journey:<ol><li>There's a brief WindRiver Technical Note, WTN-49, that talks about some ofthese issues - it's on Windsurf. In particular it covers VME window mapping, ifonly briefly.</li><li>PCI System Architecture by Tom Shanley & Don Anderson, part of the MindShareseries.</li><li>Linux source for PCI configuration. I used the source browser atlxr.linux.no to look at (for example) drivers/pci/pci.c<a href="http://lxr.linux.no/source/drivers/pci/pci.c?v=2.4.0-test7">http://lxr.linux.no/source/drivers/pci/pci.c?v=2.4.0-test7</a>. It lets youclick on identifiers to uncover where they are defined and used.</li><li>For interpreting PCI Config registers, the PCICFG program might help:<a href="http://www.cs.cmu.edu/~ralf/pub-files/rbpci119.zip">http://www.cs.cmu.edu/~ralf/pub-files/rbpci119.zip</a>.</li></ol>The VxWorks PCI show routines aren't included from Project - you need to editconfig.h in your (locally-copied) BSP and define INCLUDE_SHOW_ROUTINES.Unfortunately, this is very coarse-grained and pulls in several other unrelatedshow routines. I guess you could always write a .cdf file to add it to Project.<p>In your driver you would use PCI routines from sysLib [pcPentium]:pciFindDevice() to get the config address (bus,device,function) for eachinstance of your device, then read the appropriate BAR(s) to get theiraddress(es). I guess your master/slave window stuff mentioned in WTN-49 comes inat that point.<p>Note that the PCI Auto Config Library (src/drv/pci/pciAutoConfigLib.c)mentioned in WTN-49 isn't supported on x86 targets because the PCI BIOS (acallable part of the BIOS) is expected to do all PCI configuration before theOS boots. This is why the default setting for PCI_CFG_TYPE on x86 targets isPCI_CFG_NONE.<hr WIDTH="20%">The abocve is no longer true for all BSP's. For example, the CPV5350 BSP doessupport PCI_AUTOCONF. If you enable it then the BSP will re-configure thebus, overriding what the BIOS did.<br>(From: Chris Brand)<hr WIDTH="100%"><p><h3><a NAME="index"><center>Index</center></a></h3><TABLE BORDER=1 CELLSPACING=3><TR><TD VALIGN=TOP><A HREF="#2.1">2.1</A></TD><TD VALIGN=TOP><A HREF="#2.1-A">A</A></TD><TD VALIGN=TOP>Where can I find documentation on how to build a BSP?</TD></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -