📄 redboot-commands-and-examples.html
字号:
<!-- Copyright (C) 2003 Red Hat, Inc. --><!-- This material may be distributed only subject to the terms --><!-- and conditions set forth in the Open Publication License, v1.0 --><!-- or later (the latest version is presently available at --><!-- http://www.opencontent.org/openpub/). --><!-- Distribution of the work or derivative of the work in any --><!-- standard (paper) book form is prohibited unless prior --><!-- permission is obtained from the copyright holder. --><HTML><HEAD><TITLE>RedBoot Commands and Examples</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos Reference Manual"HREF="ecos-ref.html"><LINKREL="UP"TITLE="RedBoot™ User's Guide"HREF="redboot.html"><LINKREL="PREVIOUS"TITLE="Configuring the RedBoot Environment"HREF="configuring-the-redboot-environment.html"><LINKREL="NEXT"TITLE="Common Commands"HREF="common-commands.html"></HEAD><BODYCLASS="CHAPTER"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos Reference Manual</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="configuring-the-redboot-environment.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="common-commands.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="CHAPTER"><H1><ANAME="REDBOOT-COMMANDS-AND-EXAMPLES">Chapter 2. RedBoot Commands and Examples</H1><DIVCLASS="TOC"><DL><DT><B>Table of Contents</B></DT><DT><AHREF="redboot-commands-and-examples.html#AEN2850">Introduction</A></DT><DT><AHREF="common-commands.html">Common Commands</A></DT><DT><AHREF="flash-image-system.html">Flash Image System (FIS)</A></DT><DT><AHREF="persistent-state-flash.html">Persistent State Flash-based Configuration and Control</A></DT><DT><AHREF="executing-programs.html">Executing Programs from RedBoot</A></DT></DL></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="AEN2850">Introduction</H1><P>RedBoot provides three basic classes of commands: <P></P><UL><LI><P>Program loading and execution</P></LI><LI><P>Flash image and configuration management</P></LI><LI><P>Miscellaneous commands</P></LI></UL>Given the extensible and configurable nature of eCos and RedBoot,there may be extended or enhanced sets of commands available.</P><P>The basic format for commands is: <TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">RedBoot> COMMAND [-S]... [-s val]... operand</PRE></TD></TR></TABLE></P><P>Commands may require additional information beyond the basiccommand name. In most cases this additional information is optional, withsuitable default values provided if they are not present. <DIVCLASS="INFORMALTABLE"><ANAME="AEN2868"><P></P><TABLEBORDER="1"CLASS="CALSTABLE"><THEAD><TR><THWIDTH="33%"ALIGN="LEFT"VALIGN="TOP">Format</TH><THWIDTH="33%"ALIGN="LEFT"VALIGN="TOP">Description</TH><THWIDTH="33%"ALIGN="LEFT"VALIGN="TOP">Example</TH></TR></THEAD><TBODY><TR><TDWIDTH="33%"ALIGN="LEFT"VALIGN="TOP">-S</TD><TDWIDTH="33%"ALIGN="LEFT"VALIGN="TOP">A boolean switch; the behavior of the command will differ, dependingon the presence of the switch. In this example, the <TTCLASS="USERINPUT"><B>-f</B></TT> switchindicates that a complete initialization of the FIS data should be performed.There may be many such switches available for any given command and any or all ofthem may be present, in any order.</TD><TDWIDTH="33%"ALIGN="LEFT"VALIGN="TOP"> <TTCLASS="COMPUTEROUTPUT"> RedBoot> <TTCLASS="USERINPUT"><B>fis init -f</B></TT></TT> </TD></TR><TR><TDWIDTH="33%"ALIGN="LEFT"VALIGN="TOP">-s<TTCLASS="REPLACEABLE"><I> val</I></TT></TD><TDWIDTH="33%"ALIGN="LEFT"VALIGN="TOP">A qualified value; the letter "s" introduces the value, qualifying it's meaning. In theexample, <TTCLASS="USERINPUT"><B>-b 0x100000</B></TT> specifies where the memory dump should begin.There may be many such switches available for any given command and any or all ofthem may be present, in any order.</TD><TDWIDTH="33%"ALIGN="LEFT"VALIGN="TOP"> <TTCLASS="COMPUTEROUTPUT"> RedBoot> <TTCLASS="USERINPUT"><B>dump -b 0x100000 -l 0x20</B></TT></TT> </TD></TR><TR><TDWIDTH="33%"ALIGN="LEFT"VALIGN="TOP"><TTCLASS="REPLACEABLE"><I> operand</I></TT></TD><TDWIDTH="33%"ALIGN="LEFT"VALIGN="TOP">A simple value; some commands require a single parameter for which an additional<TTCLASS="USERINPUT"><B>-X</B></TT> switch would be redundant. In the example, <TTCLASS="USERINPUT"><B>JFFS2</B></TT>is the name of a flash image. The image name is always required, thus is no need to qualify it with a switch.Note that any un-qualified operand must always appear at the end of the command.</TD><TDWIDTH="33%"ALIGN="LEFT"VALIGN="TOP"> <TTCLASS="COMPUTEROUTPUT"> RedBoot> <TTCLASS="USERINPUT"><B>fis delete JFFS2</B></TT></TT> </TD></TR></TBODY></TABLE><P></P></DIV> </P><P>The list of available commands, and their syntax, can be obtained bytyping <BCLASS="COMMAND">help</B> at the command line: <TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">RedBoot> <TTCLASS="USERINPUT"><B>help</B></TT>Manage aliases kept in FLASH memory alias name [value]Set/Query the system console baud rate baudrate [-b <rate>]Manage machine caches cache [ON | OFF]Display/switch console channel channel [-1|<channel number>]Display disk partitions disksDisplay (hex dump) a range of memory dump -b <location> [-l <length>] [-s]Manage flash images fis {cmds}Manage configuration kept in FLASH memory fconfig [-i] [-l] [-n] [-f] [-d] | [-d] nickname [value]Execute code at a location go [-w <timeout>] [entry]Help about help? help [<topic>]Set/change IP addresses ip_address [-l <local_ip_address>] [-h <server_address>]Load a file load [-r] [-v] [-d] [-c <channel>] [-h <host>] [-m {TFTP | HTTP | {x|y}MODEM | disk}] [-b <base_address>] <file_name>Network connectivity test ping [-v] [-n <count>] [-t <timeout>] [-i <IP_addr] -h <host>Reset the system resetDisplay RedBoot version information versionDisplay (hex dump) a range of memory x -b <location> [-l <length>] [-s]</PRE></TD></TR></TABLE></P><P>Commands can be abbreviated to their shortestunique string. Thus in the list above, <BCLASS="COMMAND">d,du,dum</B>and dump are all valid for the <BCLASS="COMMAND">dump</B> command. The <BCLASS="COMMAND">fconfig</B>command can be abbreviated <BCLASS="COMMAND">fc</B>, but <BCLASS="COMMAND">f</B> would be ambiguous with <BCLASS="COMMAND">fis</B>.</P><P>There is one additional, special command. When RedBoot detects '$' or '+'(unless escaped via '\') in a command, it switches to GDB protocol mode. At thispoint, the eCos GDB stubs take over, allowing connections from a GDB host.The only way to get back to RedBoot from GDB mode is to restart the platform.</P><DIVCLASS="NOTE"><BLOCKQUOTECLASS="NOTE"><P><B>NOTE: </B>Multiple commands may be entered on a single line, separated by the semi-colon “;” character.</P></BLOCKQUOTE></DIV><P>The standard RedBoot command set is structured around the bootstrapenvironment. These commands are designed to be simple to use and remember,while still providing sufficient power and flexibility to be useful. No attempthas been made to render RedBoot as the end-all product. As such, things suchas the debug environment are left to other modules, such as GDB stubs, whichare typically included in RedBoot. </P><P>The command set may be also be extended on a platform basis. </P></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="configuring-the-redboot-environment.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-ref.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="common-commands.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Configuring the RedBoot Environment</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="redboot.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Common Commands</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -