]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/redboot/v2_0/doc/redboot_cmds.sgml
11fc2de7ee360036b35932cff3f67c9ba17f2f5c
[karo-tx-redboot.git] / packages / redboot / v2_0 / doc / redboot_cmds.sgml
1 <!-- {{{ Banner                         -->
2
3 <!-- =============================================================== -->
4 <!--                                                                 -->
5 <!--     redboot_cmds.sgml                                           -->
6 <!--                                                                 -->
7 <!--     Documentation for RedBoot Commands                          -->
8 <!--                                                                 -->
9 <!-- =============================================================== -->
10 <!-- ####COPYRIGHTBEGIN####                                          -->
11 <!--                                                                 -->
12 <!-- =============================================================== -->
13 <!-- Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.  -->
14 <!-- This material may be distributed only subject to the terms      -->
15 <!-- and conditions set forth in the Open Publication License, v1.0  -->
16 <!-- or later (the latest version is presently available at          -->
17 <!-- http://www.opencontent.org/openpub/)                            -->
18 <!-- Distribution of the work or derivative of the work in any       -->
19 <!-- standard (paper) book form is prohibited unless prior           -->
20 <!-- permission obtained from the copyright holder                   -->
21 <!-- =============================================================== -->
22 <!--                                                                 -->      
23 <!-- ####COPYRIGHTEND####                                            -->
24 <!-- =============================================================== -->
25 <!-- #####DESCRIPTIONBEGIN####                                       -->
26 <!--                                                                 -->
27 <!-- ####DESCRIPTIONEND####                                          -->
28 <!-- =============================================================== -->
29
30 <!-- }}} -->
31
32 <chapter id="RedBoot-Commands-and-Examples">
33 <title>RedBoot Commands and Examples</title>
34 <sect1>
35 <title>Introduction</title>
36 <para><indexterm><primary>RedBoot</primary><secondary>commands and examples
37 </secondary></indexterm><indexterm><primary>commands and examples</primary>
38 </indexterm>RedBoot provides three basic classes of commands:    <itemizedlist>
39 <listitem><para>Program loading and execution</para>
40 </listitem>
41 <listitem><para>Flash image and configuration management</para>
42 </listitem>
43 <listitem><para>Miscellaneous commands</para>
44 </listitem>
45 </itemizedlist>Given the extensible and configurable nature of eCos and RedBoot,
46 there may be extended or enhanced sets of commands available.</para>
47 <para>The basic format for commands is:    <programlisting>RedBoot> COMMAND [-S]... [-s val]... operand
48 </programlisting>
49 </para>
50 <para>
51 Commands may require additional information beyond the basic
52 command name. In most cases this additional information is optional, with
53 suitable default values provided if they are not present. 
54
55       <informaltable frame="all">
56         <tgroup cols="3" colsep="1" rowsep="1" align="left">
57           <colspec colname="c1">
58           <colspec colname="c2">
59           <colspec colname="c3">
60           <thead>
61             <row>
62               <entry>Format</entry>
63               <entry>Description</entry>
64               <entry>Example</entry>
65             </row>
66           </thead>
67           <tbody>
68             <row>
69               <entry>-S</entry>      
70               <entry>A boolean switch; the behavior of the command will differ, depending
71 on the presence of the switch.  In this example, the <userinput>-f</userinput> switch
72 indicates that a complete initialization of the FIS data should be performed.
73 There may be many such switches available for any given command and any or all of
74 them may be present, in any order.</entry>
75               <entry>
76                 <computeroutput> RedBoot> <userinput>fis init -f</userinput></computeroutput>
77               </entry>       
78             </row>
79             <row>
80               <entry>-s<replaceable> val</replaceable></entry>       
81               <entry>A qualified value; the letter "s" introduces the value, qualifying it's meaning.  In the
82 example, <userinput>-b 0x100000</userinput> specifies where the memory dump should begin.
83 There may be many such switches available for any given command and any or all of
84 them may be present, in any order.
85 </entry>
86               <entry>
87                 <computeroutput> RedBoot> <userinput>dump -b 0x100000 -l 0x20</userinput></computeroutput>
88               </entry>       
89             </row>
90             <row>
91               <entry><replaceable> operand</replaceable></entry>             
92               <entry>A simple value; some commands require a single parameter for which an additional
93 <userinput>-X</userinput> switch would be redundant.  In the example, <userinput>JFFS2</userinput>
94 is the name of a flash image.  The image name is always required, thus is no need to qualify it with 
95 a switch.
96 Note that any un-qualified operand must always appear at the end of the command.</entry>
97               <entry>
98                 <computeroutput> RedBoot> <userinput>fis delete JFFS2</userinput></computeroutput>
99               </entry>       
100             </row>
101           </tbody>
102         </tgroup>
103       </informaltable>
104
105 </para>
106 <para>The list of available commands, and their syntax, can be obtained by
107 typing <command>help</command> at the command line:    
108 <screen>
109 RedBoot> <userinput>help</userinput>
110 Manage aliases kept in FLASH memory
111       alias name [value]
112 Set/Query the system console baud rate
113       baudrate [-b &lt;rate>]
114 Manage machine caches
115       cache [ON | OFF]
116 Display/switch console channel
117       channel [-1|&lt;channel number>]
118 Display disk partitions
119       disks
120 Display (hex dump) a range of memory
121       dump -b &lt;location> [-l &lt;length>] [-s]
122 Manage flash images
123       fis {cmds}
124 Manage configuration kept in FLASH memory
125       fconfig [-i] [-l] [-n] [-f] [-d] | [-d] nickname [value]
126 Execute code at a location
127       go [-w &lt;timeout>] [-c] [-n] [entry]
128 Help about help?
129       help [&lt;topic>]
130 Set/change IP addresses
131       ip_address [-l &lt;local_ip_address>[/&lt;mask_length>]] [-h &lt;server_address>]
132 Load a file
133       load [-r] [-v] [-d] [-c &lt;channel>] [-h &lt;host>] [-m {TFTP | HTTP | {x|y}MODEM | disk}]
134       [-b &lt;base_address>] &lt;file_name>
135 Network connectivity test
136       ping [-v] [-n &lt;count>] [-t &lt;timeout>] [-i &lt;IP_addr]
137       -h &lt;host>
138 Reset the system
139       reset
140 Display RedBoot version information
141       version
142 Display (hex dump) a range of memory
143       x -b &lt;location> [-l &lt;length>] [-s]
144 </screen>
145 </para>
146 <para>
147 Commands can be abbreviated to their shortest
148 unique string. Thus in the list above, <command>d,du,dum</command>
149 and dump are all valid for the <command>dump</command> command. The <command>fconfig</command>
150 command can be abbreviated <command>fc</command>, but 
151 <command>f</command> would be ambiguous with <command>fis</command>.
152 </para>
153 <para>There is one additional, special command. When RedBoot detects '$' or '+'
154 (unless escaped via '\') in a command, it switches to GDB protocol mode. At this
155 point, the eCos GDB stubs take over, allowing connections from a GDB host.
156 The only way to get back to RedBoot from GDB mode is to restart the platform.
157 </para>
158 <note><title>NOTE</title>
159 <para>
160 Multiple commands may be entered on a single line, separated by the semi-colon &ldquo;;&rdquo; character.
161 </para>
162 </note>
163 <para>The standard RedBoot command set is structured around the bootstrap
164 environment. These commands are designed to be simple to use and remember,
165 while still providing sufficient power and flexibility to be useful. No attempt
166 has been made to render RedBoot as the end-all product. As such, things such
167 as the debug environment are left to other modules, such as GDB stubs, which
168 are typically included in RedBoot. </para>
169 <para>The command set may be also be extended on a platform basis. </para>
170 </sect1>
171
172 <sect1 id="common-commands">
173 <title>Common Commands</title>
174 <para>
175   <indexterm><primary>commands</primary><secondary>common</secondary>
176   </indexterm>
177 </para>
178
179 <!-- ******** alias *************************************************** -->
180   <refentry id="alias-command">
181     <refnamediv>
182       <refname>alias</refname>
183       <refpurpose>Manipulate command line aliases</refpurpose>
184     </refnamediv>
185     <refsynopsisdiv>
186       <cmdsynopsis>
187         <command>alias</command>
188         <arg choice="req"><replaceable> name</replaceable></arg>
189         <arg><replaceable> value</replaceable></arg>
190       </cmdsynopsis>
191     </refsynopsisdiv>
192     <refsect1>
193       <title>Arguments</title>
194       <informaltable frame="all">
195         <tgroup cols="4" colsep="1" rowsep="1" align="left">
196           <colspec colname="c1">
197           <colspec colname="c2">
198           <colspec colname="c3">
199           <colspec colname="c4">
200           <thead>
201             <row>
202               <entry>Name</entry>
203               <entry>Type</entry>
204               <entry>Description</entry>
205               <entry>Default</entry>
206             </row>
207           </thead>
208           <tbody>
209             <row>
210               <entry><replaceable>name</replaceable></entry>         
211               <entry>Name</entry>
212               <entry>The name for this alias.</entry>        
213               <entry><emphasis>none</emphasis></entry>       
214             </row>
215             <row>
216               <entry><replaceable>value</replaceable></entry>        
217               <entry>String</entry>
218               <entry>Replacement value for the alias.</entry>        
219               <entry><emphasis>none</emphasis></entry>       
220             </row>
221           </tbody>
222         </tgroup>
223       </informaltable>
224     </refsect1>
225     <refsect1>
226       <title>Description</title>
227       <para>The <command>alias</command> command is used to maintain simple command
228 line aliases.  These aliases are shorthand for longer expressions.
229 When the pattern %{name} appears in a command line, including in a script,
230 the corresponding value will be substituted.  Aliases may be nested.
231       </para>
232       <para>
233 If no value is provided, then the current value of the alias is displayed.
234       </para>
235       <para>
236 If the system supports non-volatile configuration data via the 
237 <command>fconfig</command> command (see <xref linkend="Persistent-State-Flash">),
238 then the value will be saved and used when the system is reset.
239       </para>
240     </refsect1>
241     <refsect1>
242       <title>Examples</title>
243       <para>
244 Set an alias.
245 <screen> 
246 RedBoot> <userinput>alias joe "This is Joe"</userinput>
247 Update RedBoot non-volatile configuration - continue (y/n)? n
248 </screen> 
249 </para>
250 <para>
251 Display an alias.
252 <screen> 
253 RedBoot> <userinput>alias joe</userinput>
254 'joe' = 'This is Joe'
255 </screen> 
256 </para>
257 <para>
258 Use an alias.  Note: the <command>"="</command> command simply echoes the command to to console.
259 <screen> 
260 RedBoot> <userinput>= %{joe}</userinput>
261 This is Joe
262 </screen>
263 </para>
264 <para>
265 Aliases can be nested.
266 <screen>
267 RedBoot> <userinput>alias frank "Who are you? %{joe}"</userinput>
268 Update RedBoot non-volatile configuration - continue (y/n)? n
269 RedBoot> <userinput>= %{frank}</userinput>
270 Who are you? This is Joe
271 </screen>
272 </para>
273 <para>
274 Notice how the value of %{frank} changes when %{joe} is changed since
275 the value of %{joe} is not evaluated until %{frank} is evaluated.
276 <screen>
277 RedBoot> <userinput>alias joe "This is now Josephine"</userinput>
278 Update RedBoot non-volatile configuration - continue (y/n)? n
279 RedBoot> <userinput>= %{frank}</userinput>
280 Who are you? This is now Josephine
281 </screen>
282       </para>
283     </refsect1>
284   </refentry>
285
286 <!-- ******** baudrate *************************************************** -->
287   <refentry id="baudrate-command">
288     <refnamediv>
289       <refname>baudrate</refname>
290       <refpurpose>Set the baud rate for the system serial console</refpurpose>
291     </refnamediv>
292     <refsynopsisdiv>
293       <cmdsynopsis>
294         <command>baudrate</command>
295         <arg>-b<replaceable> rate</replaceable></arg>
296       </cmdsynopsis>
297     </refsynopsisdiv>
298     <refsect1>
299       <title>Arguments</title>
300       <informaltable frame="all">
301         <tgroup cols="4" colsep="1" rowsep="1" align="left">
302           <colspec colname="c1">
303           <colspec colname="c2">
304           <colspec colname="c3">
305           <colspec colname="c4">
306           <thead>
307             <row>
308               <entry>Name</entry>
309               <entry>Type</entry>
310               <entry>Description</entry>
311               <entry>Default</entry>
312             </row>
313           </thead>
314           <tbody>
315             <row>
316               <entry>-b <replaceable>rate</replaceable></entry>      
317               <entry>Number</entry>
318               <entry>The baud rate to use for the serial console.</entry>            
319               <entry><emphasis>none</emphasis></entry>       
320             </row>
321           </tbody>
322         </tgroup>
323       </informaltable>
324     </refsect1>
325     <refsect1>
326       <title>Description</title>
327       <para>The <command>baudrate</command> command sets the baud rate for the system serial console.
328       </para>
329       <para>
330 If no value is provided, then the current value of the console baud rate is displayed.
331       </para>
332       <para>
333 If the system supports non-volatile configuration data via the 
334 <command>fconfig</command> command (see <xref linkend="Persistent-State-Flash">),
335 then the value will be saved and used when the system is reset.
336       </para>
337     </refsect1>
338     <refsect1>
339       <title>Examples</title>
340       <para>
341 Show the current baud rate.
342 <screen> 
343 RedBoot> <userinput>baudrate</userinput>
344 Baud rate = 38400
345 </screen> 
346 </para>
347 <para>
348 Change the console baud rate.  In order to make this operation safer,
349 there will be a slight pause after the
350 first message to give you time to change to the new baud rate.
351 If it doesn't work, or a less than affirmative answer is given to the 
352 "continue" prompt, then the baud rate will revert to the current value.
353 Only after the baud rate has been firmly established will <emphasis>RedBoot</emphasis>
354 give you an opportunity to save the value in persistent storage.
355 <screen> 
356 RedBoot> <userinput>baudrate -b 57600</userinput>
357 Baud rate will be changed to 57600 - update your settings
358 <emphasis>Device baud rate changed at this point</emphasis>
359 Baud rate changed to 57600 - continue (y/n)? y
360 Update RedBoot non-volatile configuration - continue (y/n)? n
361 </screen> 
362       </para>
363     </refsect1>
364   </refentry>
365
366 <!-- ******** cache *************************************************** -->
367   <refentry id="cache-command">
368     <refnamediv>
369       <refname>cache</refname>
370       <refpurpose>Control hardware caches</refpurpose>
371     </refnamediv>
372     <refsynopsisdiv>
373       <cmdsynopsis>
374         <command>cache</command>
375         <group>
376           <arg>on</arg>
377           <arg>off</arg>
378         </group>
379       </cmdsynopsis>
380     </refsynopsisdiv>
381     <refsect1>
382       <title>Arguments</title>
383       <informaltable frame="all">
384         <tgroup cols="4" colsep="1" rowsep="1" align="left">
385           <colspec colname="c1">
386           <colspec colname="c2">
387           <colspec colname="c3">
388           <colspec colname="c4">
389           <thead>
390             <row>
391               <entry>Name</entry>
392               <entry>Type</entry>
393               <entry>Description</entry>
394               <entry>Default</entry>
395             </row>
396           </thead>
397           <tbody>
398             <row>
399               <entry>on</entry>      
400               <entry></entry>
401               <entry>Turn the caches on</entry>      
402               <entry><emphasis>none</emphasis></entry>       
403             </row>
404             <row>
405               <entry>off</entry>             
406               <entry></entry>
407               <entry>Turn the caches off</entry>             
408               <entry><emphasis>none</emphasis></entry>       
409             </row>
410           </tbody>
411         </tgroup>
412       </informaltable>
413     </refsect1>
414     <refsect1>
415       <title>Description</title>
416       <para>The <command>cache</command> command is used to manipulate the caches on the processor. </para>
417       <para>With no options, this command specifies the state of the system caches.</para>
418       <para>When an option is given, the caches are turned off or on appropriately.</para>
419     </refsect1>
420     <refsect1>
421       <title>Examples</title>
422       <para>
423 Show the current cache state.
424 <screen> 
425 RedBoot> <userinput>cache</userinput>
426 Data cache: On, Instruction cache: On
427 </screen> 
428 </para>
429 <para>
430 Disable the caches.
431 <screen> 
432 RedBoot> <userinput>cache off</userinput>
433 RedBoot> <userinput>cache</userinput>
434 Data cache: Off, Instruction cache: Off
435 </screen> 
436 </para>
437 <para>
438 Enable the caches.
439 <screen> 
440 RedBoot> <userinput>cache on</userinput>
441 RedBoot> <userinput>cache</userinput>
442 Data cache: On, Instruction cache: On
443 </screen> 
444       </para>
445     </refsect1>
446   </refentry>
447
448 <!-- ******** channel *************************************************** -->
449   <refentry id="channel-command">
450     <refnamediv>
451       <refname>channel</refname>
452       <refpurpose>Select the system console channel</refpurpose>
453     </refnamediv>
454     <refsynopsisdiv>
455       <cmdsynopsis>
456         <command>channel</command>
457         <group>
458           <arg>-1</arg>
459           <arg><replaceable>channel_number</replaceable></arg>
460         </group>
461       </cmdsynopsis>
462     </refsynopsisdiv>
463     <refsect1>
464       <title>Arguments</title>
465       <informaltable frame="all">
466         <tgroup cols="4" colsep="1" rowsep="1" align="left">
467           <colspec colname="c1">
468           <colspec colname="c2">
469           <colspec colname="c3">
470           <colspec colname="c4">
471           <thead>
472             <row>
473               <entry>Name</entry>
474               <entry>Type</entry>
475               <entry>Description</entry>
476               <entry>Default</entry>
477             </row>
478           </thead>
479           <tbody>
480             <row>
481               <entry>-1</entry>      
482               <entry></entry>
483               <entry>Reset the console channel</entry>       
484               <entry><emphasis>none</emphasis></entry>       
485             </row>
486             <row>
487               <entry>channel_number</entry>          
488               <entry>Number</entry>
489               <entry>Select a channel</entry>        
490               <entry><emphasis>none</emphasis></entry>       
491             </row>
492           </tbody>
493         </tgroup>
494       </informaltable>
495     </refsect1>
496     <refsect1>
497       <title>Description</title>
498       <para>
499 With no arguments, the <command>channel</command> command displays the current console channel number.
500 </para><para>
501 When passed an argument of 0 upward, this command switches the console
502 channel to that channel number. The mapping between channel numbers and
503 physical channels is platform specific but will typically be something like
504 channel 0 is the first serial port, channel 1 is the second, etc.
505 </para><para>
506 When passed an argument of -1, this command reverts RedBoot to responding
507 to whatever channel receives input first, as happens when RedBoot initially
508 starts execution.
509 </para>
510     </refsect1>
511     <refsect1>
512       <title>Examples</title>
513       <para>
514 Show the current channel.
515 <screen> 
516 RedBoot> <userinput>channel</userinput>
517 Current console channel id: 0
518 </screen> 
519 </para>
520 <para>
521 Change to an invalid channel.
522 <screen> 
523 RedBoot> <userinput>channel 99</userinput>
524 **Error: bad channel number '99'
525 </screen> 
526 </para>
527 <para>
528 Revert to the default channel setting (any console mode).
529 <screen> 
530 RedBoot> <userinput>channel -1</userinput>
531 </screen> 
532       </para>
533     </refsect1>
534   </refentry>
535
536 <!-- ******** cksum *************************************************** -->
537   <refentry id="cksum-command">
538     <refnamediv>
539       <refname>cksum</refname>
540       <refpurpose>Compute POSIX checksums</refpurpose>
541     </refnamediv>
542     <refsynopsisdiv>
543       <cmdsynopsis>
544         <command>cksum</command>
545             <arg choice="req">-b <replaceable>location</replaceable></arg>
546             <arg choice="req">-l <replaceable>length</replaceable></arg>
547       </cmdsynopsis>
548     </refsynopsisdiv>
549     <refsect1>
550       <title>Arguments</title>
551       <informaltable frame="all">
552         <tgroup cols="4" colsep="1" rowsep="1" align="left">
553           <colspec colname="c1">
554           <colspec colname="c2">
555           <colspec colname="c3">
556           <colspec colname="c4">
557           <thead>
558             <row>
559               <entry>Name</entry>
560               <entry>Type</entry>
561               <entry>Description</entry>
562               <entry>Default</entry>
563             </row>
564           </thead>
565           <tbody>
566             <row>
567               <entry>-b <replaceable>location</replaceable></entry>          
568               <entry>Memory address</entry>
569               <entry>Location in memory for stat of data.</entry>            
570               <entry><emphasis>none</emphasis></entry>       
571             </row>
572             <row>
573               <entry>-l <replaceable>length</replaceable></entry>            
574               <entry>Number</entry>
575               <entry>Length of data</entry>          
576               <entry><emphasis>none</emphasis></entry>       
577             </row>
578           </tbody>
579         </tgroup>
580       </informaltable>
581     </refsect1>
582     <refsect1>
583       <title>Description</title>
584           <para>Computes the POSIX checksum on a range of memory (either RAM or FLASH).
585 The values printed (decimal cksum, decimal length, hexadecimal cksum,
586           hexadecimal length) can be compared with the output from the Linux program 'cksum'.
587 </para>
588     </refsect1>
589     <refsect1>
590       <title>Examples</title>
591       <para>
592 Checksum a buffer.
593 <screen> 
594 RedBoot> <userinput>cksum -b 0x100000 -l 0x100</userinput>
595 POSIX cksum = 3286483632 256 (0xc3e3c2b0 0x00000100)
596 </screen> 
597       </para>
598       <para>
599 Checksum an area of memory after loading a file. Note that the base
600 address and length parameters are provided by the preceding
601 load command.
602 <screen> 
603 RedBoot> <userinput>load -r -b %{FREEMEMLO} redboot.bin</userinput>
604 Raw file loaded 0x06012800-0x0602f0a8
605 RedBoot> <userinput>cksum</userinput>
606 Computing cksum for area 0x06012800-0x0602f0a8
607 POSIX cksum = 2092197813 116904 (0x7cb467b5 0x0001c8a8)
608 </screen> 
609       </para>
610     </refsect1>
611   </refentry>
612
613 <!-- ******** disks *************************************************** -->
614   <refentry id="disks-command">
615     <refnamediv>
616       <refname>disks</refname>
617       <refpurpose>List available disk partitions.</refpurpose>
618     </refnamediv>
619     <refsynopsisdiv>
620       <cmdsynopsis>
621         <command>disks</command>
622       </cmdsynopsis>
623     </refsynopsisdiv>
624     <refsect1>
625       <title>Arguments</title>
626 <para>None.</para>
627     </refsect1>
628     <refsect1>
629       <title>Description</title>
630         <para>The <command>disks</command> command is used to list disk partitions recognized by RedBoot.</para>
631     </refsect1>
632     <refsect1>
633       <title>Examples</title>
634       <para>
635 Show what disk partitions are available.
636 <screen> 
637 RedBoot> <userinput>disks</userinput>
638 hda1     Linux Swap
639 hda2     Linux
640 00100000: 00 3E 00 06 00 06 00 06  00 00 00 00 00 00 00 00  |.>..............|
641 00100010: 00 00 00 78 00 70 00 60  00 60 00 60 00 60 00 60  |...x.p.`.`.`.`.`|
642 </screen> 
643       </para>
644     </refsect1>
645   </refentry>
646
647 <!-- ******** dump *************************************************** -->
648   <refentry id="dump-command">
649     <refnamediv>
650       <refname>dump</refname>
651       <refpurpose>Display memory.</refpurpose>
652     </refnamediv>
653     <refsynopsisdiv>
654       <cmdsynopsis>
655         <command>dump</command>
656             <arg choice="req">-b <replaceable>location</replaceable></arg>
657             <arg>-l <replaceable>length</replaceable></arg>
658             <arg>-s</arg>
659           <group>
660             <arg>-1</arg>
661             <arg>-2</arg>
662             <arg>-4</arg>
663           </group>
664       </cmdsynopsis>
665     </refsynopsisdiv>
666     <refsect1>
667       <title>Arguments</title>
668       <informaltable frame="all">
669         <tgroup cols="4" colsep="1" rowsep="1" align="left">
670           <colspec colname="c1">
671           <colspec colname="c2">
672           <colspec colname="c3">
673           <colspec colname="c4">
674           <thead>
675             <row>
676               <entry>Name</entry>
677               <entry>Type</entry>
678               <entry>Description</entry>
679               <entry>Default</entry>
680             </row>
681           </thead>
682           <tbody>
683             <row>
684               <entry>-b <replaceable>location</replaceable></entry>          
685               <entry>Memory address</entry>
686               <entry>Location in memory for start of data.</entry>           
687               <entry><emphasis>none</emphasis></entry>       
688             </row>
689             <row>
690               <entry>-l <replaceable>length</replaceable></entry>            
691               <entry>Number</entry>
692               <entry>Length of data</entry>          
693               <entry>32</entry>      
694             </row>
695             <row>
696               <entry>-s</entry>      
697               <entry>Boolean</entry>
698               <entry>Format data using Motorola S-records.</entry>           
699               <entry></entry>        
700             </row>
701             <row>
702               <entry>-1</entry>      
703               <entry></entry>
704               <entry>Access one byte (8 bits) at a time.  
705 Only the least significant 8 bits of the pattern will be used.</entry>       
706               <entry>-1</entry>      
707             </row>
708             <row>
709               <entry>-2</entry>      
710               <entry></entry>
711               <entry>Access two bytes (16 bits) at a time.  
712 Only the least significant 16 bits of the pattern will be used.</entry>      
713               <entry>-1</entry>      
714             </row>
715             <row>
716               <entry>-4</entry>      
717               <entry></entry>
718               <entry>Access one word (32 bits) at a time.</entry>            
719               <entry>-1</entry>      
720             </row>
721           </tbody>
722         </tgroup>
723       </informaltable>
724     </refsect1>
725     <refsect1>
726       <title>Description</title>
727         <para>Display a range of memory on the system console.</para>
728         <para>The <command>x</command> is a synonym for <command>dump</command>.</para>
729         <para>Note that this command could
730 be detrimental if used on memory mapped hardware registers. </para>
731         <para>The memory is displayed at most sixteen bytes per line, first as the
732 raw hex value, followed by an ASCII interpretation of the data. </para>
733     </refsect1>
734     <refsect1>
735       <title>Examples</title>
736       <para>
737 Display a buffer, one byte at a time.
738 <screen> 
739 RedBoot> <userinput>mfill -b 0x100000 -l 0x20 -p 0xDEADFACE</userinput>
740 RedBoot> <userinput>x -b 0x100000</userinput>
741 00100000: CE FA AD DE CE FA AD DE  CE FA AD DE CE FA AD DE  |................|
742 00100010: CE FA AD DE CE FA AD DE  CE FA AD DE CE FA AD DE  |................|
743 </screen> 
744 </para>
745 <para>
746 Display a buffer, one short (16 bit) word at a time.  Note in this case that
747 the ASCII interpretation is suppressed.
748 <screen> 
749 RedBoot> <userinput>dump -b 0x100000 -2</userinput>
750 00100000: FACE DEAD FACE DEAD  FACE DEAD FACE DEAD 
751 00100010: FACE DEAD FACE DEAD  FACE DEAD FACE DEAD 
752 </screen> 
753 </para>
754 <para>
755 Display a buffer, one word (32 bit) word at a time.  Note in this case that
756 the ASCII interpretation is suppressed.
757 <screen> 
758 RedBoot> <userinput>dump -b 0x100000 -4</userinput>
759 00100000: DEADFACE DEADFACE DEADFACE DEADFACE 
760 00100010: DEADFACE DEADFACE DEADFACE DEADFACE 
761 </screen> 
762 </para>
763 <para>
764 Display the same buffer, using Motorola S-record format.
765 <screen> 
766 RedBoot> <userinput>dump -b 0x100000 -s</userinput>
767 S31500100000CEFAADDECEFAADDECEFAADDECEFAADDE8E
768 S31500100010CEFAADDECEFAADDECEFAADDECEFAADDE7E
769 </screen> 
770 </para>
771 <para>
772 Display a buffer, with visible ASCII strings.
773 <screen> 
774 RedBoot> <userinput>d -b 0xfe00b000 -l 0x80</userinput>
775 0xFE00B000: 20 25 70 0A 00 00 00 00  41 74 74 65 6D 70 74 20 | %p.....Attempt |
776 0xFE00B010: 74 6F 20 6C 6F 61 64 20  53 2D 72 65 63 6F 72 64 |to load S-record|
777 0xFE00B020: 20 64 61 74 61 20 74 6F  20 61 64 64 72 65 73 73 | data to address|
778 0xFE00B030: 3A 20 25 70 20 5B 6E 6F  74 20 69 6E 20 52 41 4D |: %p [not in RAM|
779 0xFE00B040: 5D 0A 00 00 2A 2A 2A 20  57 61 72 6E 69 6E 67 21 |]...*** Warning!|
780 0xFE00B050: 20 43 68 65 63 6B 73 75  6D 20 66 61 69 6C 75 72 | Checksum failur|
781 0xFE00B060: 65 20 2D 20 41 64 64 72  3A 20 25 6C 78 2C 20 25 |e - Addr: %lx, %|
782 0xFE00B070: 30 32 6C 58 20 3C 3E 20  25 30 32 6C 58 0A 00 00 |02lX &lt;> %02lX...|
783 0xFE00B080: 45 6E 74 72 79 20 70 6F  69 6E 74 3A 20 25 70 2C |Entry point: %p,|
784 </screen> 
785       </para>
786     </refsect1>
787   </refentry>
788
789 <!-- ******** help *************************************************** -->
790   <refentry id="help-command">
791     <refnamediv>
792       <refname>help</refname>
793       <refpurpose>Display help on available commands</refpurpose>
794     </refnamediv>
795     <refsynopsisdiv>
796       <cmdsynopsis>
797         <command>help</command>
798         <arg><replaceable> topic</replaceable></arg>
799       </cmdsynopsis>
800     </refsynopsisdiv>
801     <refsect1>
802       <title>Arguments</title>
803       <informaltable frame="all">
804         <tgroup cols="4" colsep="1" rowsep="1" align="left">
805           <colspec colname="c1">
806           <colspec colname="c2">
807           <colspec colname="c3">
808           <colspec colname="c4">
809           <thead>
810             <row>
811               <entry>Name</entry>
812               <entry>Type</entry>
813               <entry>Description</entry>
814               <entry>Default</entry>
815             </row>
816           </thead>
817           <tbody>
818             <row>
819               <entry><replaceable>topic</replaceable></entry>        
820               <entry>String</entry>
821               <entry>Which command to provide help for.</entry>      
822               <entry>All commands</entry>            
823             </row>
824           </tbody>
825         </tgroup>
826       </informaltable>
827     </refsect1>
828     <refsect1>
829       <title>Description</title>
830       <para>
831 The <command>help</command> command displays information about the available
832 RedBoot commands.  If a <emphasis>topic</emphasis> is given, then the display
833 is restricted to information about that specific command.
834       </para>
835       <para>
836 If the command has sub-commands, e.g. <command>fis</command>, then the topic
837 specific display will print additional information about the available sub-commands.
838 special (ICMP) packets to a specific host. These packets should be automatically
839 returned by that host. The command will indicate how many of these round-trips
840 were successfully completed. 
841       </para>
842     </refsect1>
843     <refsect1>
844       <title>Examples</title>
845       <para>
846 Show generic help.  Note that the contents of this display will depend on the various configuration
847 options for RedBoot when it was built.
848 <screen>
849 RedBoot> <userinput>help</userinput>
850 Manage aliases kept in FLASH memory
851    alias name [value]
852 Manage machine caches
853    cache [ON | OFF]
854 Display/switch console channel
855    channel [-1|&lt;channel number&gt;]
856 Compute a 32bit checksum [POSIX algorithm] for a range of memory
857    cksum -b &lt;location&gt; -l &lt;length&gt;
858 Display (hex dump) a range of memory
859    dump -b &lt;location&gt; [-l &lt;length&gt;] [-s] [-1|-2|-4]
860 Manage FLASH images
861    fis {cmds}
862 Manage configuration kept in FLASH memory
863    fconfig [-i] [-l] [-n] [-f] [-d] | [-d] nickname [value]
864 Execute code at a location
865    go [-w &lt;timeout&gt;] [entry]
866 Uncompress GZIP compressed data
867    gunzip -s &lt;location&gt; -d &lt;location&gt;
868 Help about help?
869    help [&lt;topic&gt;]
870 Read I/O location
871    iopeek [-b &lt;location&gt;] [-1|2|4]
872 Write I/O location
873    iopoke [-b &lt;location&gt;] [-1|2|4] -v &lt;value&gt;
874 Set/change IP addresses
875    ip_address [-l &lt;local_ip_address&gt;[/&lt;mask_length&gt;]] [-h &lt;server_address&gt;]
876 Load a file
877    load [-r] [-v] [-d] [-h &lt;host&gt;] [-m {TFTP | HTTP | {x|y}MODEM -c &lt;channel_number&gt;}]
878         [-b &lt;base_address&gt;] &lt;file_name&gt;
879 Compare two blocks of memory
880    mcmp -s &lt;location&gt; -d &lt;location&gt; -l &lt;length&gt; [-1|-2|-4]
881 Fill a block of memory with a pattern
882    mfill -b &lt;location&gt; -l &lt;length&gt; -p &lt;pattern&gt;
883   [-1|-2|-4]
884 Network connectivity test
885    ping [-v] [-n &lt;count&gt;] [-l &lt;length&gt;] [-t &lt;timeout&gt;] [-r &lt;rate&gt;]
886         [-i &lt;IP_addr&gt;] -h &lt;IP_addr&gt;
887 Reset the system
888    reset 
889 Display RedBoot version information
890    version 
891 Display (hex dump) a range of memory
892    x -b &lt;location&gt; [-l &lt;length&gt;] [-s] [-1|-2|-4]
893 </screen> 
894       </para>
895       <para>
896 Help about a command with sub-commands.
897 <screen>
898 RedBoot> <userinput>help fis</userinput>
899 Manage FLASH images
900    fis {cmds}
901 Create an image
902   fis create -b &lt;mem_base&gt; -l &lt;image_length&gt; [-s &lt;data_length&gt;]
903       [-f &lt;flash_addr&gt;] [-e &lt;entry_point&gt;] [-r &lt;ram_addr&gt;] [-n] &lt;name&gt;
904 Display an image from FLASH Image System [FIS]
905   fis delete name
906 Erase FLASH contents
907   fis erase -f &lt;flash_addr&gt; -l &lt;length&gt;
908 Display free [available] locations within FLASH Image System [FIS]
909   fis free 
910 Initialize FLASH Image System [FIS]
911   fis init [-f]
912 Display contents of FLASH Image System [FIS]
913   fis list [-c] [-d]
914 Load image from FLASH Image System [FIS] into RAM
915   fis load [-d] [-b &lt;memory_load_address&gt;] [-c] name
916 Write raw data directly to FLASH
917   fis write -f &lt;flash_addr&gt; -b &lt;mem_base&gt; -l &lt;image_length&gt;
918 </screen> 
919       </para>
920     </refsect1>
921   </refentry>
922
923 <!-- ******** iopeek *************************************************** -->
924   <refentry id="iopeek-command">
925   <refnamediv>
926     <refname>iopeek</refname>
927     <refpurpose>Read I/O location</refpurpose>
928   </refnamediv>
929   <refsynopsisdiv>
930     <cmdsynopsis>
931       <command>iopeek</command>
932       <arg>-b <replaceable> location</replaceable></arg>
933       <group>
934         <arg>-1</arg>
935         <arg>-2</arg>
936         <arg>-4</arg>
937       </group>
938     </cmdsynopsis>
939   </refsynopsisdiv>      
940   <refsect1>
941     <title>Arguments</title>
942     <informaltable frame="all">
943       <tgroup cols="4" colsep="1" rowsep="1" align="left">
944         <colspec colname="c1">
945         <colspec colname="c2">
946         <colspec colname="c3">
947         <colspec colname="c4">
948         <thead>
949           <row>
950             <entry>Name</entry>
951             <entry>Type</entry>
952             <entry>Description</entry>
953             <entry>Default</entry>
954           </row>
955         </thead>
956         <tbody>
957           <row>
958             <entry>-b <replaceable>location</replaceable></entry>             
959             <entry>I/O address</entry>
960             <entry>I/O Location.</entry>             
961             <entry><emphasis>none</emphasis></entry>             
962           </row>
963           <row>
964             <entry>-1</entry>             
965             <entry></entry>
966             <entry>Access a one byte (8 bit) I/O location.</entry>             
967             <entry>-1</entry>             
968           </row>
969           <row>
970             <entry>-2</entry>             
971             <entry></entry>
972             <entry>Access a two byte (16 bit) I/O location.</entry>             
973             <entry>-1</entry>             
974           </row>
975           <row>
976             <entry>-4</entry>             
977             <entry></entry>
978             <entry>Access a one word (32 bit) I/O location.</entry>             
979             <entry>-1</entry>             
980           </row>
981         </tbody>
982       </tgroup>
983     </informaltable>
984   </refsect1>
985   <refsect1>
986     <title>Description</title>
987       <para>Reads a value from the I/O address space.</para>
988   </refsect1>
989   <refsect1>
990     <title>Examples</title>
991     <para>
992 Examine 8 bit value at I/O location 0x3F8.
993 <screen> 
994 RedBoot> <userinput>iopeek -b 0x3f8</userinput>
995 0x03f8 = 0x30
996 </screen> 
997 </para>
998      <para>
999 Examine 32 bit value at I/O location 0x3f8.
1000 <screen> 
1001 RedBoot> <userinput>iopeek -b 0x3f8 -4</userinput>
1002 0x03f8 = 0x03c10065
1003 </screen>
1004 </para>
1005     </refsect1>
1006   </refentry>
1007
1008 <!-- ******** iopoke *************************************************** -->
1009   <refentry id="iopoke-command">
1010   <refnamediv>
1011     <refname>iopoke</refname>
1012     <refpurpose>Write I/O location</refpurpose>
1013   </refnamediv>
1014   <refsynopsisdiv>
1015     <cmdsynopsis>
1016       <command>iopoke</command>
1017       <arg>-b <replaceable> location</replaceable></arg>
1018       <group>
1019         <arg>-1</arg>
1020         <arg>-2</arg>
1021         <arg>-4</arg>
1022       </group>
1023       <arg>-v <replaceable> value</replaceable></arg>
1024     </cmdsynopsis>
1025   </refsynopsisdiv>      
1026   <refsect1>
1027     <title>Arguments</title>
1028     <informaltable frame="all">
1029       <tgroup cols="4" colsep="1" rowsep="1" align="left">
1030         <colspec colname="c1">
1031         <colspec colname="c2">
1032         <colspec colname="c3">
1033         <colspec colname="c4">
1034         <thead>
1035           <row>
1036             <entry>Name</entry>
1037             <entry>Type</entry>
1038             <entry>Description</entry>
1039             <entry>Default</entry>
1040           </row>
1041         </thead>
1042         <tbody>
1043           <row>
1044             <entry>-b <replaceable>location</replaceable></entry>             
1045             <entry>I/O address</entry>
1046             <entry>I/O Location.</entry>             
1047             <entry><emphasis>none</emphasis></entry>             
1048           </row>
1049           <row>
1050             <entry>-1</entry>             
1051             <entry></entry>
1052             <entry>Access a one byte (8 bit) I/O location. 
1053 Only the 8 least significant bits of value will be used</entry>             
1054             <entry>-1</entry>             
1055           </row>
1056           <row>
1057             <entry>-2</entry>             
1058             <entry></entry>
1059             <entry>Access a two byte (16 bit) I/O location.
1060 Only the 16 least significant bits of value will be used</entry>             
1061             <entry>-1</entry>             
1062           </row>
1063           <row>
1064             <entry>-4</entry>             
1065             <entry></entry>
1066             <entry>Access a one word (32 bit) I/O location.</entry>             
1067             <entry>-1</entry>             
1068           </row>
1069         </tbody>
1070       </tgroup>
1071     </informaltable>
1072   </refsect1>
1073   <refsect1>
1074     <title>Description</title>
1075       <para>Writes a value to the I/O address space.</para>
1076   </refsect1>
1077   <refsect1>
1078     <title>Examples</title>
1079     <para>
1080 Write 0x0123 to 16 bit I/O location 0x200.
1081 <screen> 
1082 RedBoot> <userinput>iopoke -b 0x200 -v 0x123 -2</userinput>
1083 </screen> 
1084 </para>
1085     </refsect1>
1086   </refentry>
1087
1088 <!-- ******** gunzip *************************************************** -->
1089   <refentry id="gunzip-command">
1090   <refnamediv>
1091     <refname>gunzip</refname>
1092     <refpurpose>Uncompress GZIP compressed data</refpurpose>
1093   </refnamediv>
1094   <refsynopsisdiv>
1095     <cmdsynopsis>
1096       <command>gunzip</command>
1097       <arg choice="req">-s <replaceable>source</replaceable></arg>
1098           <arg choice="req">-d <replaceable>destination</replaceable></arg>
1099     </cmdsynopsis>
1100   </refsynopsisdiv>      
1101   <refsect1>
1102     <title>Arguments</title>
1103     <informaltable frame="all">
1104       <tgroup cols="4" colsep="1" rowsep="1" align="left">
1105         <colspec colname="c1">
1106         <colspec colname="c2">
1107         <colspec colname="c3">
1108         <colspec colname="c4">
1109         <thead>
1110           <row>
1111             <entry>Name</entry>
1112             <entry>Type</entry>
1113             <entry>Description</entry>
1114             <entry>Default</entry>
1115           </row>
1116         </thead>
1117         <tbody>
1118               <row>
1119                 <entry>-s <replaceable>location1</replaceable></entry>       
1120                 <entry>Memory address</entry>
1121                 <entry>Location of GZIP compressed data to uncompress.</entry>
1122                 <entry>Value set by last <command>load</command> or <command>fis load</command> command.</entry>             
1123               </row>
1124               <row>
1125                 <entry>-d <replaceable>location2</replaceable></entry>
1126                 <entry>Memory address</entry>
1127                 <entry>Destination to write uncompressed data to.</entry>            
1128                 <entry><emphasis>none</emphasis></entry>             
1129               </row>
1130         </tbody>
1131       </tgroup>
1132     </informaltable>
1133   </refsect1>
1134   <refsect1>
1135     <title>Description</title>
1136       <para>Uncompress GZIP compressed data.</para>
1137   </refsect1>
1138   <refsect1>
1139     <title>Examples</title>
1140     <para>
1141 Uncompress data at location 0x100000 to 0x200000.
1142 <screen> 
1143 RedBoot> <userinput>gunzip -s 0x100000 -d 0x200000</userinput>
1144 Decompressed 38804 bytes
1145 </screen> 
1146 </para>
1147     </refsect1>
1148   </refentry>
1149
1150 <!-- ******** ip_address *************************************************** -->
1151   <refentry id="ip-address-command">
1152     <refnamediv>
1153       <refname>ip_address</refname>
1154       <refpurpose>Set IP addresses</refpurpose>
1155     </refnamediv>
1156     <refsynopsisdiv>
1157       <cmdsynopsis>
1158         <command>ip_address</command>
1159         <arg>-b</arg>
1160         <arg>-l <replaceable> local_IP_address</replaceable>
1161         <arg choice=opt>/<replaceable>netmask_length</replaceable></arg> </arg>
1162         <arg>-h <replaceable> server_IP_address</replaceable></arg>
1163         <arg>-d <replaceable>
1164 DNS_server_IP_address</replaceable></arg>
1165       </cmdsynopsis>
1166     </refsynopsisdiv>
1167     <refsect1>
1168       <title>Arguments</title>
1169       <informaltable frame="all">
1170         <tgroup cols="4" colsep="1" rowsep="1" align="left">
1171           <colspec colname="c1">
1172           <colspec colname="c2">
1173           <colspec colname="c3">
1174           <colspec colname="c4">
1175           <thead>
1176             <row>
1177               <entry>Name</entry>
1178               <entry>Type</entry>
1179               <entry>Description</entry>
1180               <entry>Default</entry>
1181             </row>
1182           </thead>
1183           <tbody>
1184             <row>
1185               <entry>-b</entry>
1186               <entry>Boolean</entry>
1187               <entry>Obtain an IP address using BOOTP or DHCP.</entry>
1188               <entry>don't use BOOTP/DHCP</entry>
1189             </row>
1190             <row>
1191               <entry>-l <replaceable>
1192 local_IP_address</replaceable><option>[<replaceable>/netmask_length</replaceable>]</option></entry>          
1193               <entry>Numeric IP or DNS name</entry>
1194               <entry>The IP address RedBoot should use, optionally
1195 with the network mask length.</entry>        
1196               <entry><emphasis>none</emphasis></entry>       
1197             </row>
1198             <row>
1199               <entry>-h <replaceable>
1200 server_IP_address</replaceable></entry>      
1201               <entry>Numeric IP or DNS name</entry>
1202               <entry>The IP address of the default server. Use of this
1203 address is implied by other commands, such as
1204 <command>load</command>.</entry>             
1205               <entry><emphasis>none</emphasis></entry>       
1206             </row>
1207             <row>
1208               <entry>-d <replaceable>
1209 DNS_server_IP_address</replaceable></entry>          
1210               <entry>Numeric IP or DNS name</entry>
1211               <entry>The IP address of the DNS server.</entry>       
1212               <entry><emphasis>none</emphasis></entry>       
1213             </row>
1214           </tbody>
1215         </tgroup>
1216       </informaltable>
1217     </refsect1>
1218     <refsect1>
1219       <title>Description</title>
1220       <para>The <command>ip_address</command> command is used to show and/or change the basic IP
1221 addresses used by RedBoot. IP addresses may be given as numeric
1222 values, e.g. 192.168.1.67, or as symbolic names such as www.redhat.com
1223 if DNS support is enabled.
1224       </para>
1225       <para>
1226 The <option>-b</option> option is used to cause the target to perform a bootp or dhcp negotiation to get an IP address.
1227       </para>
1228       <para>
1229 The <option>-l</option> option is used to set the IP address used by
1230 the target device. The network mask length can also be specified
1231       </para>
1232       <para>
1233 The <option>-h</option> option is used to set the default server
1234 address, such as is used by the <command>load</command> command.
1235       </para>
1236       <para>
1237 The <option>-d</option> option is used to set the default DNS server
1238 address which is used for resolving symbolic network addresses. Note
1239 that an address of 0.0.0.0 will disable DNS lookups.
1240       </para>
1241     </refsect1>
1242     <refsect1>
1243       <title>Examples</title>
1244       <para>
1245 Display the current network settings. 
1246 <screen> 
1247 RedBoot> <userinput>ip_address</userinput> 
1248 IP: 192.168.1.31, Default server: 192.168.1.101, DNS server IP: 0.0.0.0 
1249 </screen> 
1250 </para>
1251 <para>
1252 Change the DNS server address. 
1253 <screen> 
1254 RedBoot> <userinput>ip_address -d 192.168.1.101</userinput> 
1255 IP: 192.168.1.31, Default server: 192.168.1.101, DNS server IP: 192.168.1.101 
1256 </screen> 
1257 </para>
1258 <para>
1259 Change the default server address. 
1260 <screen> 
1261 RedBoot> <userinput>ip_address -h 192.168.1.104</userinput> 
1262 IP: 192.168.1.31, Default server: 192.168.1.104, DNS server IP: 192.168.1.101
1263 </screen>
1264 </para>
1265 <para>
1266 Set the IP address to something new, with a 255.255.255.0 netmask
1267 <screen> 
1268 RedBoot> <userinput>ip_address -l 192.168.1.32/24</userinput> 
1269 IP: 192.168.1.32, Default server: 192.168.1.104, DNS server IP: 192.168.1.101
1270 </screen>
1271       </para>
1272     </refsect1>
1273   </refentry>
1274
1275 <!-- ******** load *************************************************** -->
1276   <refentry id="download-command">
1277     <refnamediv>
1278       <refname>load</refname>
1279       <refpurpose>Download programs or data to the RedBoot platform</refpurpose>
1280     </refnamediv>
1281     <refsynopsisdiv>
1282       <cmdsynopsis>
1283         <command>load</command>
1284         <arg>-v </arg>
1285         <arg>-d </arg>
1286         <arg>-r </arg>
1287         <arg>-m
1288           <group>
1289             <arg choice="req"><group>
1290               <arg>xmodem</arg>
1291               <arg>ymodem</arg>
1292             </group></arg>
1293             <arg>tftp</arg>
1294             <arg>disk</arg>
1295           </group>
1296         </arg>  
1297         <arg>-h <replaceable> server_IP_address</replaceable></arg>
1298         <arg>-b <replaceable> location</replaceable></arg>
1299         <arg>-c <replaceable> channel</replaceable></arg>
1300         <arg><replaceable>file_name</replaceable></arg>
1301       </cmdsynopsis>
1302     </refsynopsisdiv>
1303     <refsect1>
1304       <title>Arguments</title>
1305       <informaltable frame="all">
1306         <tgroup cols="4" colsep="1" rowsep="1" align="left">
1307           <colspec colname="c1">
1308           <colspec colname="c2">
1309           <colspec colname="c3">
1310           <colspec colname="c4">
1311           <thead>
1312             <row>
1313               <entry>Name</entry>
1314               <entry>Type</entry>
1315               <entry>Description</entry>
1316               <entry>Default</entry>
1317             </row>
1318           </thead>
1319           <tbody>
1320             <row>
1321               <entry>-v</entry>      
1322               <entry>Boolean</entry>
1323               <entry>Display a small spinner (indicator)
1324 while the download is in  progress. This is just for feedback, especially
1325 during long loads. Note that the option has no effect when using a
1326 serial download method since it would interfere with the protocol.</entry>           
1327               <entry><emphasis>quiet</emphasis></entry>      
1328             </row>
1329             <row>
1330               <entry>-d</entry>      
1331               <entry>Boolean</entry>
1332               <entry>Decompress data stream (gzip data)</entry>      
1333               <entry><emphasis>non-compressed data</emphasis></entry>        
1334             </row>
1335             <row>
1336               <entry>-r</entry>      
1337               <entry>Boolean</entry>
1338               <entry>Raw (or binary) data</entry>            
1339               <entry><emphasis>formatted (S-records, ELF image, etc)</emphasis></entry>      
1340             </row>
1341             <row>
1342               <entry>-m tftp</entry>         
1343               <entry></entry>
1344               <entry>Transfer data via the network using <acronym>TFTP</acronym> protocol.</entry>           
1345               <entry><acronym>TFTP</acronym></entry>         
1346             </row>
1347             <row>
1348               <entry>-m http</entry>         
1349               <entry></entry>
1350               <entry>Transfer data via the network using <acronym>HTTP</acronym> protocol.</entry>           
1351               <entry><acronym>TFTP</acronym></entry>         
1352             </row>
1353             <row>
1354               <entry>-m xmodem</entry>       
1355               <entry></entry>
1356               <entry>Transfer data using <emphasis>X-modem</emphasis> protocol.</entry>      
1357               <entry><acronym>TFTP</acronym></entry>         
1358             </row>
1359             <row>
1360               <entry>-m ymodem</entry>       
1361               <entry></entry>
1362               <entry>Transfer data using <emphasis>Y-modem</emphasis> protocol.</entry>      
1363               <entry><acronym>TFTP</acronym></entry>         
1364             </row>
1365             <row>
1366               <entry>-m disk</entry>         
1367               <entry></entry>
1368               <entry>Transfer data from a local disk.</entry>        
1369               <entry><acronym>TFTP</acronym></entry>         
1370             </row>
1371             <row>
1372               <entry>-h <replaceable>server_IP_address</replaceable></entry>         
1373               <entry>Numeric IP or DNS name</entry>
1374               <entry>The IP address of the <acronym>TFTP</acronym> or <acronym>HTTP</acronym> server.</entry>        
1375               <entry>Value set by <command>ip_address</command></entry>      
1376             </row>
1377             <row>
1378               <entry>-b <replaceable>location</replaceable></entry>          
1379               <entry>Number</entry>
1380               <entry>Address in memory to load the data.  Formatted data streams will have
1381 an implied load address which this option may override.</entry>      
1382               <entry><emphasis>Depends on data format</emphasis></entry>             
1383             </row>
1384             <row>
1385               <entry>-c <replaceable>channel</replaceable></entry>           
1386               <entry>Number</entry>
1387               <entry>Specify which I/O channel to
1388 use for download.  This option is only supported when using either
1389 xmodem or ymodem protocol.</entry>           
1390               <entry><emphasis>Depends on data format</emphasis></entry>             
1391             </row>
1392             <row>
1393               <entry><replaceable>file_name</replaceable></entry>            
1394               <entry>String</entry>
1395               <entry>The name of the file on the <acronym>TFTP</acronym> or <acronym>HTTP</acronym>
1396 server or the local disk. Details of how this is specified for <acronym>TFTP</acronym> are
1397 host-specific. For local disk files, the name must be in <emphasis>disk</emphasis>:
1398 <emphasis>filename</emphasis> format. The disk portion must match one of the disk
1399 names listed by the <command>disks</command> command.</entry>        
1400               <entry><emphasis>None</emphasis></entry>       
1401             </row>
1402           </tbody>
1403         </tgroup>
1404       </informaltable>
1405     </refsect1>
1406     <refsect1>
1407       <title>Description</title>
1408       <para>
1409 The <command>load</command> command is used to download
1410 data into the target system. Data can be loaded via a network connection,
1411 using either the <acronym>TFTP</acronym> or <acronym>HTTP</acronym> protocols, or the console serial connection using the
1412 X/Y modem protocol. Files may also be loaded directly from local filesystems
1413 on disk. Files to be downloaded may either be executable images in 
1414 ELF executable program format,
1415 Motorola S-record (SREC)
1416 format or raw data.
1417       </para>
1418     </refsect1>
1419     <refsect1>
1420       <title>Examples</title>
1421       <para>
1422 Download a Motorola S-record (or ELF) image, using <acronym>TFTP</acronym>, specifying the 
1423 base memory address.
1424 <screen>
1425 RedBoot> <userinput>load redboot.ROM -b 0x8c400000</userinput>
1426 Address offset = 0x0c400000
1427 Entry point: 0x80000000, address range: 0x80000000-0x8000fe80
1428 </screen> 
1429       </para>
1430       <para>
1431 Download a Motorola S-record (or ELF) image, using <acronym>HTTP</acronym>, specifying the
1432 host [server] address.
1433 <screen>
1434 RedBoot> <userinput>load /redboot.ROM -m HTTP -h 192.168.1.104</userinput>
1435 Address offset = 0x0c400000
1436 Entry point: 0x80000000, address range: 0x80000000-0x8000fe80
1437 </screen> 
1438       </para>
1439       <para>
1440 Load an ELF file from /dev/hda1 which should be an EXT2 partition:
1441 <screen>
1442 RedBoot> <userinput>load -mode disk hda1:hello.elf</userinput>
1443 Entry point: 0x00020000, address range: 0x00020000-0x0002fd70
1444 </screen>
1445       </para>
1446     </refsect1>
1447   </refentry>
1448
1449 <!-- ******** mcmp *************************************************** -->
1450   <refentry id="mcmp-command">
1451     <refnamediv>
1452       <refname>mcmp</refname>
1453       <refpurpose>Compare two segments of memory</refpurpose>
1454     </refnamediv>
1455     <refsynopsisdiv>
1456       <cmdsynopsis>
1457         <command>mcmp</command>
1458             <arg choice="req">-s <replaceable>location1</replaceable></arg>
1459             <arg choice="req">-d <replaceable>location1</replaceable></arg>
1460             <arg choice="req">-l <replaceable>length</replaceable></arg>
1461           <group>
1462             <arg>-1</arg>
1463             <arg>-2</arg>
1464             <arg>-4</arg>
1465           </group>
1466       </cmdsynopsis>
1467     </refsynopsisdiv>
1468     <refsect1>
1469       <title>Arguments</title>
1470       <informaltable frame="all">
1471         <tgroup cols="4" colsep="1" rowsep="1" align="left">
1472           <colspec colname="c1">
1473           <colspec colname="c2">
1474           <colspec colname="c3">
1475           <colspec colname="c4">
1476           <thead>
1477             <row>
1478               <entry>Name</entry>
1479               <entry>Type</entry>
1480               <entry>Description</entry>
1481               <entry>Default</entry>
1482             </row>
1483           </thead>
1484           <tbody>
1485             <row>
1486               <entry>-s <replaceable>location1</replaceable></entry>         
1487               <entry>Memory address</entry>
1488               <entry>Location for start of data.</entry>             
1489               <entry><emphasis>none</emphasis></entry>       
1490             </row>
1491             <row>
1492               <entry>-d <replaceable>location2</replaceable></entry>         
1493               <entry>Memory address</entry>
1494               <entry>Location for start of data.</entry>             
1495               <entry><emphasis>none</emphasis></entry>       
1496             </row>
1497             <row>
1498               <entry>-l <replaceable>length</replaceable></entry>            
1499               <entry>Number</entry>
1500               <entry>Length of data</entry>          
1501               <entry><emphasis>none</emphasis></entry>       
1502             </row>
1503             <row>
1504               <entry>-1</entry>      
1505               <entry></entry>
1506               <entry>Access one byte (8 bits) at a time.  
1507 Only the least significant 8 bits of the pattern will be used.</entry>       
1508               <entry>-4</entry>      
1509             </row>
1510             <row>
1511               <entry>-2</entry>      
1512               <entry></entry>
1513               <entry>Access two bytes (16 bits) at a time.  
1514 Only the least significant 16 bits of the pattern will be used.</entry>      
1515               <entry>-4</entry>      
1516             </row>
1517             <row>
1518               <entry>-4</entry>      
1519               <entry></entry>
1520               <entry>Access one word (32 bits) at a time.</entry>            
1521               <entry>-4</entry>      
1522             </row>
1523           </tbody>
1524         </tgroup>
1525       </informaltable>
1526     </refsect1>
1527     <refsect1>
1528       <title>Description</title>
1529         <para>Compares the contents of two ranges of memory (RAM, ROM, FLASH, etc).</para>
1530     </refsect1>
1531     <refsect1>
1532       <title>Examples</title>
1533       <para>
1534 Compare two buffers which match (result is <emphasis>quiet</emphasis>).
1535 <screen> 
1536 RedBoot> <userinput>mfill -b 0x100000 -l 0x20 -p 0xDEADFACE</userinput>
1537 RedBoot> <userinput>mfill -b 0x200000 -l 0x20 -p 0xDEADFACE</userinput>
1538 RedBoot> <userinput>mcmp -s 0x100000 -d 0x200000 -l 0x20</userinput>
1539 </screen> 
1540 </para>
1541 <para>
1542 Compare two buffers which don't match.  
1543 Only the first non-matching element is displayed.
1544 <screen> 
1545 RedBoot> <userinput>mcmp -s 0x100000 -d 0x200000 -l 0x30 -2</userinput>
1546 Buffers don't match - 0x00100020=0x6000, 0x00200020=0x0000
1547 </screen> 
1548       </para>
1549     </refsect1>
1550   </refentry>
1551
1552 <!-- ******** mcopy *************************************************** -->
1553   <refentry id="mcopy-command">
1554     <refnamediv>
1555       <refname>mcopy</refname>
1556       <refpurpose>Copy memory</refpurpose>
1557     </refnamediv>
1558     <refsynopsisdiv>
1559       <cmdsynopsis>
1560         <command>mcopy</command>
1561             <arg choice="req">-s <replaceable>source</replaceable></arg>
1562             <arg choice="req">-d <replaceable>destination</replaceable></arg>
1563             <arg choice="req">-l <replaceable>length</replaceable></arg>
1564           <group>
1565             <arg>-1</arg>
1566             <arg>-2</arg>
1567             <arg>-4</arg>
1568           </group>
1569       </cmdsynopsis>
1570     </refsynopsisdiv>
1571     <refsect1>
1572       <title>Arguments</title>
1573       <informaltable frame="all">
1574         <tgroup cols="4" colsep="1" rowsep="1" align="left">
1575           <colspec colname="c1">
1576           <colspec colname="c2">
1577           <colspec colname="c3">
1578           <colspec colname="c4">
1579           <thead>
1580             <row>
1581               <entry>Name</entry>
1582               <entry>Type</entry>
1583               <entry>Description</entry>
1584               <entry>Default</entry>
1585             </row>
1586           </thead>
1587           <tbody>
1588             <row>
1589               <entry>-s <replaceable>location1</replaceable></entry>         
1590               <entry>Memory address</entry>
1591               <entry>Location of data to copy.</entry>       
1592               <entry><emphasis>none</emphasis></entry>       
1593             </row>
1594             <row>
1595               <entry>-d <replaceable>location2</replaceable></entry>         
1596               <entry>Memory address</entry>
1597               <entry>Destination for copied data.</entry>            
1598               <entry><emphasis>none</emphasis></entry>       
1599             </row>
1600             <row>
1601               <entry>-l <replaceable>length</replaceable></entry>            
1602               <entry>Number</entry>
1603               <entry>Length of data</entry>          
1604               <entry><emphasis>none</emphasis></entry>       
1605             </row>
1606             <row>
1607               <entry>-1</entry>      
1608               <entry></entry>
1609               <entry>Copy one byte (8 bits) at a time.</entry>
1610               <entry>-4</entry>      
1611             </row>
1612             <row>
1613               <entry>-2</entry>      
1614               <entry></entry>
1615               <entry>Copy two bytes (16 bits) at a time.</entry>
1616               <entry>-4</entry>      
1617             </row>
1618             <row>
1619               <entry>-4</entry>      
1620               <entry></entry>
1621               <entry>Copy one word (32 bits) at a time.</entry>      
1622               <entry>-4</entry>      
1623             </row>
1624           </tbody>
1625         </tgroup>
1626       </informaltable>
1627     </refsect1>
1628     <refsect1>
1629       <title>Description</title>
1630         <para>Copies memory (RAM, ROM, FLASH, etc) from one area to another.</para>
1631     </refsect1>
1632     <refsect1>
1633       <title>Examples</title>
1634       <para>
1635 Copy 16 bits at a time.
1636 <screen> 
1637 RedBoot> <userinput>mfill -b 0x100000 -l 0x20 -2 -p 0xDEAD</userinput>
1638 RedBoot> <userinput>mfill -b 0x200000 -l 0x20 -2 -p 0x0</userinput>
1639 RedBoot> <userinput>dump  -b 0x200000 -l 0x20 -2</userinput>
1640 00200000: 0000 0000 0000 0000  0000 0000 0000 0000
1641 00200010: 0000 0000 0000 0000  0000 0000 0000 0000
1642 RedBoot> <userinput>mcopy -s 0x100000 -d 0x200000 -2 -l 0x20</userinput>
1643 RedBoot> <userinput>dump  -b 0x200000 -l 0x20 -2</userinput>
1644 00200000: DEAD DEAD DEAD DEAD  DEAD DEAD DEAD DEAD
1645 00200010: DEAD DEAD DEAD DEAD  DEAD DEAD DEAD DEAD
1646 </screen> 
1647 </para>
1648     </refsect1>
1649   </refentry>
1650
1651 <!-- ******** mfill *************************************************** -->
1652   <refentry id="mfill-command">
1653     <refnamediv>
1654       <refname>mfill</refname>
1655       <refpurpose>Fill RAM with a specified pattern</refpurpose>
1656     </refnamediv>
1657     <refsynopsisdiv>
1658       <cmdsynopsis>
1659         <command>mfill</command>
1660             <arg choice="req">-b <replaceable>location</replaceable></arg>
1661             <arg choice="req">-l <replaceable>length</replaceable></arg>
1662             <arg choice="req">-p <replaceable>value</replaceable></arg>
1663           <group>
1664             <arg>-1</arg>
1665             <arg>-2</arg>
1666             <arg>-4</arg>
1667           </group>
1668       </cmdsynopsis>
1669     </refsynopsisdiv>
1670     <refsect1>
1671       <title>Arguments</title>
1672       <informaltable frame="all">
1673         <tgroup cols="4" colsep="1" rowsep="1" align="left">
1674           <colspec colname="c1">
1675           <colspec colname="c2">
1676           <colspec colname="c3">
1677           <colspec colname="c4">
1678           <thead>
1679             <row>
1680               <entry>Name</entry>
1681               <entry>Type</entry>
1682               <entry>Description</entry>
1683               <entry>Default</entry>
1684             </row>
1685           </thead>
1686           <tbody>
1687             <row>
1688               <entry>-b <replaceable>location</replaceable></entry>          
1689               <entry>Memory address</entry>
1690               <entry>Location in memory for start of data.</entry>           
1691               <entry><emphasis>none</emphasis></entry>       
1692             </row>
1693             <row>
1694               <entry>-l <replaceable>length</replaceable></entry>            
1695               <entry>Number</entry>
1696               <entry>Length of data</entry>          
1697               <entry><emphasis>none</emphasis></entry>       
1698             </row>
1699             <row>
1700               <entry>-p <replaceable>pattern</replaceable></entry>           
1701               <entry>Number</entry>
1702               <entry>Data value to fill with</entry>         
1703               <entry>0</entry>       
1704             </row>
1705             <row>
1706               <entry>-1</entry>      
1707               <entry></entry>
1708               <entry>Access one byte (8 bits) at a time.  
1709 Only the least significant 8 bits of the pattern will be used.</entry>       
1710               <entry>-4</entry>      
1711             </row>
1712             <row>
1713               <entry>-2</entry>      
1714               <entry></entry>
1715               <entry>Access two bytes (16 bits) at a time.  
1716 Only the least significant 16 bits of the pattern will be used.</entry>      
1717               <entry>-4</entry>      
1718             </row>
1719             <row>
1720               <entry>-4</entry>      
1721               <entry></entry>
1722               <entry>Access one word (32 bits) at a time.</entry>            
1723               <entry>-4</entry>      
1724             </row>
1725           </tbody>
1726         </tgroup>
1727       </informaltable>
1728     </refsect1>
1729     <refsect1>
1730       <title>Description</title>
1731         <para>Fills a range of memory with the given pattern.</para>
1732     </refsect1>
1733     <refsect1>
1734       <title>Examples</title>
1735       <para>
1736 Fill a buffer with zeros.
1737 <screen> 
1738 RedBoot> <userinput>x -b 0x100000 -l 0x20</userinput>
1739 00100000: 00 3E 00 06 00 06 00 06  00 00 00 00 00 00 00 00  |.>..............|
1740 00100010: 00 00 00 78 00 70 00 60  00 60 00 60 00 60 00 60  |...x.p.`.`.`.`.`|
1741 RedBoot> <userinput>mfill -b 0x100000 -l 0x20</userinput>
1742 RedBoot> <userinput>x -b 0x100000 -l 0x20</userinput>
1743 00100000: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
1744 00100010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
1745 </screen> 
1746 </para>
1747 <para>
1748 Fill a buffer with a pattern.
1749 <screen> 
1750 RedBoot> <userinput>mfill -b 0x100000 -l 0x20 -p 0xDEADFACE</userinput>
1751 RedBoot> <userinput>x -b 0x100000 -l 0x20</userinput>
1752 00100000: CE FA AD DE CE FA AD DE  CE FA AD DE CE FA AD DE  |................|
1753 00100010: CE FA AD DE CE FA AD DE  CE FA AD DE CE FA AD DE  |................|
1754 </screen> 
1755       </para>
1756     </refsect1>
1757   </refentry>
1758
1759 <!-- ******** ping *************************************************** -->
1760   <refentry id="ping-command">
1761     <refnamediv>
1762       <refname>ping</refname>
1763       <refpurpose>Verify network connectivity</refpurpose>
1764     </refnamediv>
1765     <refsynopsisdiv>
1766       <cmdsynopsis>
1767         <command>ping</command>
1768         <arg>-v </arg>
1769         <arg>-i <replaceable> local_IP_address</replaceable></arg>
1770         <arg>-l <replaceable> length</replaceable></arg>
1771         <arg>-n <replaceable> count</replaceable></arg>
1772         <arg>-t <replaceable> timeout</replaceable></arg>
1773         <arg>-r <replaceable> rate</replaceable></arg>
1774         <arg choice="req">-h <replaceable> server_IP_address</replaceable></arg>
1775       </cmdsynopsis>
1776     </refsynopsisdiv>
1777     <refsect1>
1778       <title>Arguments</title>
1779       <informaltable frame="all">
1780         <tgroup cols="4" colsep="1" rowsep="1" align="left">
1781           <colspec colname="c1">
1782           <colspec colname="c2">
1783           <colspec colname="c3">
1784           <colspec colname="c4">
1785           <thead>
1786             <row>
1787               <entry>Name</entry>
1788               <entry>Type</entry>
1789               <entry>Description</entry>
1790               <entry>Default</entry>
1791             </row>
1792           </thead>
1793           <tbody>
1794             <row>
1795               <entry>-v</entry>      
1796               <entry>Boolean</entry>
1797               <entry>Be verbose, displaying information about each packet sent.</entry>      
1798               <entry><emphasis>quiet</emphasis></entry>      
1799             </row>
1800             <row>
1801               <entry>-n <replaceable>local_IP_address</replaceable></entry>          
1802               <entry>Number</entry>
1803               <entry>Controls the number of packets to be sent.</entry>      
1804               <entry>10</entry>      
1805             </row>
1806             <row>
1807               <entry>-i <replaceable>local_IP_address</replaceable></entry>          
1808               <entry>Numeric IP or DNS name</entry>
1809               <entry>The IP address RedBoot should use.</entry>      
1810               <entry>Value set by <command>ip_address</command></entry>      
1811             </row>
1812             <row>
1813               <entry>-h <replaceable>server_IP_address</replaceable></entry>         
1814               <entry>Numeric IP or DNS name</entry>
1815               <entry>The IP address of the host to contact.</entry>
1816               <entry><emphasis>none</emphasis></entry>       
1817             </row>
1818             <row>
1819               <entry>-l <replaceable>length</replaceable></entry>            
1820               <entry>Number</entry>
1821               <entry>The length of the ICMP data payload.</entry>            
1822               <entry>64</entry>      
1823             </row>
1824             <row>
1825               <entry>-r <replaceable>length</replaceable></entry>            
1826               <entry>Number</entry>
1827               <entry>How fast to deliver packets, i.e. time between successive sends.
1828 A value of 0 sends packets as quickly as possible.</entry>           
1829               <entry>1000ms (1 second)</entry>       
1830             </row>
1831             <row>
1832               <entry>-t <replaceable>length</replaceable></entry>            
1833               <entry>Number</entry>
1834               <entry>How long to wait for the round-trip to complete, specified in milliseconds.</entry>             
1835               <entry>1000ms (1 second)</entry>       
1836             </row>
1837           </tbody>
1838         </tgroup>
1839       </informaltable>
1840     </refsect1>
1841     <refsect1>
1842       <title>Description</title>
1843       <para>
1844 The <command>ping</command> command checks the connectivity of the local network by sending
1845 special (ICMP) packets to a specific host. These packets should be automatically
1846 returned by that host. The command will indicate how many of these round-trips
1847 were successfully completed. 
1848       </para>
1849     </refsect1>
1850     <refsect1>
1851       <title>Examples</title>
1852       <para>
1853 Test connectivity to host 192.168.1.101.
1854 <screen>
1855 RedBoot> <userinput>ping -h 192.168.1.101</userinput>
1856 Network PING - from 192.168.1.31 to 192.168.1.101
1857 PING - received 10 of 10 expected
1858 </screen> 
1859 </para>
1860 <para>
1861 Test connectivity to host 192.168.1.101, with verbose reporting.
1862 <screen>
1863 RedBoot> <userinput>ping -h 192.168.1.101 -v -n 4</userinput>
1864 Network PING - from 192.168.1.31 to 192.168.1.101
1865  seq: 1, time: 1 (ticks)
1866  seq: 2, time: 1 (ticks)
1867  seq: 3, time: 1 (ticks)
1868  seq: 4, time: 1 (ticks)
1869 PING - received 10 of 10 expected
1870 </screen> 
1871 </para>
1872 <para>
1873 <screen>
1874 Test connectivity to a non-existent host (192.168.1.109).
1875 RedBoot> <userinput>ping -h 192.168.1.109 -v -n 4</userinput>
1876 PING: Cannot reach server '192.168.1.109' (192.168.1.109)
1877 </screen> 
1878       </para>
1879     </refsect1>
1880   </refentry>
1881
1882 <!-- ******** reset *************************************************** -->
1883   <refentry id="reset-command">
1884     <refnamediv>
1885       <refname>reset</refname>
1886       <refpurpose>Reset the device</refpurpose>
1887     </refnamediv>
1888     <refsynopsisdiv>
1889       <cmdsynopsis>
1890         <command>reset</command>
1891       </cmdsynopsis>
1892     </refsynopsisdiv>
1893     <refsect1>
1894       <title>Arguments</title>
1895 <para><emphasis>None</emphasis></para>
1896     </refsect1>
1897     <refsect1>
1898       <title>Description</title>
1899       <para>
1900 The <command>reset</command> command causes the target platform to be reset.
1901 Where possible (hardware support permitting), this will be
1902 equivalent to a power-on reset condition.
1903       </para>
1904     </refsect1>
1905     <refsect1>
1906       <title>Examples</title>
1907       <para>
1908 Reset the platform.
1909 <screen>
1910 RedBoot> <userinput>reset</userinput>
1911 ... Resetting.+... Waiting for network card: .
1912 Socket Communications, Inc: Low Power Ethernet CF Revision C 5V/3.3V 08/27/98
1913 Ethernet eth0: MAC address 00:c0:1b:00:ba:28
1914 IP: 192.168.1.29, Default server: 192.168.1.101
1915
1916 RedBoot(tm) bootstrap and debug environment [ROM]
1917 Non-certified release, version UNKNOWN - built 10:41:41, May 14 2002
1918
1919 Platform: Compaq iPAQ Pocket PC (StrongARM 1110) 
1920 Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
1921
1922 RAM: 0x00000000-0x01fc0000, 0x00014748-0x01f71000 available
1923 FLASH: 0x50000000 - 0x51000000, 64 blocks of 0x00040000 bytes each.
1924 RedBoot> 
1925 </screen> 
1926       </para>
1927     </refsect1>
1928   </refentry>
1929
1930
1931 <!-- ******** version *************************************************** -->
1932   <refentry id="version-command">
1933     <refnamediv>
1934       <refname>version</refname>
1935       <refpurpose>Display RedBoot version information</refpurpose>
1936     </refnamediv>
1937     <refsynopsisdiv>
1938       <cmdsynopsis>
1939         <command>version</command>
1940       </cmdsynopsis>
1941     </refsynopsisdiv>
1942     <refsect1>
1943       <title>Arguments</title>
1944       <para><emphasis>None</emphasis></para>
1945     </refsect1>
1946     <refsect1>
1947       <title>Description</title>
1948       <para>The <command>version</command> command simply displays version information about RedBoot.
1949       </para>
1950     </refsect1>
1951     <refsect1>
1952       <title>Examples</title>
1953       <para>
1954 Display RedBoot's version.
1955 <screen>
1956 RedBoot> <userinput>version</userinput>
1957 RedBoot(tm) debug environment - built 09:12:03, Feb 12 2001
1958 Platform: XYZ (PowerPC 860)
1959 Copyright (C) 2000, 2001, Red Hat, Inc.
1960 RAM: 0x00000000-0x00400000
1961 </screen> 
1962       </para>
1963     </refsect1>
1964   </refentry>
1965
1966 </sect1>
1967  
1968 <sect1 id="Flash-Image-System">
1969 <title>Flash Image System (FIS)</title>
1970 <para><indexterm><primary>commands</primary><secondary>flash image system
1971 </secondary></indexterm><indexterm><primary>flash image system commands</primary>
1972 </indexterm><indexterm><primary>commands</primary><secondary>fis</secondary>
1973 </indexterm><indexterm><primary>fis commands</primary></indexterm>If the platform
1974 has flash memory, RedBoot can use this for image storage. Executable images,
1975 as well as data, can be stored in flash in a simple file store. The <command>
1976 fis</command> command (fis is short for Flash Image System) is used to
1977 manipulate and maintain flash images.
1978 </para>
1979
1980 <!-- ******** fis init ************************************************ -->
1981
1982   <refentry id="fis-init-command">
1983     <refnamediv>
1984       <refname>fis init</refname>
1985       <refpurpose>Initialize Flash Image System (FIS)</refpurpose>
1986     </refnamediv>
1987     <refsynopsisdiv>
1988       <cmdsynopsis>
1989         <command>fis init</command>
1990         <arg><replaceable>-f</replaceable></arg>
1991       </cmdsynopsis>
1992     </refsynopsisdiv>
1993     <refsect1>
1994       <title>Arguments</title>
1995       <informaltable frame="all">
1996         <tgroup cols="4" colsep="1" rowsep="1" align="left">
1997           <colspec colname="c1">
1998           <colspec colname="c2">
1999           <colspec colname="c3">
2000           <colspec colname="c4">
2001           <thead>
2002             <row>
2003               <entry>Name</entry>
2004               <entry>Type</entry>
2005               <entry>Description</entry>
2006               <entry>Default</entry>
2007             </row>
2008           </thead>
2009           <tbody>
2010             <row>
2011               <entry>-f</entry>      
2012               <entry></entry>
2013               <entry>All blocks of flash memory (except for the boot
2014               blocks) will be erased as part of the initialization
2015               procedure.</entry>
2016               <entry></entry>        
2017             </row>
2018           </tbody>
2019         </tgroup>
2020       </informaltable>
2021     </refsect1>
2022     <refsect1>
2023       <title>Description</title>
2024
2025        <para>This command is used to initialize the Flash Image System
2026        (FIS). It should normally only be executed once, when RedBoot
2027        is first installed on the hardware. If the reserved images or
2028        their sizes in the FIS change, due to a different configuration
2029        of RedBoot being used, it may be necessary to issue the command
2030        again though.
2031
2032         <note><para>Subsequent executions will cause loss of
2033        previously stored information in the FIS.</para></note>
2034      </para>
2035     </refsect1>
2036     <refsect1>
2037       <title>Examples</title>
2038       <para>
2039 Initialize the FIS directory.
2040 <screen> 
2041 RedBoot> <userinput>fis init</userinput>
2042 About to initialize [format] flash image system - continue (y/n)? <userinput>y</userinput>
2043 *** Initialize FLASH Image System
2044     Warning: device contents not erased, some blocks may not be usable
2045 ... Erase from 0x00070000-0x00080000: .
2046 ... Program from 0x0606f000-0x0607f000 at 0x00070000: .
2047 </screen> 
2048 </para>
2049
2050       <para>
2051 Initialize the FIS directory and all of flash memory, except for first
2052 blocks of the flash where the boot monitor resides.
2053 <screen> 
2054 RedBoot> <userinput>fis init -f</userinput>
2055 About to initialize [format] flash image system - continue (y/n)? <userinput>y</userinput>
2056 *** Initialize FLASH Image System                                               
2057 ... Erase from 0x00020000-0x00070000: .....                                     
2058 ... Erase from 0x00080000-0x00080000:                                           
2059 ... Erase from 0x00070000-0x00080000: .                                         
2060 ... Program from 0x0606f000-0x0607f000 at 0x00070000: .                         
2061 </screen> 
2062 </para>
2063 </refsect1>
2064 </refentry>
2065
2066 <!-- ******** fis list ************************************************ -->
2067   <refentry id="fis-list-command">
2068     <refnamediv>
2069       <refname>fis list</refname>
2070       <refpurpose>List Flash Image System directory</refpurpose>
2071     </refnamediv>
2072     <refsynopsisdiv>
2073       <cmdsynopsis>
2074         <command>fis list</command>
2075         <arg><replaceable>-f</replaceable></arg>
2076       </cmdsynopsis>
2077     </refsynopsisdiv>
2078     <refsect1>
2079       <title>Arguments</title>
2080       <informaltable frame="all">
2081         <tgroup cols="4" colsep="1" rowsep="1" align="left">
2082           <colspec colname="c1">
2083           <colspec colname="c2">
2084           <colspec colname="c3">
2085           <colspec colname="c4">
2086           <thead>
2087             <row>
2088               <entry>Name</entry>
2089               <entry>Type</entry>
2090               <entry>Description</entry>
2091               <entry>Default</entry>
2092             </row>
2093           </thead>
2094           <tbody>
2095             <row>
2096               <entry>-c</entry>
2097               <entry></entry>
2098               <entry>Show image checksum instead of memory address
2099               (column <computeroutput>Mem addr</computeroutput> is
2100               replaced by
2101               <computeroutput>Checksum</computeroutput>).</entry>
2102               <entry></entry>
2103             </row>
2104             <row>
2105               <entry>-d</entry>
2106               <entry></entry>
2107               <entry>Show image data length instead of amount of flash
2108               occupied by image (column
2109               <computeroutput>Length</computeroutput> is replaced by
2110               <computeroutput>Datalen</computeroutput>).</entry>
2111               <entry></entry>
2112             </row>
2113           </tbody>
2114         </tgroup>
2115       </informaltable>
2116     </refsect1>
2117     <refsect1>
2118       <title>Description</title>
2119 <para>This command lists the images currently available in the FIS. Certain
2120 images used by RedBoot have fixed names and have reserved slots in the
2121 FIS (these can be seen after using the <command>fis init</command>
2122 command). Other images can be manipulated by the user.</para>
2123 <note><para>The images are listed in the order they appear in the FIS
2124 directory, not by name or creation time.</para></note>
2125     </refsect1>
2126
2127     <refsect1>
2128       <title>Examples</title>
2129       <para>
2130 List the FIS directory.
2131 <screen> 
2132 RedBoot> <userinput>fis list</userinput>
2133 Name              FLASH addr  Mem addr    Length      Entry point               
2134 RedBoot           0x00000000  0x00000000  0x00020000  0x00000000                
2135 RedBoot config    0x0007F000  0x0007F000  0x00001000  0x00000000                
2136 FIS directory     0x00070000  0x00070000  0x0000F000  0x00000000                
2137 </screen> 
2138 </para>
2139
2140       <para>
2141 List the FIS directory, with image checksums substituted for
2142 memory addresses.
2143 <screen> 
2144 RedBoot> <userinput>fis list -c</userinput>
2145 Name              FLASH addr  Checksum    Length      Entry point               
2146 RedBoot           0x00000000  0x00000000  0x00020000  0x00000000                
2147 RedBoot config    0x0007F000  0x00000000  0x00001000  0x00000000                
2148 FIS directory     0x00070000  0x00000000  0x0000F000  0x00000000                
2149 </screen> 
2150 </para>
2151
2152       <para>
2153 List the FIS directory with image data lengths substituted for flash
2154 block reservation lengths.
2155 <screen> 
2156 RedBoot> <userinput>fis list -d</userinput>
2157 Name              FLASH addr  Mem addr    Datalen     Entry point               
2158 RedBoot           0x00000000  0x00000000  0x00000000  0x00000000                
2159 RedBoot config    0x0007F000  0x0007F000  0x00000000  0x00000000                
2160 FIS directory     0x00070000  0x00070000  0x00000000  0x00000000                
2161 </screen> 
2162 </para>
2163 </refsect1>
2164 </refentry>
2165
2166 <!-- ******** fis free ************************************************ -->
2167
2168   <refentry id="fis-free-command">
2169     <refnamediv>
2170       <refname>fis free</refname>
2171       <refpurpose>Free flash image</refpurpose>
2172     </refnamediv>
2173     <refsynopsisdiv>
2174       <cmdsynopsis>
2175         <command>fis free</command>
2176       </cmdsynopsis>
2177     </refsynopsisdiv>
2178     <refsect1>
2179       <title>Description</title>
2180
2181
2182 <para>This command shows which areas of the flash memory are currently
2183 not in use. When a block contains non-erased contents it is considered
2184 in use. Since it is possible to force an image to be loaded at a
2185 particular flash location, this command can be used to check whether
2186 that location is in use by any other image.</para>
2187
2188 <note><para>There is currently no cross-checking between actual flash
2189 contents and the FIS directory, which mans that there could be a
2190 segment of flash which is not erased that does not correspond to a
2191 named image, or vice-versa.</para></note>
2192     </refsect1>
2193
2194     <refsect1>
2195       <title>Examples</title>
2196       <para>
2197 Show free flash areas.
2198 <screen>
2199 RedBoot> <userinput>fis free</userinput>
2200         0xA0040000 .. 0xA07C0000
2201         0xA0840000 .. 0xA0FC0000
2202 </screen></para>
2203 </refsect1>
2204 </refentry>
2205
2206 <!-- ******** fis create ************************************************ -->
2207
2208   <refentry id="fis-create-command">
2209     <refnamediv>
2210       <refname>fis create</refname>
2211       <refpurpose>Create flash image</refpurpose>
2212     </refnamediv>
2213     <refsynopsisdiv>
2214       <cmdsynopsis>
2215         <command>fis create</command>
2216         <arg choice="req">-b <replaceable> data address</replaceable></arg>
2217         <arg choice="req">-l <replaceable> length</replaceable></arg>
2218         <arg>-f <replaceable> flash address</replaceable></arg>
2219         <arg>-e <replaceable> entry</replaceable></arg>
2220         <arg>-r <replaceable> relocation address</replaceable></arg>
2221         <arg>-s <replaceable> data length</replaceable></arg>
2222         <arg>-n </arg>
2223         <arg><replaceable>name</replaceable></arg>
2224       </cmdsynopsis>
2225     </refsynopsisdiv>
2226     <refsect1>
2227       <title>Arguments</title>
2228       <informaltable frame="all">
2229         <tgroup cols="4" colsep="1" rowsep="1" align="left">
2230           <colspec colname="c1">
2231           <colspec colname="c2">
2232           <colspec colname="c3">
2233           <colspec colname="c4">
2234           <thead>
2235             <row>
2236               <entry>Name</entry>
2237               <entry>Type</entry>
2238               <entry>Description</entry>
2239               <entry>Default</entry>
2240             </row>
2241           </thead>
2242           <tbody>
2243             <row>
2244               <entry>-b</entry>
2245               <entry>Number</entry>
2246               <entry>Address of data to be written to the flash.</entry>
2247               <entry>Address of last loaded file. If not set in a load
2248               operation, it must be specified.</entry>
2249             </row>
2250             <row>
2251               <entry>-l</entry>
2252               <entry>Number</entry>
2253               <entry>Length of flash area to occopy. If specified, and
2254               the named image already exists, the length must match
2255               the value in the FIS directory.</entry>
2256               <entry>Length of area reserved in FIS directory if the
2257               image already exists, or the length of the last loaded
2258               file. If neither are set, it must be specified.</entry>
2259             </row>
2260             <row>
2261               <entry>-f</entry>
2262               <entry>Number</entry>
2263               <entry>Address of flash area to occopy.</entry>
2264               <entry>The address of an area reserved in the FIS
2265               directory for extant images. Otherwise the first free block
2266               which is large enough will be used.</entry>
2267             </row>
2268             <row>
2269               <entry>-e</entry>
2270               <entry>Number</entry>
2271               <entry>Entry address for an executable image, used by
2272               the <command>fis load</command> command.</entry>
2273               <entry>The entry address of last loaded file.</entry>
2274             </row>
2275             <row>
2276               <entry>-r</entry>
2277               <entry>Number</entry>
2278               <entry>Address where the image should be relocated to by
2279               the <command>fis load</command> command. This is only
2280               relevant for images that will be loaded with the
2281               <command>fis load</command> command.</entry>
2282               <entry>The load address of the last loaded file.</entry>
2283             </row>
2284             <row>
2285               <entry>-s</entry>
2286               <entry>Number</entry>
2287               <entry>Actual length of data written to image. This is
2288               used to control the range over which the checksum is
2289               made.</entry>
2290               <entry>It defaults to the length of the last loaded
2291               file.</entry>
2292             </row>
2293             <row>
2294               <entry>-n</entry>
2295               <entry></entry>
2296               <entry>When set, no image data will be written to the
2297               flash. Only the FIS directory will be updated.</entry>
2298               <entry></entry>
2299             </row>
2300             <row>
2301               <entry><replaceable>name</replaceable></entry>
2302               <entry>String</entry>
2303               <entry>Name of flash image.</entry>
2304               <entry></entry>
2305             </row>
2306           </tbody>
2307         </tgroup>
2308       </informaltable>
2309     </refsect1>
2310     <refsect1>
2311       <title>Description</title>
2312 <para>This command creates an image in the FIS directory. The data for the
2313 image must exist in RAM memory before the copy. Typically, you would use the
2314 RedBoot <command>load</command> command to load file into
2315 RAM and then the <command>fis create</command> command to write
2316 it to a flash image.</para>
2317 </refsect1>
2318
2319     <refsect1>
2320       <title>Examples</title>
2321       <para>Trying to create an extant image, will require the action
2322       to be verified.
2323 <screen>
2324 RedBoot> <userinput>fis create RedBoot -f 0xa0000000 -b 0x8c400000 -l 0x20000</userinput>
2325 An image named &lsquo;RedBoot&rsquo; exists - continue (y/n)? <userinput>n</userinput>
2326 </screen>
2327 </para>
2328
2329 <para>Create a new test image, let the command find a suitable place.
2330 <screen>
2331 RedBoot> <userinput>fis create junk -b 0x8c400000 -l 0x20000</userinput>
2332 ... Erase from 0xa0040000-0xa0060000: .
2333 ... Program from 0x8c400000-0x8c420000 at 0xa0040000: .
2334 ... Erase from 0xa0fe0000-0xa1000000: .
2335 ... Program from 0x8c7d0000-0x8c7f0000 at 0xa0fe0000: .
2336 </screen>
2337 </para>
2338
2339 <para>Update the RedBoot[RAM] image.
2340 <screen>
2341 RedBoot> <userinput>load redboot_RAM.img</userinput>
2342 Entry point: 0x060213c0, address range: 0x06020000-0x06036cc0                   
2343 RedBoot> <userinput>fis create RedBoot[RAM]</userinput>
2344 No memory address set.
2345 An image named 'RedBoot[RAM]' exists - continue (y/n)? <userinput>y</userinput>
2346 * CAUTION * about to program 'RedBoot[RAM]'
2347             at 0x00020000..0x00036cbf from 0x06020000 - continue (y/n)? <userinput>y</userinput>
2348 ... Erase from 0x00020000-0x00040000: ..
2349 ... Program from 0x06020000-0x06036cc0 at 0x00020000: ..
2350 ... Erase from 0x00070000-0x00080000: .
2351 ... Program from 0x0606f000-0x0607f000 at 0x00070000: .
2352 </screen>
2353 </para>
2354 </refsect1>
2355 </refentry>
2356
2357 <!-- ******** fis load ************************************************ -->
2358
2359   <refentry id="fis-load-command">
2360     <refnamediv>
2361       <refname>fis load</refname>
2362       <refpurpose>Load flash image</refpurpose>
2363     </refnamediv>
2364     <refsynopsisdiv>
2365       <cmdsynopsis>
2366         <command>fis load</command>
2367         <arg>-b <replaceable> load address</replaceable></arg>
2368         <arg>-c </arg>
2369         <arg>-d </arg>
2370         <arg><replaceable>name</replaceable></arg>
2371       </cmdsynopsis>
2372     </refsynopsisdiv>
2373     <refsect1>
2374       <title>Arguments</title>
2375       <informaltable frame="all">
2376         <tgroup cols="4" colsep="1" rowsep="1" align="left">
2377           <colspec colname="c1">
2378           <colspec colname="c2">
2379           <colspec colname="c3">
2380           <colspec colname="c4">
2381           <thead>
2382             <row>
2383               <entry>Name</entry>
2384               <entry>Type</entry>
2385               <entry>Description</entry>
2386               <entry>Default</entry>
2387             </row>
2388           </thead>
2389           <tbody>
2390             <row>
2391               <entry>-b</entry>
2392               <entry>Number</entry>
2393               <entry>Address the image should be loaded to. Executable
2394               images normally load at the location to which the file
2395               was linked. This option allows the image to be loaded to
2396               a specific memory location, possibly overriding any
2397               assumed location.</entry>
2398               <entry>If not specified, the address associated with the
2399               image in the FIS directory will be used.</entry>
2400             </row>
2401             <row>
2402               <entry>-c</entry>
2403               <entry></entry>
2404               <entry>Compute and print the checksum of the image data
2405               after it has been loaded into memory.</entry>
2406             </row>
2407             <row>
2408               <entry>-d</entry>
2409               <entry></entry>
2410               <entry>Decompress gzipped image while copying it from
2411               flash to RAM.</entry>
2412             </row>
2413             <row>
2414               <entry><replaceable>name</replaceable></entry>
2415               <entry>String</entry>
2416               <entry>The name of the file, as shown in the FIS
2417               directory.</entry>
2418             </row>
2419           </tbody>
2420         </tgroup>
2421       </informaltable>
2422     </refsect1>
2423     <refsect1>
2424       <title>Description</title>
2425 <para>This command is used to transfer an image from flash memory to RAM.
2426 </para>
2427 <para>Once the image has been loaded, it may be executed using the
2428 <command>go</command> command.</para>
2429 </refsect1>
2430
2431     <refsect1>
2432       <title>Examples</title>
2433 <para>Load and run RedBoot[RAM] image.
2434 <screen>
2435 RedBoot> <userinput>fis load RedBoot[RAM]</userinput>
2436 RedBoot> <userinput>go</userinput>
2437 </screen>
2438 </para>
2439 </refsect1>
2440 </refentry>
2441
2442 <!-- ******** fis delete ************************************************ -->
2443
2444   <refentry id="fis-delete-command">
2445     <refnamediv>
2446       <refname>fis delete</refname>
2447       <refpurpose>Delete flash image</refpurpose>
2448     </refnamediv>
2449     <refsynopsisdiv>
2450       <cmdsynopsis>
2451         <command>fis delete</command>
2452         <arg choice="req"><replaceable>name</replaceable></arg>
2453       </cmdsynopsis>
2454     </refsynopsisdiv>
2455     <refsect1>
2456       <title>Arguments</title>
2457       <informaltable frame="all">
2458         <tgroup cols="4" colsep="1" rowsep="1" align="left">
2459           <colspec colname="c1">
2460           <colspec colname="c2">
2461           <colspec colname="c3">
2462           <colspec colname="c4">
2463           <thead>
2464             <row>
2465               <entry>Name</entry>
2466               <entry>Type</entry>
2467               <entry>Description</entry>
2468               <entry>Default</entry>
2469             </row>
2470           </thead>
2471           <tbody>
2472             <row>
2473               <entry><replaceable>name</replaceable></entry>
2474               <entry>Number</entry>
2475               <entry>Name of image that should be deleted.</entry>
2476               <entry></entry>
2477             </row>
2478           </tbody>
2479         </tgroup>
2480       </informaltable>
2481     </refsect1>
2482     <refsect1>
2483       <title>Description</title>
2484 <para>This command removes an image from the FIS. The flash memory will be
2485 erased as part of the execution of this command, as well as removal of the
2486 name from the FIS directory.</para>
2487
2488 <note><para>Certain images are reserved by RedBoot and cannot be deleted.
2489 RedBoot will issue a warning if this is attempted.</para></note>
2490 </refsect1>
2491     <refsect1>
2492       <title>Examples</title>
2493 <para>
2494 <screen>
2495 RedBoot> <userinput>fis list</userinput>
2496 Name              flash addr   Mem addr    Length    Entry point
2497 RedBoot          0xA0000000   0xA0000000  0x020000  0x80000000
2498 RedBoot config   0xA0FC0000   0xA0FC0000  0x020000  0x00000000
2499 FIS directory    0xA0FE0000   0xA0FE0000  0x020000  0x00000000
2500 junk             0xA0040000   0x8C400000  0x020000  0x80000000
2501 RedBoot> <userinput>fis delete junk</userinput>
2502 Delete image &lsquo;junk&rsquo; - continue (y/n)? <userinput>y</userinput>
2503 ... Erase from 0xa0040000-0xa0060000: .
2504 ... Erase from 0xa0fe0000-0xa1000000: .
2505 ... Program from 0x8c7d0000-0x8c7f0000 at 0xa0fe0000: .
2506 </screen>
2507 </para>
2508 </refsect1>
2509 </refentry>
2510
2511 <!-- ******** fis lock ************************************************ -->
2512
2513   <refentry id="fis-lock-command">
2514     <refnamediv>
2515       <refname>fis lock</refname>
2516       <refpurpose>Lock flash area</refpurpose>
2517     </refnamediv>
2518     <refsynopsisdiv>
2519       <cmdsynopsis>
2520         <command>fis lock</command>
2521         <arg choice="req">-f <replaceable>flash_address</replaceable></arg>
2522         <arg choice="req">-l <replaceable>length</replaceable></arg>
2523       </cmdsynopsis>
2524     </refsynopsisdiv>
2525     <refsect1>
2526       <title>Arguments</title>
2527       <informaltable frame="all">
2528         <tgroup cols="4" colsep="1" rowsep="1" align="left">
2529           <colspec colname="c1">
2530           <colspec colname="c2">
2531           <colspec colname="c3">
2532           <colspec colname="c4">
2533           <thead>
2534             <row>
2535               <entry>Name</entry>
2536               <entry>Type</entry>
2537               <entry>Description</entry>
2538               <entry>Default</entry>
2539             </row>
2540           </thead>
2541           <tbody>
2542             <row>
2543               <entry><replaceable>flash_address</replaceable></entry>
2544               <entry>Number</entry>
2545               <entry>Address of area to be locked.</entry>
2546               <entry></entry>
2547             </row>
2548             <row>
2549               <entry><replaceable>length</replaceable></entry>
2550               <entry>Number</entry>
2551               <entry>Length of area to be locked.</entry>
2552               <entry></entry>
2553             </row>
2554           </tbody>
2555         </tgroup>
2556       </informaltable>
2557     </refsect1>
2558     <refsect1>
2559       <title>Description</title>
2560 <para>This command is used to write-protect (lock) a portion of flash memory,
2561 to prevent accidental overwriting of images. In order to make make any modifications
2562 to the flash, a matching <command>fis unlock</command> command must be
2563 issued. This command is optional and will only be provided on hardware
2564 which can support write-protection of the flash space.</para>
2565 <note>
2566 <para>Depending on the system, attempting to write to write-protected flash
2567 may generate errors or warnings, or be benignly quiet.  </para>
2568 </note>
2569 </refsect1>
2570
2571     <refsect1>
2572       <title>Examples</title>
2573 <para>Lock an area of the flash
2574 <screen>
2575 RedBoot> <userinput>fis lock -f 0xa0040000 -l 0x20000</userinput>
2576 ... Lock from 0xa0040000-0xa0060000: .
2577 </screen>
2578 </para>
2579 </refsect1>
2580 </refentry>
2581
2582 <!-- ******** fis unlock ************************************************ -->
2583
2584   <refentry id="fis-unlock-command">
2585     <refnamediv>
2586       <refname>fis unlock</refname>
2587       <refpurpose>Unlock flash area</refpurpose>
2588     </refnamediv>
2589     <refsynopsisdiv>
2590       <cmdsynopsis>
2591         <command>fis unlock</command>
2592         <arg choice="req">-f <replaceable>flash_address</replaceable></arg>
2593         <arg choice="req">-l <replaceable>length</replaceable></arg>
2594       </cmdsynopsis>
2595     </refsynopsisdiv>
2596     <refsect1>
2597       <title>Arguments</title>
2598       <informaltable frame="all">
2599         <tgroup cols="4" colsep="1" rowsep="1" align="left">
2600           <colspec colname="c1">
2601           <colspec colname="c2">
2602           <colspec colname="c3">
2603           <colspec colname="c4">
2604           <thead>
2605             <row>
2606               <entry>Name</entry>
2607               <entry>Type</entry>
2608               <entry>Description</entry>
2609               <entry>Default</entry>
2610             </row>
2611           </thead>
2612           <tbody>
2613             <row>
2614               <entry><replaceable>flash_address</replaceable></entry>
2615               <entry>Number</entry>
2616               <entry>Address of area to be unlocked.</entry>
2617               <entry></entry>
2618             </row>
2619             <row>
2620               <entry><replaceable>length</replaceable></entry>
2621               <entry>Number</entry>
2622               <entry>Length of area to be unlocked.</entry>
2623               <entry></entry>
2624             </row>
2625           </tbody>
2626         </tgroup>
2627       </informaltable>
2628     </refsect1>
2629     <refsect1>
2630       <title>Description</title>
2631 <para>This command is used to unlock a portion of flash memory forcibly, allowing
2632 it to be updated. It must be issued for regions which have been locked before
2633 the FIS can reuse those portions of flash.</para>
2634 <note>
2635 <para>Some flash devices power up in locked state and always need to
2636 be manually unlocked before they can be written to.</para></note>
2637 </refsect1>
2638
2639     <refsect1>
2640       <title>Examples</title>
2641 <para>Unlock an area of the flash
2642 <screen>
2643 RedBoot> <userinput>fis unlock -f 0xa0040000 -l 0x20000</userinput>
2644 ... Unlock from 0xa0040000-0xa0060000: .
2645 </screen>
2646 </para>
2647 </refsect1>
2648 </refentry>
2649
2650 <!-- ******** fis erase ************************************************ -->
2651
2652   <refentry id="fis-erase-command">
2653     <refnamediv>
2654       <refname>fis erase</refname>
2655       <refpurpose>Erase flash area</refpurpose>
2656     </refnamediv>
2657     <refsynopsisdiv>
2658       <cmdsynopsis>
2659         <command>fis erase</command>
2660         <arg choice="req">-f <replaceable>flash_address</replaceable></arg>
2661         <arg choice="req">-l <replaceable>length</replaceable></arg>
2662       </cmdsynopsis>
2663     </refsynopsisdiv>
2664     <refsect1>
2665       <title>Arguments</title>
2666       <informaltable frame="all">
2667         <tgroup cols="4" colsep="1" rowsep="1" align="left">
2668           <colspec colname="c1">
2669           <colspec colname="c2">
2670           <colspec colname="c3">
2671           <colspec colname="c4">
2672           <thead>
2673             <row>
2674               <entry>Name</entry>
2675               <entry>Type</entry>
2676               <entry>Description</entry>
2677               <entry>Default</entry>
2678             </row>
2679           </thead>
2680           <tbody>
2681             <row>
2682               <entry><replaceable>flash_address</replaceable></entry>
2683               <entry>Number</entry>
2684               <entry>Address of area to be erased.</entry>
2685               <entry></entry>
2686             </row>
2687             <row>
2688               <entry><replaceable>length</replaceable></entry>
2689               <entry>Number</entry>
2690               <entry>Length of area to be erased.</entry>
2691               <entry></entry>
2692             </row>
2693           </tbody>
2694         </tgroup>
2695       </informaltable>
2696     </refsect1>
2697     <refsect1>
2698       <title>Description</title>
2699 <para>This command is used to erase a portion of flash memory forcibly. There
2700 is no cross-checking to ensure that the area being erased does not correspond
2701 to an existing image.</para>
2702 </refsect1>
2703
2704     <refsect1>
2705       <title>Examples</title>
2706 <para>Erase an area of the flash
2707 <screen>
2708 RedBoot> <userinput>fis erase -f 0xa0040000 -l 0x20000</userinput>
2709 ... Erase from 0xa0040000-0xa0060000: .
2710 </screen>
2711 </para>
2712 </refsect1>
2713 </refentry>
2714
2715 <!-- ******** fis write ************************************************ -->
2716
2717   <refentry id="fis-write-command">
2718     <refnamediv>
2719       <refname>fis write</refname>
2720       <refpurpose>Write flash area</refpurpose>
2721     </refnamediv>
2722     <refsynopsisdiv>
2723       <cmdsynopsis>
2724         <command>fis write</command>
2725         <arg choice="req">-b <replaceable>mem_address</replaceable></arg>
2726         <arg choice="req">-l <replaceable>length</replaceable></arg>
2727         <arg choice="req">-f <replaceable>flash_address</replaceable></arg>
2728       </cmdsynopsis>
2729     </refsynopsisdiv>
2730     <refsect1>
2731       <title>Arguments</title>
2732       <informaltable frame="all">
2733         <tgroup cols="4" colsep="1" rowsep="1" align="left">
2734           <colspec colname="c1">
2735           <colspec colname="c2">
2736           <colspec colname="c3">
2737           <colspec colname="c4">
2738           <thead>
2739             <row>
2740               <entry>Name</entry>
2741               <entry>Type</entry>
2742               <entry>Description</entry>
2743               <entry>Default</entry>
2744             </row>
2745           </thead>
2746           <tbody>
2747             <row>
2748               <entry><replaceable>mem_address</replaceable></entry>
2749               <entry>Number</entry>
2750               <entry>Address of data to be written to flash.</entry>
2751               <entry></entry>
2752             </row>
2753             <row>
2754               <entry><replaceable>length</replaceable></entry>
2755               <entry>Number</entry>
2756               <entry>Length of data to be writtem.</entry>
2757               <entry></entry>
2758             </row>
2759             <row>
2760               <entry><replaceable>flash_address</replaceable></entry>
2761               <entry>Number</entry>
2762               <entry>Address of flash to write to.</entry>
2763               <entry></entry>
2764             </row>
2765           </tbody>
2766         </tgroup>
2767       </informaltable>
2768     </refsect1>
2769     <refsect1>
2770       <title>Description</title>
2771 <para>This command is used to write data from memory to flash. There
2772 is no cross-checking to ensure that the area being written to does not
2773 correspond to an existing image.</para>
2774 </refsect1>
2775
2776     <refsect1>
2777       <title>Examples</title>
2778 <para>Write an area of data to the flash
2779 <screen>
2780 RedBoot> <userinput>fis write -b 0x0606f000 -l 0x1000 -f 0x00020000</userinput>
2781 * CAUTION * about to program FLASH
2782             at 0x00020000..0x0002ffff from 0x0606f000 - continue (y/n)? <userinput>y</userinput>
2783 ... Erase from 0x00020000-0x00030000: .
2784 ... Program from 0x0606f000-0x0607f000 at 0x00020000: .
2785 </screen>
2786 </para>
2787 </refsect1>
2788 </refentry>
2789
2790 </sect1>
2791 <sect1 id="Persistent-State-Flash">
2792 <title>Persistent State Flash-based Configuration and Control</title>
2793 <para><indexterm><primary>persistent state flash-based configuration and control
2794 </primary></indexterm><indexterm><primary>flash-based configuration and control
2795 </primary></indexterm><indexterm><primary>configuration and control</primary>
2796 <secondary>flash-based</secondary></indexterm></para>
2797 <para>RedBoot provides flash management support for storage in the flash memory
2798 of multiple executable images and of non-volatile information such as IP addresses
2799 and other network information.</para>
2800 <para>RedBoot on platforms that support flash based configuration information
2801 will report the following message the first time that RedBoot is booted on
2802 the target:</para>
2803 <screen>flash configuration checksum error or invalid key</screen>
2804 <para>This error can be ignored if no flash based configuration is desired,
2805 or can be silenced by running the <command>fconfig</command>
2806 command as described below. At this point you may also wish to run the <command>
2807 fis init</command> command. See other fis commands in <xref linkend="Flash-Image-System">.
2808 </para>
2809 <para>Certain control and configuration information used by RedBoot can be
2810 stored in flash. </para>
2811 <para>The details of what information is maintained in flash differ, based
2812 on the platform and the configuration. However, the basic operation used to
2813 maintain this information is the same. Using the <command>fconfig -l
2814 </command> command, the information may be displayed and/or changed.
2815 </para>
2816 <para>If the optional flag <computeroutput>-i</computeroutput> is specified,
2817 then the configuration database will be reset to its default
2818 state. This is also needed the first time RedBoot is installed on the
2819 target, or when updating to a newer RedBoot with different
2820 configuration keys.
2821 </para>
2822 <para>If the optional flag <computeroutput>-l</computeroutput> is specified,
2823 the configuration data is simply listed. Otherwise, each configuration parameter
2824 will be displayed and you are given a chance to change it. The entire value
2825 must be typed - typing just carriage return will leave a value unchanged.
2826 Boolean values may be entered using the first letter (<computeroutput>t</computeroutput>
2827 for true, <computeroutput>f</computeroutput> for false). At any time the editing
2828 process may be stopped simply by entering a period (.) on the line. Entering
2829 the caret (^) moves the editing back to the previous item. See &ldquo;RedBoot
2830 Editing Commands&rdquo;, <xref linkend="RedBoot-Editing-Commands">. </para>
2831 <para>If any changes are made in the configuration, then the updated data
2832 will be written back to flash after getting acknowledgment from the user.
2833 </para>
2834 <para>
2835 If the optional flag <computeroutput>-n</computeroutput> is specified
2836 (with or without <computeroutput>-l</computeroutput>) then &ldquo;nicknames&rdquo;
2837 of the entries are used.  These are shorter and less descriptive than
2838 &ldquo;full&rdquo; names.  The full name may also be displayed by adding the
2839 <computeroutput>-f</computeroutput> flag.</para>
2840 <para>The reason for telling you nicknames is that a quick way to set a single
2841 entry is provided, using the format
2842 <screen>
2843   RedBoot> <userinput>fconfig <replaceable>nickname</replaceable> <replaceable>value
2844 </replaceable></userinput></screen>
2845 If no
2846 value is supplied, the command will list and prompt for only that entry.
2847 If a value is supplied, then the entry will be set to that value.  You will
2848 be prompted whether to write the new information into flash if any change
2849 was made.  For example
2850 <screen>
2851   RedBoot> <userinput>fconfig -l -n</userinput>
2852   boot_script: false
2853   bootp: false
2854   bootp_my_ip: 10.16.19.176
2855   bootp_server_ip: 10.16.19.66
2856   dns_ip: 10.16.19.1
2857   gdb_port: 9000
2858   net_debug: false
2859   RedBoot> <userinput>fconfig bootp_my_ip 10.16.19.177</userinput>
2860   bootp_my_ip: 10.16.19.176 Setting to 10.16.19.177
2861   Update RedBoot non-volatile configuration - continue (y/n)? <userinput>y</userinput>
2862   ... Unlock from 0x507c0000-0x507e0000: .
2863   ... Erase from 0x507c0000-0x507e0000: .
2864   ... Program from 0x0000a8d0-0x0000acd0 at 0x507c0000: .
2865   ... Lock from 0x507c0000-0x507e0000: .
2866   RedBoot>
2867 </screen>
2868 </para><para>
2869 Additionally, nicknames can be used like aliases via the format %{nickname}.
2870 This allows the values stored by <userinput>fconfig</userinput> to be used
2871 directly by scripts and commands.
2872 </para>
2873 <para>Depending on how your terminal program is connected and its
2874 capabilities, you might find that you are unable to use line-editing to
2875 delete the &lsquo;old&rsquo; value when using the default behaviour of
2876 <command>fconfig <replaceable>nickname</replaceable></command> or just
2877 plain <command>fconfig</command>, as shown in this example:
2878 <screen>
2879 RedBoot> <userinput>fco bootp</userinput>
2880 bootp: false&lowbar;
2881 </screen>
2882 The user deletes the word &ldquo;false;&rdquo and enters &ldquo;true&rdquo;
2883 so the display looks like this:
2884 <screen>
2885 RedBoot> <userinput>fco bootp</userinput>
2886 bootp: <userinput>true</userinput>
2887 Update RedBoot non-volatile configuration - continue (y/n)? y
2888 ... Unlock from ...
2889 RedBoot> &lowbar;
2890 </screen>
2891 </para>
2892 <para>To edit when you cannot backspace, use the optional flag
2893 <computeroutput>-d</computeroutput> (for &ldquo;dumb terminal&rdquo;)
2894 to provide a simpler interface thus:
2895 <screen>
2896 RedBoot> <userinput>fco -d bootp</userinput>
2897 bootp: false ? &lowbar;
2898 </screen>
2899 and you enter the value in the obvious manner thus:
2900 <screen>
2901 RedBoot> <userinput>fco -d bootp</userinput>
2902 bootp: false ? <userinput>true</userinput>
2903 Update RedBoot non-volatile configuration - continue (y/n)? y
2904 ... Unlock from ...
2905 RedBoot> &lowbar;
2906 </screen>
2907 </para>
2908 <para>One item which is always present in the configuration data is the ability
2909 to execute a script at boot time. A sequence of RedBoot commands can be entered
2910 which will be executed when the system starts up. Optionally, a time-out period
2911 can be provided which allows the user to abort the startup script and proceed
2912 with normal command processing from the console.     </para>
2913 <para><screen>
2914 RedBoot> <userinput>fconfig -l</userinput>
2915 Run script at boot: false
2916 Use BOOTP for network configuration: false
2917 Local IP address: 192.168.1.29
2918 Default server IP address: 192.168.1.101
2919 DNS server IP address: 192.168.1.1
2920 GDB connection port: 9000
2921 Network debug at boot time: false
2922 </screen></para>
2923 <para>The following example sets a boot script and then shows it running.
2924     </para>
2925 <para>
2926 <screen>
2927 RedBoot> <userinput>fconfig</userinput>
2928 Run script at boot: false <userinput>t</userinput>
2929       Boot script:
2930 Enter script, terminate with empty line
2931 >> <userinput>fi li</userinput>
2932     Boot script timeout: 0 <userinput>10</userinput>
2933 Use BOOTP for network configuration: false .
2934 Update RedBoot non-volatile configuration - continue (y/n)? <userinput>y</userinput>
2935 ... Erase from 0xa0fc0000-0xa0fe0000: .
2936 ... Program from 0x8c021f60-0x8c022360 at 0xa0fc0000: .
2937 RedBoot>
2938 RedBoot(tm) debug environment - built 08:22:24, Aug 23 2000
2939 Copyright (C) 2000, Red Hat, Inc.
2940
2941
2942 RAM: 0x8c000000-0x8c800000
2943 flash: 0xa0000000 - 0xa1000000, 128 blocks of 0x00020000 bytes ea.
2944 Socket Communications, Inc: Low Power Ethernet CF Revision C \
2945 5V/3.3V 08/27/98 IP: 192.168.1.29, Default server: 192.168.1.101 \
2946 == Executing boot script in 10 seconds - enter ^C to abort
2947 RedBoot> <userinput>fi li</userinput>
2948 Name              flash addr   Mem addr    Length    Entry point
2949 RedBoot          0xA0000000   0xA0000000  0x020000  0x80000000
2950 RedBoot config   0xA0FC0000   0xA0FC0000  0x020000  0x00000000
2951 FIS directory    0xA0FE0000   0xA0FE0000  0x020000  0x00000000
2952 RedBoot>
2953 </screen>
2954 </para>
2955 <note><title>NOTE</title>
2956 <para>The bold characters above indicate where something was entered on the
2957 console. As you can see, the <command>fi li</command> command
2958 at the end came from the script,
2959 not the console. Once the script is executed, command processing reverts to
2960 the console. </para>
2961 </note>
2962 <para>
2963 <note><title>NOTE</title>
2964 <para>
2965 RedBoot supports the notion of a boot script timeout, i.e. a period of
2966 time that RedBoot waits before executing the boot time script.  This period
2967 is primarily to allow the possibility of canceling the script.  Since
2968 a timeout value of zero (0) seconds would never allow the script to
2969 be aborted or canceled, this value is not allowed.  If the timeout
2970 value is zero, then RedBoot will abort the script execution immediately.
2971 </para>
2972 </note>
2973 On many targets, RedBoot may be configured to run from ROM or it may be
2974 configured to run from RAM. Other configurations are also possible. All
2975 RedBoot configurations will execute the boot script, but in certain cases
2976 it may be desirable to limit the execution of certain script commands to
2977 one RedBoot configuration or the other. This can be accomplished by
2978 prepending <computeroutput>{&lt;startup type>}</computeroutput> to the
2979 commands which should be executed only by the RedBoot configured for the
2980 specified startup type. The following boot script illustrates this concept
2981 by having the ROM based RedBoot load and run the RAM based RedBoot. The RAM
2982 based RedBoot will then list flash images.</para>
2983 <para><screen>
2984 RedBoot> <userinput>fco</userinput>
2985 Run script at boot: false <userinput>t</userinput>
2986 Boot script:
2987 Enter script, terminate with empty line
2988 >> <userinput>{ROM}fis load RedBoot[RAM]</userinput>
2989 >> <userinput>{ROM}go</userinput>
2990 >> <userinput>{RAM}fis li</userinput>
2991 >>
2992 Boot script timeout (1000ms resolution): <userinput>2</userinput>
2993 Use BOOTP for network configuration: <userinput>false</userinput>
2994  ...
2995 Update RedBoot non-volatile configuration - continue (y/n)? <userinput>y</userinput>
2996 ... Unlock from 0x007c0000-0x007e0000: .
2997 ... Erase from 0x007c0000-0x007e0000: .
2998 ... Program from 0xa0015030-0xa0016030 at 0x007df000: .
2999 ... Lock from 0x007c0000-0x007e0000: .
3000 RedBoot> <userinput>reset</userinput>
3001 ... Resetting.
3002 +Ethernet eth0: MAC address 00:80:4d:46:01:05
3003 IP: 192.168.1.153, Default server: 192.168.1.10
3004
3005 RedBoot(tm) bootstrap and debug environment [ROM]
3006 Red Hat certified release, version R1.xx - built 17:37:36, Aug 14 2001
3007
3008 Platform: IQ80310 (XScale)
3009 Copyright (C) 2000, 2001, Red Hat, Inc.
3010
3011 RAM: 0xa0000000-0xa2000000, 0xa001b088-0xa1fdf000 available
3012 FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each.
3013 == Executing boot script in 2.000 seconds - enter ^C to abort
3014 RedBoot> <userinput>fis load RedBoot[RAM]</userinput>
3015 RedBoot> <userinput>go</userinput>
3016 +Ethernet eth0: MAC address 00:80:4d:46:01:05
3017 IP: 192.168.1.153, Default server: 192.168.1.10
3018
3019 RedBoot(tm) bootstrap and debug environment [RAM]
3020 Red Hat certified release, version R1.xx - built 13:03:47, Aug 14 2001
3021
3022 Platform: IQ80310 (XScale)
3023 Copyright (C) 2000, 2001, Red Hat, Inc.
3024
3025 RAM: 0xa0000000-0xa2000000, 0xa0057fe8-0xa1fdf000 available
3026 FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each.
3027 == Executing boot script in 2.000 seconds - enter ^C to abort
3028 RedBoot> <userinput>fis li</userinput>
3029 Name              FLASH addr  Mem addr    Length      Entry point
3030 RedBoot           0x00000000  0x00000000  0x00040000  0x00002000
3031 RedBoot config    0x007DF000  0x007DF000  0x00001000  0x00000000
3032 FIS directory     0x007E0000  0x007E0000  0x00020000  0x00000000
3033 RedBoot>
3034 </screen></para>
3035 </sect1>
3036 <sect1 id="executing-programs">
3037 <title>Executing Programs from RedBoot</title>
3038 <para><indexterm><primary>executing programs</primary></indexterm><indexterm>
3039 <primary>RedBoot</primary><secondary>executing programs</secondary></indexterm>Once
3040 an image has been loaded into memory, either via the <command>load
3041 </command> command or the <command>fis load</command>
3042 command, execution may be transfered to that image.</para>
3043 <para>  <note><title>NOTE</title>
3044 <para>The image is assumed to be a stand-alone entity, as RedBoot gives the
3045 entire platform over to it. Typical examples would be an eCos application
3046 or a Linux kernel.</para>
3047 </note></para>
3048
3049
3050 <!-- ******** go *************************************************** -->
3051   <refentry id="go-command">
3052     <refnamediv>
3053       <refname>go</refname>
3054       <refpurpose>Execute a program</refpurpose>
3055     </refnamediv>
3056     <refsynopsisdiv>
3057       <cmdsynopsis>
3058         <command>go</command>
3059         <arg>-w <replaceable> timeout</replaceable></arg>
3060         <arg>-c</arg>
3061         <arg>-n</arg>
3062         <arg><replaceable> start_address</replaceable></arg>
3063       </cmdsynopsis>
3064     </refsynopsisdiv>
3065     <refsect1>
3066       <title>Arguments</title>
3067       <informaltable frame="all">
3068         <tgroup cols="4" colsep="1" rowsep="1" align="left">
3069           <colspec colname="c1">
3070           <colspec colname="c2">
3071           <colspec colname="c3">
3072           <colspec colname="c4">
3073           <thead>
3074             <row>
3075               <entry>Name</entry>
3076               <entry>Type</entry>
3077               <entry>Description</entry>
3078               <entry>Default</entry>
3079             </row>
3080           </thead>
3081           <tbody>
3082             <row>
3083               <entry>-w <replaceable>timeout</replaceable></entry>           
3084               <entry>Number</entry>
3085               <entry>How long to wait before starting execution.</entry>             
3086               <entry>0</entry>       
3087             </row>
3088             <row>
3089               <entry>-c</entry>      
3090               <entry>Boolean</entry>
3091               <entry>Go with caches enabled.</entry>         
3092               <entry>caches off</entry>      
3093             </row>
3094             <row>
3095               <entry>-n</entry>      
3096               <entry>Boolean</entry>
3097               <entry>Go with network interface stopped.</entry>      
3098               <entry>network enabled</entry>         
3099             </row>
3100             <row>
3101               <entry><replaceable>start_address</replaceable></entry>        
3102               <entry>Number</entry>
3103               <entry>Address in memory to begin execution.</entry>           
3104               <entry>Value set by last <command>load</command> or <command>fis load</command> command.</entry>       
3105             </row>
3106           </tbody>
3107         </tgroup>
3108       </informaltable>
3109     </refsect1>
3110     <refsect1>
3111       <title>Description</title>
3112       <para>
3113 The <command>go</command> command causes RedBoot to give control of the target platform to
3114 another program.  This program must execute stand alone, e.g. an eCos
3115 application or a Linux kernel.
3116       </para>
3117       <para>
3118 If the -w option is used, RedBoot will print a message and then
3119 wait for a period of time before starting the execution.  This is
3120 most useful in a script, giving the user a chance to abort executing
3121 a program and move on in the script.
3122       </para>
3123     </refsect1>
3124     <refsect1>
3125       <title>Examples</title>
3126       <para>
3127 Execute a program - <emphasis>no explicit output from RedBoot</emphasis>.
3128 <screen>
3129 RedBoot> <userinput>go 0x40040</userinput>
3130 </screen> 
3131       </para>
3132       <para>
3133 Execute a program with a timeout.
3134 <screen>
3135 RedBoot> <userinput>go -w 10</userinput>
3136 About to start execution at 0x00000000 - abort with ^C within 10 seconds
3137 ^C
3138 RedBoot>
3139 </screen> 
3140 Note that the starting address was implied (0x00000000 in this example).
3141 The user is prompted that execution will commence in 10 seconds.  At
3142 anytime within that 10 seconds the user may type  <guibutton>Ctrl+C</guibutton>
3143 on the console and RedBoot will abort execution and return for the next
3144 command, either from a script or the console.
3145       </para>
3146     </refsect1>
3147   </refentry>
3148
3149 <!-- ******** exec *************************************************** -->
3150   <refentry id="exec-command">
3151     <refnamediv>
3152       <refname>exec</refname>
3153       <refpurpose>Execute a Linux kernel</refpurpose>
3154     </refnamediv>
3155     <refsynopsisdiv>
3156       <cmdsynopsis>
3157         <command>exec</command>
3158         <arg>-w <replaceable> timeout</replaceable></arg>
3159         <arg>-r <replaceable> ramdisk_address</replaceable></arg>
3160         <arg>-s <replaceable> ramdisk_length</replaceable></arg>
3161         <arg>-b <replaceable> load_address</replaceable>
3162            <arg choice="req">-l <replaceable> load_length</replaceable></arg>
3163         </arg>
3164         <arg>-c <replaceable> kernel_command_line</replaceable></arg>
3165         <arg><replaceable> entry_point</replaceable></arg>
3166       </cmdsynopsis>
3167     </refsynopsisdiv>
3168     <refsect1>
3169       <title>Arguments</title>
3170       <informaltable frame="all">
3171         <tgroup cols="4" colsep="1" rowsep="1" align="left">
3172           <colspec colname="c1">
3173           <colspec colname="c2">
3174           <colspec colname="c3">
3175           <colspec colname="c4">
3176           <thead>
3177             <row>
3178               <entry>Name</entry>
3179               <entry>Type</entry>
3180               <entry>Description</entry>
3181               <entry>Default</entry>
3182             </row>
3183           </thead>
3184           <tbody>
3185             <row>
3186               <entry>-w <replaceable>timeout</replaceable></entry>           
3187               <entry>Number</entry>
3188               <entry>Time to wait before starting execution.</entry>         
3189               <entry>0</entry>       
3190             </row>
3191             <row>
3192               <entry>-r <replaceable>ramdisk_address</replaceable></entry>           
3193               <entry>Number</entry>
3194               <entry>Address in memory of "initrd"-style ramdisk - passed to Linux kernel.</entry>           
3195               <entry><emphasis>None</emphasis></entry>       
3196             </row>
3197             <row>
3198               <entry>-s <replaceable>ramdisk_length</replaceable></entry>            
3199               <entry>Number</entry>
3200               <entry>Length of ramdisk image - passed to Linux kernel.</entry>       
3201               <entry><emphasis>None</emphasis></entry>       
3202             </row>
3203             <row>
3204               <entry>-b <replaceable>load_address</replaceable></entry>      
3205               <entry>Number</entry>
3206               <entry>Address in memory of the Linux kernel image.</entry>            
3207               <entry>Value set by <command>load</command> or <command>fis load</command></entry>             
3208             </row>
3209             <row>
3210               <entry>-l <replaceable>load_length</replaceable></entry>       
3211               <entry>Number</entry>
3212               <entry>Length of Linux kernel image.</entry>
3213               <entry><emphasis>none</emphasis></entry>       
3214             </row>
3215             <row>
3216               <entry>-c <replaceable>kernel_command_line</replaceable></entry>       
3217               <entry>String</entry>
3218               <entry>Command line to pass to the Linux kernel.</entry>       
3219               <entry><emphasis>None</emphasis></entry>       
3220             </row>
3221             <row>
3222               <entry>-x</entry>      
3223               <entry></entry>
3224               <entry>Boot kernel with endianess opposite of RedBoot endianess.</entry>       
3225               <entry>Boot kernel with same endianess as RedBoot</entry>      
3226               </row>
3227             <row>
3228               <entry><replaceable>entry_address</replaceable></entry>        
3229               <entry>Number</entry>
3230               <entry>Starting address for Linux kernel execution</entry>             
3231               <entry>Implied by architecture</entry>         
3232             </row>
3233           </tbody>
3234         </tgroup>
3235       </informaltable>
3236     </refsect1>
3237     <refsect1>
3238       <title>Description</title>
3239       <para>
3240 The <command>exec</command> command is used to execute a non-eCos application, typically a
3241 Linux kernel. Additional information may be passed to the kernel at startup
3242 time. This command is quite special (and unique from the <command>go</command> command) in
3243 that the program being executed may expect certain environmental setups, for
3244 example that the MMU is turned off, etc. </para>
3245 <para>The Linux kernel expects to have been loaded to a particular memory
3246 location which is architecture dependent(0xC0008000 in the case of the SA1110). 
3247 Since this memory is  used
3248 by RedBoot internally, it is not possible to load the kernel to that location
3249 directly. Thus the requirement for the "-b" option which tells the command
3250 where the kernel has been loaded. When the <command>exec</command> command runs, the image will
3251 be relocated to the appropriate location before being started. The "-r" and
3252 "-s" options are used to pass information to the kernel about where a statically
3253 loaded ramdisk (initrd) is located.</para>
3254 <para>The "-c" option can be used to pass textual "command line" information
3255 to the kernel.  If the command line data contains any punctuation (spaces,
3256 etc), then it must be quoted using the double-quote character '"'. If the
3257 quote character is required, it should be written as '\"'.
3258       </para>
3259 <para>The "-x" option is optionally available on some bi-endian platforms. It is used to boot
3260 a kernel built with an endianess opposite of RedBoot.</para>
3261     </refsect1>
3262     <refsect1>
3263       <title>Examples</title>
3264       <para>
3265 Execute a Linux kernel, passing a command line, which needs relocation.
3266 The result from RedBoot is normally quiet, with the target platform being
3267 passed over to Linux immediately.
3268 <screen>
3269 RedBoot> <userinput>exec -b 0x100000 -l 0x80000 -c "noinitrd root=/dev/mtdblock3 console=ttySA0"</userinput>
3270 </screen> 
3271       </para>
3272       <para>
3273 Execute a Linux kernel, default entry address and no relocation required, with a timeout.  
3274 The <emphasis> emphasized lines</emphasis> are output from the loaded kernel.
3275 <screen> 
3276 RedBoot> exec <userinput>-c "console=ttyS0,38400 ip=dhcp nfsroot=/export/elfs-sh" -w 5</userinput>
3277 Now booting linux kernel:
3278 Base address 0x8c001000 Entry 0x8c210000
3279 Cmdline : console=ttyS0,38400 ip=dhcp nfsroot=/export/elfs-sh
3280 About to start execution at 0x8x210000 - abort with ^C within 5 seconds
3281 <emphasis>
3282 Linux version 2.4.10-pre6 (...) (gcc version 3.1-stdsh-010931) #3 Thu Sep 27 11:04:23 BST 2001
3283 </emphasis>
3284 </screen> 
3285       </para>
3286     </refsect1>
3287   </refentry>
3288
3289 </sect1>
3290 </chapter>