URL
https://opencores.org/ocsvn/or1k_old/or1k_old/trunk
Subversion Repositories or1k_old
[/] [or1k_old/] [trunk/] [ecos-2.0/] [doc/] [html/] [ref/] [redboot-commands-and-examples.html] - Rev 1782
Compare with Previous | Blame | View Log
<!-- 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"> <META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ "><LINK REL="HOME" TITLE="eCos Reference Manual" HREF="ecos-ref.html"><LINK REL="UP" TITLE="RedBoot™ User's Guide" HREF="redboot.html"><LINK REL="PREVIOUS" TITLE="Configuring the RedBoot Environment" HREF="configuring-the-redboot-environment.html"><LINK REL="NEXT" TITLE="Common Commands" HREF="common-commands.html"></HEAD ><BODY CLASS="CHAPTER" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >eCos Reference Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="configuring-the-redboot-environment.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="common-commands.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="CHAPTER" ><H1 ><A NAME="REDBOOT-COMMANDS-AND-EXAMPLES">Chapter 2. RedBoot Commands and Examples</H1 ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT ><A HREF="redboot-commands-and-examples.html#AEN2850" >Introduction</A ></DT ><DT ><A HREF="common-commands.html" >Common Commands</A ></DT ><DT ><A HREF="flash-image-system.html" >Flash Image System (FIS)</A ></DT ><DT ><A HREF="persistent-state-flash.html" >Persistent State Flash-based Configuration and Control</A ></DT ><DT ><A HREF="executing-programs.html" >Executing Programs from RedBoot</A ></DT ></DL ></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="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: <TABLE BORDER="5" BGCOLOR="#E0E0F0" WIDTH="70%" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >RedBoot> COMMAND [-S]... [-s val]... operand</PRE ></TD ></TR ></TABLE ></P ><P >Commands may require additional information beyond the basic command name. In most cases this additional information is optional, with suitable default values provided if they are not present. <DIV CLASS="INFORMALTABLE" ><A NAME="AEN2868"><P ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><THEAD ><TR ><TH WIDTH="33%" ALIGN="LEFT" VALIGN="TOP" >Format</TH ><TH WIDTH="33%" ALIGN="LEFT" VALIGN="TOP" >Description</TH ><TH WIDTH="33%" ALIGN="LEFT" VALIGN="TOP" >Example</TH ></TR ></THEAD ><TBODY ><TR ><TD WIDTH="33%" ALIGN="LEFT" VALIGN="TOP" >-S</TD ><TD WIDTH="33%" ALIGN="LEFT" VALIGN="TOP" >A boolean switch; the behavior of the command will differ, depending on the presence of the switch. In this example, the <TT CLASS="USERINPUT" ><B >-f</B ></TT > switch indicates 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 of them may be present, in any order.</TD ><TD WIDTH="33%" ALIGN="LEFT" VALIGN="TOP" > <TT CLASS="COMPUTEROUTPUT" > RedBoot> <TT CLASS="USERINPUT" ><B >fis init -f</B ></TT ></TT > </TD ></TR ><TR ><TD WIDTH="33%" ALIGN="LEFT" VALIGN="TOP" >-s<TT CLASS="REPLACEABLE" ><I > val</I ></TT ></TD ><TD WIDTH="33%" ALIGN="LEFT" VALIGN="TOP" >A qualified value; the letter "s" introduces the value, qualifying it's meaning. In the example, <TT CLASS="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 of them may be present, in any order.</TD ><TD WIDTH="33%" ALIGN="LEFT" VALIGN="TOP" > <TT CLASS="COMPUTEROUTPUT" > RedBoot> <TT CLASS="USERINPUT" ><B >dump -b 0x100000 -l 0x20</B ></TT ></TT > </TD ></TR ><TR ><TD WIDTH="33%" ALIGN="LEFT" VALIGN="TOP" ><TT CLASS="REPLACEABLE" ><I > operand</I ></TT ></TD ><TD WIDTH="33%" ALIGN="LEFT" VALIGN="TOP" >A simple value; some commands require a single parameter for which an additional <TT CLASS="USERINPUT" ><B >-X</B ></TT > switch would be redundant. In the example, <TT CLASS="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 ><TD WIDTH="33%" ALIGN="LEFT" VALIGN="TOP" > <TT CLASS="COMPUTEROUTPUT" > RedBoot> <TT CLASS="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 by typing <B CLASS="COMMAND" >help</B > at the command line: <TABLE BORDER="5" BGCOLOR="#E0E0F0" WIDTH="70%" ><TR ><TD ><PRE CLASS="SCREEN" >RedBoot> <TT CLASS="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 disks Display (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 reset Display RedBoot version information version Display (hex dump) a range of memory x -b <location> [-l <length>] [-s]</PRE ></TD ></TR ></TABLE ></P ><P >Commands can be abbreviated to their shortest unique string. Thus in the list above, <B CLASS="COMMAND" >d,du,dum</B > and dump are all valid for the <B CLASS="COMMAND" >dump</B > command. The <B CLASS="COMMAND" >fconfig</B > command can be abbreviated <B CLASS="COMMAND" >fc</B >, but <B CLASS="COMMAND" >f</B > would be ambiguous with <B CLASS="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 this point, 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 ><DIV CLASS="NOTE" ><BLOCKQUOTE CLASS="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 bootstrap environment. These commands are designed to be simple to use and remember, while still providing sufficient power and flexibility to be useful. No attempt has been made to render RedBoot as the end-all product. As such, things such as the debug environment are left to other modules, such as GDB stubs, which are typically included in RedBoot. </P ><P >The command set may be also be extended on a platform basis. </P ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="configuring-the-redboot-environment.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ecos-ref.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="common-commands.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Configuring the RedBoot Environment</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="redboot.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Common Commands</TD ></TR ></TABLE ></DIV ></BODY ></HTML >