redboot_cmds.sgml
来自「eCos操作系统源码」· SGML 代码 · 共 1,939 行 · 第 1/5 页
SGML
1,939 行
The <command>load</command> command is used to downloaddata into the target system. Data can be loaded via a network connection,using either the <acronym>TFTP</acronym> or <acronym>HTTP</acronym> protocols, or the console serial connection using theX/Y modem protocol. Files may also be loaded directly from local filesystemson disk. Files to be downloaded may either be executable images in ELF executable program format,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><!-- ******** mcopy *************************************************** --> <refentry id="mcopy-command"> <refnamediv> <refname>mcopy</refname> <refpurpose>Copy memory</refpurpose> </refnamediv> <refsynopsisdiv> <cmdsynopsis> <command>mcopy</command> <arg choice="req">-s <replaceable>source</replaceable></arg> <arg choice="req">-d <replaceable>destination</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 of data to copy.</entry> <entry><emphasis>none</emphasis></entry> </row> <row> <entry>-d <replaceable>location2</replaceable></entry> <entry>Memory address</entry> <entry>Destination for copied 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>Copy one byte (8 bits) at a time.</entry> <entry>-4</entry> </row> <row> <entry>-2</entry> <entry></entry> <entry>Copy two bytes (16 bits) at a time.</entry> <entry>-4</entry> </row> <row> <entry>-4</entry> <entry></entry> <entry>Copy one word (32 bits) at a time.</entry> <entry>-4</entry> </row> </tbody> </tgroup> </informaltable> </refsect1> <refsect1> <title>Description</title> <para>Copies memory (RAM, ROM, FLASH, etc) from one area to another.</para> </refsect1> <refsect1> <title>Examples</title> <para>Copy 16 bits at a time.<screen> RedBoot> <userinput>mfill -b 0x100000 -l 0x20 -2 -p 0xDEAD</userinput>RedBoot> <userinput>mfill -b 0x200000 -l 0x20 -2 -p 0x0</userinput>RedBoot> <userinput>dump -b 0x200000 -l 0x20 -2</userinput>00200000: 0000 0000 0000 0000 0000 0000 0000 000000200010: 0000 0000 0000 0000 0000 0000 0000 0000RedBoot> <userinput>mcopy -s 0x100000 -d 0x200000 -2 -l 0x20</userinput>RedBoot> <userinput>dump -b 0x200000 -l 0x20 -2</userinput>00200000: DEAD DEAD DEAD DEAD DEAD DEAD DEAD DEAD00200010: DEAD DEAD DEAD DEAD DEAD DEAD DEAD DEAD</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>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?