📄 bootlib.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/bootLib.html - generated by refgen from bootLib.c --> <title> bootLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference : OS Libraries</i></a></p></blockquote><h1>bootLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>bootLib</strong> - boot ROM subroutine library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./bootLib.html#bootStringToStruct">bootStringToStruct</a>( )</b> - interpret the boot parameters from the boot line<br><b><a href="./bootLib.html#bootStructToString">bootStructToString</a>( )</b> - construct a boot line<br><b><a href="./bootLib.html#bootParamsShow">bootParamsShow</a>( )</b> - display boot line parameters<br><b><a href="./bootLib.html#bootParamsPrompt">bootParamsPrompt</a>( )</b> - prompt for boot line parameters<br><b><a href="./bootLib.html#bootLeaseExtract">bootLeaseExtract</a>( )</b> - extract the lease information from an Internet address<br><b><a href="./bootLib.html#bootNetmaskExtract">bootNetmaskExtract</a>( )</b> - extract the net mask field from an Internet address<br><b><a href="./bootLib.html#bootBpAnchorExtract">bootBpAnchorExtract</a>( )</b> - extract a backplane address from a device field<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library contains routines for manipulating a boot line.Routines are provided to interpret, construct, print, and prompt fora boot line.<p>When VxWorks is first booted, certain parameters can be specified,such as network addresses, boot device, host, and start-up file.This information is encoded into a single ASCII string known as the boot line.The boot line is placed at a known address (specified in <b>config.h</b>)by the boot ROMs so that the system being booted can discover the parametersthat were used to boot the system.The boot line is the only means of communication from the boot ROMs tothe booted system.<p>The boot line is of the form:<pre>bootdev(unitnum,procnum)hostname:filename e=# b=# h=# g=# u=userid pw=passwd f=#tn=targetname s=startupscript o=other</pre>where:<dl><dt><i>bootdev</i><dd>the boot device (required); for example, "ex" for Excelan Ethernet, "bp" for backplane. For the backplane, this field can have an optional anchoraddress specification of the form "bp=<i>adrs</i>" (see <b><a href="./bootLib.html#bootBpAnchorExtract">bootBpAnchorExtract</a>( )</b>).<dt><i>unitnum</i><dd>the unit number of the boot device (0..n).<dt><i>procnum</i><dd>the processor number on the backplane, 0..n (required for VME boards).<dt><i>hostname</i><dd>the name of the boot host (required).<dt><i>filename</i><dd>the file to be booted (required).<dt><b>e</b><dd>the Internet address of the Ethernet interface.This field can have an optional subnet maskof the form <i>inet_adrs</i>:<i>subnet_mask</i>. If DHCPis used to obtain the configuration parameters,lease timing information may also be present.This information takes the form <i>lease_duration</i>:<i>lease_origin</i>and is appended to the end of the field.(see <b><a href="./bootLib.html#bootNetmaskExtract">bootNetmaskExtract</a>( )</b> and <b><a href="./bootLib.html#bootLeaseExtract">bootLeaseExtract</a>( )</b>).<dt><b>b</b><dd>the Internet address of the backplane interface.This field can have an optional subnet maskand/or lease timing information as "e".<dt><b>h</b><dd>the Internet address of the boot host.<dt><b>g</b><dd>the Internet address of the gateway to the boot host.Leave this parameter blank if the host is on same network.<dt><b>u</b><dd>a valid user name on the boot host.<dt><b>pw</b><dd>the password for the user on the host.This parameter is usually left blank.If specified, FTP is used for file transfers.<dt><b>f</b><dd>the system-dependent configuration flags.This parameter contains an <b>or</b> of option bits defined in<b>sysLib.h</b>.<dt><b>tn</b><dd>the name of the system being booted<dt><b>s</b><dd>the name of a file to be executed as a start-up script.<dt><b>o</b><dd>"other" string for use by the application.</dl>The Internet addresses are specified in "dot" notation (e.g., 90.0.0.2).The order of assigned values is arbitrary.<p></blockquote><h4>EXAMPLE</h4><blockquote><p><pre>enp(0,0)host:/usr/wpwr/target/config/mz7122/vxWorks e=90.0.0.2 b=91.0.0.2 h=100.0.0.4 g=90.0.0.3 u=bob pw=realtime f=2 tn=target s=host:/usr/bob/startup o=any_string</pre></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>bootLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p>bootConfig<hr><a name="bootStringToStruct"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>bootStringToStruct( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>bootStringToStruct( )</strong> - interpret the boot parameters from the boot line</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>char *bootStringToStruct ( char * bootString, /* boot line to be parsed */ BOOT_PARAMS * pBootParams /* where to return parsed boot line */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine parses the ASCII string and returns the values intothe provided parameters.<p>For a description of the format of the boot line, see the manual entry for <b><a href="./bootLib.html#top">bootLib</a></b> <p></blockquote><h4>RETURNS</h4><blockquote><p><p>A pointer to the last character successfully parsed plus one(points to EOS, if OK). The entire boot line is parsed.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./bootLib.html#top">bootLib</a></b><hr><a name="bootStructToString"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>bootStructToString( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>bootStructToString( )</strong> - construct a boot line</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS bootStructToString ( char * paramString, /* where to return the encoded boot line */ BOOT_PARAMS * pBootParams /* boot line structure to be encoded */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine encodes a boot line using the specified boot parameters.<p>For a description of the format of the boot line, see the manual entry for <b><a href="./bootLib.html#top">bootLib</a></b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./bootLib.html#top">bootLib</a></b><hr><a name="bootParamsShow"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -