redboot_cmds.sgml

来自「ecos实时嵌入式操作系统」· SGML 代码 · 共 1,934 行 · 第 1/5 页

SGML
1,934
字号
Motorola S-record (SREC)format or raw data.      </para>    </refsect1>    <refsect1>      <title>Examples</title>      <para>Download a Motorola S-record (or ELF) image, using <acronym>TFTP</acronym>, specifying the base memory address.<screen>RedBoot> <userinput>load redboot.ROM -b 0x8c400000</userinput>Address offset = 0x0c400000Entry point: 0x80000000, address range: 0x80000000-0x8000fe80</screen>       </para>      <para>Download a Motorola S-record (or ELF) image, using <acronym>HTTP</acronym>, specifying thehost [server] address.<screen>RedBoot> <userinput>load /redboot.ROM -m HTTP -h 192.168.1.104</userinput>Address offset = 0x0c400000Entry point: 0x80000000, address range: 0x80000000-0x8000fe80</screen>       </para>      <para>Load an ELF file from /dev/hda1 which should be an EXT2 partition:<screen>RedBoot> <userinput>load -mode disk hda1:hello.elf</userinput>Entry point: 0x00020000, address range: 0x00020000-0x0002fd70</screen>      </para>    </refsect1>  </refentry><!-- ******** mcmp *************************************************** -->  <refentry id="mcmp-command">    <refnamediv>      <refname>mcmp</refname>      <refpurpose>Compare two segments of memory</refpurpose>    </refnamediv>    <refsynopsisdiv>      <cmdsynopsis>	<command>mcmp</command>	    <arg choice="req">-s <replaceable>location1</replaceable></arg>	    <arg choice="req">-d <replaceable>location1</replaceable></arg>	    <arg choice="req">-l <replaceable>length</replaceable></arg>	  <group>	    <arg>-1</arg>	    <arg>-2</arg>	    <arg>-4</arg>	  </group>      </cmdsynopsis>    </refsynopsisdiv>    <refsect1>      <title>Arguments</title>      <informaltable frame="all">	<tgroup cols="4" colsep="1" rowsep="1" align="left">	  <colspec colname="c1">	  <colspec colname="c2">	  <colspec colname="c3">	  <colspec colname="c4">	  <thead>	    <row>	      <entry>Name</entry>	      <entry>Type</entry>	      <entry>Description</entry>	      <entry>Default</entry>	    </row>	  </thead>	  <tbody>	    <row>	      <entry>-s <replaceable>location1</replaceable></entry>	     	      <entry>Memory address</entry>	      <entry>Location for start of data.</entry>	     	      <entry><emphasis>none</emphasis></entry>	     	    </row>	    <row>	      <entry>-d <replaceable>location2</replaceable></entry>	     	      <entry>Memory address</entry>	      <entry>Location for start of data.</entry>	     	      <entry><emphasis>none</emphasis></entry>	     	    </row>	    <row>	      <entry>-l <replaceable>length</replaceable></entry>	     	      <entry>Number</entry>	      <entry>Length of data</entry>	     	      <entry><emphasis>none</emphasis></entry>	     	    </row>	    <row>	      <entry>-1</entry>	     	      <entry></entry>	      <entry>Access one byte (8 bits) at a time.  Only the least significant 8 bits of the pattern will be used.</entry>	     	      <entry>-4</entry>	     	    </row>	    <row>	      <entry>-2</entry>	     	      <entry></entry>	      <entry>Access two bytes (16 bits) at a time.  Only the least significant 16 bits of the pattern will be used.</entry>	     	      <entry>-4</entry>	     	    </row>	    <row>	      <entry>-4</entry>	     	      <entry></entry>	      <entry>Access one word (32 bits) at a time.</entry>	     	      <entry>-4</entry>	     	    </row>	  </tbody>	</tgroup>      </informaltable>    </refsect1>    <refsect1>      <title>Description</title>	<para>Compares the contents of two ranges of memory (RAM, ROM, FLASH, etc).</para>    </refsect1>    <refsect1>      <title>Examples</title>      <para>Compare two buffers which match (result is <emphasis>quiet</emphasis>).<screen> RedBoot> <userinput>mfill -b 0x100000 -l 0x20 -p 0xDEADFACE</userinput>RedBoot> <userinput>mfill -b 0x200000 -l 0x20 -p 0xDEADFACE</userinput>RedBoot> <userinput>mcmp -s 0x100000 -d 0x200000 -l 0x20</userinput></screen> </para><para>Compare two buffers which don't match.  Only the first non-matching element is displayed.<screen> RedBoot> <userinput>mcmp -s 0x100000 -d 0x200000 -l 0x30 -2</userinput>Buffers don't match - 0x00100020=0x6000, 0x00200020=0x0000</screen>       </para>    </refsect1>  </refentry><!-- ******** mfill *************************************************** -->  <refentry id="mfill-command">    <refnamediv>      <refname>mfill</refname>      <refpurpose>Fill RAM with a specified pattern</refpurpose>    </refnamediv>    <refsynopsisdiv>      <cmdsynopsis>	<command>mfill</command>	    <arg choice="req">-b <replaceable>location</replaceable></arg>	    <arg choice="req">-l <replaceable>length</replaceable></arg>	    <arg choice="req">-p <replaceable>value</replaceable></arg>	  <group>	    <arg>-1</arg>	    <arg>-2</arg>	    <arg>-4</arg>	  </group>      </cmdsynopsis>    </refsynopsisdiv>    <refsect1>      <title>Arguments</title>      <informaltable frame="all">	<tgroup cols="4" colsep="1" rowsep="1" align="left">	  <colspec colname="c1">	  <colspec colname="c2">	  <colspec colname="c3">	  <colspec colname="c4">	  <thead>	    <row>	      <entry>Name</entry>	      <entry>Type</entry>	      <entry>Description</entry>	      <entry>Default</entry>	    </row>	  </thead>	  <tbody>	    <row>	      <entry>-b <replaceable>location</replaceable></entry>	     	      <entry>Memory address</entry>	      <entry>Location in memory for start of data.</entry>	     	      <entry><emphasis>none</emphasis></entry>	     	    </row>	    <row>	      <entry>-l <replaceable>length</replaceable></entry>	     	      <entry>Number</entry>	      <entry>Length of data</entry>	     	      <entry><emphasis>none</emphasis></entry>	     	    </row>	    <row>	      <entry>-p <replaceable>pattern</replaceable></entry>	     	      <entry>Number</entry>	      <entry>Data value to fill with</entry>	     	      <entry>0</entry>	     	    </row>	    <row>	      <entry>-1</entry>	     	      <entry></entry>	      <entry>Access one byte (8 bits) at a time.  Only the least significant 8 bits of the pattern will be used.</entry>	     	      <entry>-4</entry>	     	    </row>	    <row>	      <entry>-2</entry>	     	      <entry></entry>	      <entry>Access two bytes (16 bits) at a time.  Only the least significant 16 bits of the pattern will be used.</entry>	     	      <entry>-4</entry>	     	    </row>	    <row>	      <entry>-4</entry>	     	      <entry></entry>	      <entry>Access one word (32 bits) at a time.</entry>	     	      <entry>-4</entry>	     	    </row>	  </tbody>	</tgroup>      </informaltable>    </refsect1>    <refsect1>      <title>Description</title>	<para>Fills a range of memory with the given pattern.</para>    </refsect1>    <refsect1>      <title>Examples</title>      <para>Fill a buffer with zeros.<screen> RedBoot> <userinput>x -b 0x100000 -l 0x20</userinput>00100000: 00 3E 00 06 00 06 00 06  00 00 00 00 00 00 00 00  |.>..............|00100010: 00 00 00 78 00 70 00 60  00 60 00 60 00 60 00 60  |...x.p.`.`.`.`.`|RedBoot> <userinput>mfill -b 0x100000 -l 0x20</userinput>RedBoot> <userinput>x -b 0x100000 -l 0x20</userinput>00100000: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|00100010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|</screen> </para><para>Fill a buffer with a pattern.<screen> RedBoot> <userinput>mfill -b 0x100000 -l 0x20 -p 0xDEADFACE</userinput>RedBoot> <userinput>x -b 0x100000 -l 0x20</userinput>00100000: CE FA AD DE CE FA AD DE  CE FA AD DE CE FA AD DE  |................|00100010: CE FA AD DE CE FA AD DE  CE FA AD DE CE FA AD DE  |................|</screen>       </para>    </refsect1>  </refentry><!-- ******** ping *************************************************** -->  <refentry id="ping-command">    <refnamediv>      <refname>ping</refname>      <refpurpose>Verify network connectivity</refpurpose>    </refnamediv>    <refsynopsisdiv>      <cmdsynopsis>	<command>ping</command>	<arg>-v </arg>	<arg>-i <replaceable> local_IP_address</replaceable></arg>	<arg>-l <replaceable> length</replaceable></arg>	<arg>-n <replaceable> count</replaceable></arg>	<arg>-t <replaceable> timeout</replaceable></arg>	<arg>-r <replaceable> rate</replaceable></arg>	<arg choice="req">-h <replaceable> server_IP_address</replaceable></arg>      </cmdsynopsis>    </refsynopsisdiv>    <refsect1>      <title>Arguments</title>      <informaltable frame="all">	<tgroup cols="4" colsep="1" rowsep="1" align="left">	  <colspec colname="c1">	  <colspec colname="c2">	  <colspec colname="c3">	  <colspec colname="c4">	  <thead>	    <row>	      <entry>Name</entry>	      <entry>Type</entry>	      <entry>Description</entry>	      <entry>Default</entry>	    </row>	  </thead>	  <tbody>	    <row>	      <entry>-v</entry>	     	      <entry>Boolean</entry>	      <entry>Be verbose, displaying information about each packet sent.</entry>	     	      <entry><emphasis>quiet</emphasis></entry>	     	    </row>	    <row>	      <entry>-n <replaceable>local_IP_address</replaceable></entry>	     	      <entry>Number</entry>	      <entry>Controls the number of packets to be sent.</entry>	     	      <entry>10</entry>	     	    </row>	    <row>	      <entry>-i <replaceable>local_IP_address</replaceable></entry>	     	      <entry>Numeric IP or DNS name</entry>	      <entry>The IP address RedBoot should use.</entry>	     	      <entry>Value set by <command>ip_address</command></entry>	     	    </row>	    <row>	      <entry>-h <replaceable>server_IP_address</replaceable></entry>	     	      <entry>Numeric IP or DNS name</entry>	      <entry>The IP address of the host to contact.</entry>	      <entry><emphasis>none</emphasis></entry>	     	    </row>	    <row>	      <entry>-l <replaceable>length</replaceable></entry>	     	      <entry>Number</entry>	      <entry>The length of the ICMP data payload.</entry>	     	      <entry>64</entry>	     	    </row>	    <row>	      <entry>-r <replaceable>length</replaceable></entry>	     	      <entry>Number</entry>	      <entry>How fast to deliver packets, i.e. time between successive sends.A value of 0 sends packets as quickly as possible.</entry>	     	      <entry>1000ms (1 second)</entry>	     	    </row>	    <row>	      <entry>-t <replaceable>length</replaceable></entry>	     	      <entry>Number</entry>	      <entry>How long to wait for the round-trip to complete, specified in milliseconds.</entry>	     	      <entry>1000ms (1 second)</entry>	     	    </row>	  </tbody>	</tgroup>      </informaltable>    </refsect1>    <refsect1>      <title>Description</title>      <para>The <command>ping</command> command checks the connectivity of the local network by sendingspecial (ICMP) packets to a specific host. These packets should be automaticallyreturned by that host. The command will indicate how many of these round-tripswere successfully completed.       </para>    </refsect1>    <refsect1>      <title>Examples</title>      <para>Test connectivity to host 192.168.1.101.<screen>RedBoot> <userinput>ping -h 192.168.1.101</userinput>Network PING - from 192.168.1.31 to 192.168.1.101PING - received 10 of 10 expected</screen> </para><para>Test connectivity to host 192.168.1.101, with verbose reporting.<screen>RedBoot> <userinput>ping -h 192.168.1.101 -v -n 4</userinput>Network PING - from 192.168.1.31 to 192.168.1.101 seq: 1, time: 1 (ticks) seq: 2, time: 1 (ticks) seq: 3, time: 1 (ticks) seq: 4, time: 1 (ticks)PING - received 10 of 10 expected</screen> </para><para><screen>Test connectivity to a non-existent host (192.168.1.109).RedBoot> <userinput>ping -h 192.168.1.109 -v -n 4</userinput>PING: Cannot reach server '192.168.1.109' (192.168.1.109)</screen>       </para>    </refsect1>  </refentry><!-- ******** reset *************************************************** -->  <refentry id="reset-command">    <refnamediv>      <refname>reset</refname>      <refpurpose>Reset the device</refpurpose>    </refnamediv>    <refsynopsisdiv>      <cmdsynopsis>	<command>reset</command>      </cmdsynopsis>    </refsynopsisdiv>    <refsect1>      <title>Arguments</title><para><emphasis>None</emphasis></para>    </refsect1>    <refsect1>      <title>Description</title>      <para>The <command>reset</command> command causes the target platform to be reset.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?