<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- permission is obtained from the copyright holder. -->
|
<!-- permission is obtained from the copyright holder. -->
|
<HTML
|
<HTML
|
><HEAD
|
><HEAD
|
><TITLE
|
><TITLE
|
>Persistent State Flash-based Configuration and Control</TITLE
|
>Persistent State Flash-based Configuration and Control</TITLE
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
<META
|
<META
|
NAME="GENERATOR"
|
NAME="GENERATOR"
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
"><LINK
|
"><LINK
|
REL="HOME"
|
REL="HOME"
|
TITLE="eCos Reference Manual"
|
TITLE="eCos Reference Manual"
|
HREF="ecos-ref.html"><LINK
|
HREF="ecos-ref.html"><LINK
|
REL="UP"
|
REL="UP"
|
TITLE="RedBoot Commands and Examples"
|
TITLE="RedBoot Commands and Examples"
|
HREF="redboot-commands-and-examples.html"><LINK
|
HREF="redboot-commands-and-examples.html"><LINK
|
REL="PREVIOUS"
|
REL="PREVIOUS"
|
TITLE="fis write"
|
TITLE="fis write"
|
HREF="fis-write-command.html"><LINK
|
HREF="fis-write-command.html"><LINK
|
REL="NEXT"
|
REL="NEXT"
|
TITLE="Executing Programs from RedBoot"
|
TITLE="Executing Programs from RedBoot"
|
HREF="executing-programs.html"></HEAD
|
HREF="executing-programs.html"></HEAD
|
><BODY
|
><BODY
|
CLASS="SECT1"
|
CLASS="SECT1"
|
BGCOLOR="#FFFFFF"
|
BGCOLOR="#FFFFFF"
|
TEXT="#000000"
|
TEXT="#000000"
|
LINK="#0000FF"
|
LINK="#0000FF"
|
VLINK="#840084"
|
VLINK="#840084"
|
ALINK="#0000FF"
|
ALINK="#0000FF"
|
><DIV
|
><DIV
|
CLASS="NAVHEADER"
|
CLASS="NAVHEADER"
|
><TABLE
|
><TABLE
|
SUMMARY="Header navigation table"
|
SUMMARY="Header navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TH
|
><TH
|
COLSPAN="3"
|
COLSPAN="3"
|
ALIGN="center"
|
ALIGN="center"
|
>eCos Reference Manual</TH
|
>eCos Reference Manual</TH
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="fis-write-command.html"
|
HREF="fis-write-command.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="80%"
|
WIDTH="80%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
>Chapter 2. RedBoot Commands and Examples</TD
|
>Chapter 2. RedBoot Commands and Examples</TD
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="executing-programs.html"
|
HREF="executing-programs.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"></DIV
|
WIDTH="100%"></DIV
|
><DIV
|
><DIV
|
CLASS="SECT1"
|
CLASS="SECT1"
|
><H1
|
><H1
|
CLASS="SECT1"
|
CLASS="SECT1"
|
><A
|
><A
|
NAME="PERSISTENT-STATE-FLASH">Persistent State Flash-based Configuration and Control</H1
|
NAME="PERSISTENT-STATE-FLASH">Persistent State Flash-based Configuration and Control</H1
|
><P
|
><P
|
></P
|
></P
|
><P
|
><P
|
>RedBoot provides flash management support for storage in the flash memory
|
>RedBoot provides flash management support for storage in the flash memory
|
of multiple executable images and of non-volatile information such as IP addresses
|
of multiple executable images and of non-volatile information such as IP addresses
|
and other network information.</P
|
and other network information.</P
|
><P
|
><P
|
>RedBoot on platforms that support flash based configuration information
|
>RedBoot on platforms that support flash based configuration information
|
will report the following message the first time that RedBoot is booted on
|
will report the following message the first time that RedBoot is booted on
|
the target:</P
|
the target:</P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>flash configuration checksum error or invalid key</PRE
|
>flash configuration checksum error or invalid key</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><P
|
><P
|
>This error can be ignored if no flash based configuration is desired,
|
>This error can be ignored if no flash based configuration is desired,
|
or can be silenced by running the <B
|
or can be silenced by running the <B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>fconfig</B
|
>fconfig</B
|
>
|
>
|
command as described below. At this point you may also wish to run the <B
|
command as described below. At this point you may also wish to run the <B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>fis init</B
|
>fis init</B
|
> command. See other fis commands in <A
|
> command. See other fis commands in <A
|
HREF="flash-image-system.html"
|
HREF="flash-image-system.html"
|
>the Section called <I
|
>the Section called <I
|
>Flash Image System (FIS)</I
|
>Flash Image System (FIS)</I
|
></A
|
></A
|
>.</P
|
>.</P
|
><P
|
><P
|
>Certain control and configuration information used by RedBoot can be
|
>Certain control and configuration information used by RedBoot can be
|
stored in flash. </P
|
stored in flash. </P
|
><P
|
><P
|
>The details of what information is maintained in flash differ, based
|
>The details of what information is maintained in flash differ, based
|
on the platform and the configuration. However, the basic operation used to
|
on the platform and the configuration. However, the basic operation used to
|
maintain this information is the same. Using the <B
|
maintain this information is the same. Using the <B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>fconfig -l</B
|
>fconfig -l</B
|
> command, the information may be displayed and/or changed.</P
|
> command, the information may be displayed and/or changed.</P
|
><P
|
><P
|
>If the optional flag <TT
|
>If the optional flag <TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>-i</TT
|
>-i</TT
|
> is specified,
|
> is specified,
|
then the configuration database will be reset to its default
|
then the configuration database will be reset to its default
|
state. This is also needed the first time RedBoot is installed on the
|
state. This is also needed the first time RedBoot is installed on the
|
target, or when updating to a newer RedBoot with different
|
target, or when updating to a newer RedBoot with different
|
configuration keys.</P
|
configuration keys.</P
|
><P
|
><P
|
>If the optional flag <TT
|
>If the optional flag <TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>-l</TT
|
>-l</TT
|
> is specified,
|
> is specified,
|
the configuration data is simply listed. Otherwise, each configuration parameter
|
the configuration data is simply listed. Otherwise, each configuration parameter
|
will be displayed and you are given a chance to change it. The entire value
|
will be displayed and you are given a chance to change it. The entire value
|
must be typed - typing just carriage return will leave a value unchanged.
|
must be typed - typing just carriage return will leave a value unchanged.
|
Boolean values may be entered using the first letter (<TT
|
Boolean values may be entered using the first letter (<TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>t</TT
|
>t</TT
|
>
|
>
|
for true, <TT
|
for true, <TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>f</TT
|
>f</TT
|
> for false). At any time the editing
|
> for false). At any time the editing
|
process may be stopped simply by entering a period (.) on the line. Entering
|
process may be stopped simply by entering a period (.) on the line. Entering
|
the caret (^) moves the editing back to the previous item. See “RedBoot
|
the caret (^) moves the editing back to the previous item. See “RedBoot
|
Editing Commands”, <A
|
Editing Commands”, <A
|
HREF="redboot-editing-commands.html"
|
HREF="redboot-editing-commands.html"
|
>the Section called <I
|
>the Section called <I
|
>RedBoot Editing Commands</I
|
>RedBoot Editing Commands</I
|
> in Chapter 1</A
|
> in Chapter 1</A
|
>. </P
|
>. </P
|
><P
|
><P
|
>If any changes are made in the configuration, then the updated data
|
>If any changes are made in the configuration, then the updated data
|
will be written back to flash after getting acknowledgment from the user.</P
|
will be written back to flash after getting acknowledgment from the user.</P
|
><P
|
><P
|
>If the optional flag <TT
|
>If the optional flag <TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>-n</TT
|
>-n</TT
|
> is specified
|
> is specified
|
(with or without <TT
|
(with or without <TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>-l</TT
|
>-l</TT
|
>) then “nicknames”
|
>) then “nicknames”
|
of the entries are used. These are shorter and less descriptive than
|
of the entries are used. These are shorter and less descriptive than
|
“full” names. The full name may also be displayed by adding the
|
“full” names. The full name may also be displayed by adding the
|
<TT
|
<TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>-f</TT
|
>-f</TT
|
> flag.</P
|
> flag.</P
|
><P
|
><P
|
>The reason for telling you nicknames is that a quick way to set a single
|
>The reason for telling you nicknames is that a quick way to set a single
|
entry is provided, using the format
|
entry is provided, using the format
|
<TABLE
|
<TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
> RedBoot> <TT
|
> RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fconfig <TT
|
>fconfig <TT
|
CLASS="REPLACEABLE"
|
CLASS="REPLACEABLE"
|
><I
|
><I
|
>nickname</I
|
>nickname</I
|
></TT
|
></TT
|
> <TT
|
> <TT
|
CLASS="REPLACEABLE"
|
CLASS="REPLACEABLE"
|
><I
|
><I
|
>value</I
|
>value</I
|
></TT
|
></TT
|
></B
|
></B
|
></TT
|
></TT
|
></PRE
|
></PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
>
|
>
|
If no
|
If no
|
value is supplied, the command will list and prompt for only that entry.
|
value is supplied, the command will list and prompt for only that entry.
|
If a value is supplied, then the entry will be set to that value. You will
|
If a value is supplied, then the entry will be set to that value. You will
|
be prompted whether to write the new information into flash if any change
|
be prompted whether to write the new information into flash if any change
|
was made. For example
|
was made. For example
|
<TABLE
|
<TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
> RedBoot> <TT
|
> RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fconfig -l -n</B
|
>fconfig -l -n</B
|
></TT
|
></TT
|
>
|
>
|
boot_script: false
|
boot_script: false
|
bootp: false
|
bootp: false
|
bootp_my_ip: 10.16.19.176
|
bootp_my_ip: 10.16.19.176
|
bootp_server_ip: 10.16.19.66
|
bootp_server_ip: 10.16.19.66
|
dns_ip: 10.16.19.1
|
dns_ip: 10.16.19.1
|
gdb_port: 9000
|
gdb_port: 9000
|
net_debug: false
|
net_debug: false
|
RedBoot> <TT
|
RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fconfig bootp_my_ip 10.16.19.177</B
|
>fconfig bootp_my_ip 10.16.19.177</B
|
></TT
|
></TT
|
>
|
>
|
bootp_my_ip: 10.16.19.176 Setting to 10.16.19.177
|
bootp_my_ip: 10.16.19.176 Setting to 10.16.19.177
|
Update RedBoot non-volatile configuration - continue (y/n)? <TT
|
Update RedBoot non-volatile configuration - continue (y/n)? <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>y</B
|
>y</B
|
></TT
|
></TT
|
>
|
>
|
... Unlock from 0x507c0000-0x507e0000: .
|
... Unlock from 0x507c0000-0x507e0000: .
|
... Erase from 0x507c0000-0x507e0000: .
|
... Erase from 0x507c0000-0x507e0000: .
|
... Program from 0x0000a8d0-0x0000acd0 at 0x507c0000: .
|
... Program from 0x0000a8d0-0x0000acd0 at 0x507c0000: .
|
... Lock from 0x507c0000-0x507e0000: .
|
... Lock from 0x507c0000-0x507e0000: .
|
RedBoot></PRE
|
RedBoot></PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></P
|
></P
|
><P
|
><P
|
>Additionally, nicknames can be used like aliases via the format %{nickname}.
|
>Additionally, nicknames can be used like aliases via the format %{nickname}.
|
This allows the values stored by <TT
|
This allows the values stored by <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fconfig</B
|
>fconfig</B
|
></TT
|
></TT
|
> to be used
|
> to be used
|
directly by scripts and commands.</P
|
directly by scripts and commands.</P
|
><P
|
><P
|
>Depending on how your terminal program is connected and its
|
>Depending on how your terminal program is connected and its
|
capabilities, you might find that you are unable to use line-editing to
|
capabilities, you might find that you are unable to use line-editing to
|
delete the ‘old’ value when using the default behaviour of
|
delete the ‘old’ value when using the default behaviour of
|
<B
|
<B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>fconfig <TT
|
>fconfig <TT
|
CLASS="REPLACEABLE"
|
CLASS="REPLACEABLE"
|
><I
|
><I
|
>nickname</I
|
>nickname</I
|
></TT
|
></TT
|
></B
|
></B
|
> or just
|
> or just
|
plain <B
|
plain <B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>fconfig</B
|
>fconfig</B
|
>, as shown in this example:
|
>, as shown in this example:
|
<TABLE
|
<TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>RedBoot> <TT
|
>RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fco bootp</B
|
>fco bootp</B
|
></TT
|
></TT
|
>
|
>
|
bootp: false_</PRE
|
bootp: false_</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
>
|
>
|
The user deletes the word “false;” and enters “true”
|
The user deletes the word “false;” and enters “true”
|
so the display looks like this:
|
so the display looks like this:
|
<TABLE
|
<TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>RedBoot> <TT
|
>RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fco bootp</B
|
>fco bootp</B
|
></TT
|
></TT
|
>
|
>
|
bootp: <TT
|
bootp: <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>true</B
|
>true</B
|
></TT
|
></TT
|
>
|
>
|
Update RedBoot non-volatile configuration - continue (y/n)? y
|
Update RedBoot non-volatile configuration - continue (y/n)? y
|
... Unlock from ...
|
... Unlock from ...
|
RedBoot> _</PRE
|
RedBoot> _</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></P
|
></P
|
><P
|
><P
|
>To edit when you cannot backspace, use the optional flag
|
>To edit when you cannot backspace, use the optional flag
|
<TT
|
<TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>-d</TT
|
>-d</TT
|
> (for “dumb terminal”)
|
> (for “dumb terminal”)
|
to provide a simpler interface thus:
|
to provide a simpler interface thus:
|
<TABLE
|
<TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>RedBoot> <TT
|
>RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fco -d bootp</B
|
>fco -d bootp</B
|
></TT
|
></TT
|
>
|
>
|
bootp: false ? _</PRE
|
bootp: false ? _</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
>
|
>
|
and you enter the value in the obvious manner thus:
|
and you enter the value in the obvious manner thus:
|
<TABLE
|
<TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>RedBoot> <TT
|
>RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fco -d bootp</B
|
>fco -d bootp</B
|
></TT
|
></TT
|
>
|
>
|
bootp: false ? <TT
|
bootp: false ? <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>true</B
|
>true</B
|
></TT
|
></TT
|
>
|
>
|
Update RedBoot non-volatile configuration - continue (y/n)? y
|
Update RedBoot non-volatile configuration - continue (y/n)? y
|
... Unlock from ...
|
... Unlock from ...
|
RedBoot> _</PRE
|
RedBoot> _</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></P
|
></P
|
><P
|
><P
|
>One item which is always present in the configuration data is the ability
|
>One item which is always present in the configuration data is the ability
|
to execute a script at boot time. A sequence of RedBoot commands can be entered
|
to execute a script at boot time. A sequence of RedBoot commands can be entered
|
which will be executed when the system starts up. Optionally, a time-out period
|
which will be executed when the system starts up. Optionally, a time-out period
|
can be provided which allows the user to abort the startup script and proceed
|
can be provided which allows the user to abort the startup script and proceed
|
with normal command processing from the console. </P
|
with normal command processing from the console. </P
|
><P
|
><P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>RedBoot> <TT
|
>RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fconfig -l</B
|
>fconfig -l</B
|
></TT
|
></TT
|
>
|
>
|
Run script at boot: false
|
Run script at boot: false
|
Use BOOTP for network configuration: false
|
Use BOOTP for network configuration: false
|
Local IP address: 192.168.1.29
|
Local IP address: 192.168.1.29
|
Default server IP address: 192.168.1.101
|
Default server IP address: 192.168.1.101
|
DNS server IP address: 192.168.1.1
|
DNS server IP address: 192.168.1.1
|
GDB connection port: 9000
|
GDB connection port: 9000
|
Network debug at boot time: false</PRE
|
Network debug at boot time: false</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></P
|
></P
|
><P
|
><P
|
>The following example sets a boot script and then shows it running.
|
>The following example sets a boot script and then shows it running.
|
</P
|
</P
|
><P
|
><P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>RedBoot> <TT
|
>RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fconfig</B
|
>fconfig</B
|
></TT
|
></TT
|
>
|
>
|
Run script at boot: false <TT
|
Run script at boot: false <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>t</B
|
>t</B
|
></TT
|
></TT
|
>
|
>
|
Boot script:
|
Boot script:
|
Enter script, terminate with empty line
|
Enter script, terminate with empty line
|
>> <TT
|
>> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fi li</B
|
>fi li</B
|
></TT
|
></TT
|
>
|
>
|
Boot script timeout: 0 <TT
|
Boot script timeout: 0 <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>10</B
|
>10</B
|
></TT
|
></TT
|
>
|
>
|
Use BOOTP for network configuration: false .
|
Use BOOTP for network configuration: false .
|
Update RedBoot non-volatile configuration - continue (y/n)? <TT
|
Update RedBoot non-volatile configuration - continue (y/n)? <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>y</B
|
>y</B
|
></TT
|
></TT
|
>
|
>
|
... Erase from 0xa0fc0000-0xa0fe0000: .
|
... Erase from 0xa0fc0000-0xa0fe0000: .
|
... Program from 0x8c021f60-0x8c022360 at 0xa0fc0000: .
|
... Program from 0x8c021f60-0x8c022360 at 0xa0fc0000: .
|
RedBoot>
|
RedBoot>
|
RedBoot(tm) debug environment - built 08:22:24, Aug 23 2000
|
RedBoot(tm) debug environment - built 08:22:24, Aug 23 2000
|
Copyright (C) 2000, Red Hat, Inc.
|
Copyright (C) 2000, Red Hat, Inc.
|
|
|
|
|
RAM: 0x8c000000-0x8c800000
|
RAM: 0x8c000000-0x8c800000
|
flash: 0xa0000000 - 0xa1000000, 128 blocks of 0x00020000 bytes ea.
|
flash: 0xa0000000 - 0xa1000000, 128 blocks of 0x00020000 bytes ea.
|
Socket Communications, Inc: Low Power Ethernet CF Revision C \
|
Socket Communications, Inc: Low Power Ethernet CF Revision C \
|
5V/3.3V 08/27/98 IP: 192.168.1.29, Default server: 192.168.1.101 \
|
5V/3.3V 08/27/98 IP: 192.168.1.29, Default server: 192.168.1.101 \
|
== Executing boot script in 10 seconds - enter ^C to abort
|
== Executing boot script in 10 seconds - enter ^C to abort
|
RedBoot> <TT
|
RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fi li</B
|
>fi li</B
|
></TT
|
></TT
|
>
|
>
|
Name flash addr Mem addr Length Entry point
|
Name flash addr Mem addr Length Entry point
|
RedBoot 0xA0000000 0xA0000000 0x020000 0x80000000
|
RedBoot 0xA0000000 0xA0000000 0x020000 0x80000000
|
RedBoot config 0xA0FC0000 0xA0FC0000 0x020000 0x00000000
|
RedBoot config 0xA0FC0000 0xA0FC0000 0x020000 0x00000000
|
FIS directory 0xA0FE0000 0xA0FE0000 0x020000 0x00000000
|
FIS directory 0xA0FE0000 0xA0FE0000 0x020000 0x00000000
|
RedBoot></PRE
|
RedBoot></PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></P
|
></P
|
><DIV
|
><DIV
|
CLASS="NOTE"
|
CLASS="NOTE"
|
><BLOCKQUOTE
|
><BLOCKQUOTE
|
CLASS="NOTE"
|
CLASS="NOTE"
|
><P
|
><P
|
><B
|
><B
|
>NOTE: </B
|
>NOTE: </B
|
>The bold characters above indicate where something was entered on the
|
>The bold characters above indicate where something was entered on the
|
console. As you can see, the <B
|
console. As you can see, the <B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>fi li</B
|
>fi li</B
|
> command
|
> command
|
at the end came from the script,
|
at the end came from the script,
|
not the console. Once the script is executed, command processing reverts to
|
not the console. Once the script is executed, command processing reverts to
|
the console. </P
|
the console. </P
|
></BLOCKQUOTE
|
></BLOCKQUOTE
|
></DIV
|
></DIV
|
><P
|
><P
|
><DIV
|
><DIV
|
CLASS="NOTE"
|
CLASS="NOTE"
|
><BLOCKQUOTE
|
><BLOCKQUOTE
|
CLASS="NOTE"
|
CLASS="NOTE"
|
><P
|
><P
|
><B
|
><B
|
>NOTE: </B
|
>NOTE: </B
|
>RedBoot supports the notion of a boot script timeout, i.e. a period of
|
>RedBoot supports the notion of a boot script timeout, i.e. a period of
|
time that RedBoot waits before executing the boot time script. This period
|
time that RedBoot waits before executing the boot time script. This period
|
is primarily to allow the possibility of canceling the script. Since
|
is primarily to allow the possibility of canceling the script. Since
|
a timeout value of zero (0) seconds would never allow the script to
|
a timeout value of zero (0) seconds would never allow the script to
|
be aborted or canceled, this value is not allowed. If the timeout
|
be aborted or canceled, this value is not allowed. If the timeout
|
value is zero, then RedBoot will abort the script execution immediately.</P
|
value is zero, then RedBoot will abort the script execution immediately.</P
|
></BLOCKQUOTE
|
></BLOCKQUOTE
|
></DIV
|
></DIV
|
>
|
>
|
On many targets, RedBoot may be configured to run from ROM or it may be
|
On many targets, RedBoot may be configured to run from ROM or it may be
|
configured to run from RAM. Other configurations are also possible. All
|
configured to run from RAM. Other configurations are also possible. All
|
RedBoot configurations will execute the boot script, but in certain cases
|
RedBoot configurations will execute the boot script, but in certain cases
|
it may be desirable to limit the execution of certain script commands to
|
it may be desirable to limit the execution of certain script commands to
|
one RedBoot configuration or the other. This can be accomplished by
|
one RedBoot configuration or the other. This can be accomplished by
|
prepending <TT
|
prepending <TT
|
CLASS="COMPUTEROUTPUT"
|
CLASS="COMPUTEROUTPUT"
|
>{<startup type>}</TT
|
>{<startup type>}</TT
|
> to the
|
> to the
|
commands which should be executed only by the RedBoot configured for the
|
commands which should be executed only by the RedBoot configured for the
|
specified startup type. The following boot script illustrates this concept
|
specified startup type. The following boot script illustrates this concept
|
by having the ROM based RedBoot load and run the RAM based RedBoot. The RAM
|
by having the ROM based RedBoot load and run the RAM based RedBoot. The RAM
|
based RedBoot will then list flash images.</P
|
based RedBoot will then list flash images.</P
|
><P
|
><P
|
><TABLE
|
><TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>RedBoot> <TT
|
>RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fco</B
|
>fco</B
|
></TT
|
></TT
|
>
|
>
|
Run script at boot: false <TT
|
Run script at boot: false <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>t</B
|
>t</B
|
></TT
|
></TT
|
>
|
>
|
Boot script:
|
Boot script:
|
Enter script, terminate with empty line
|
Enter script, terminate with empty line
|
>> <TT
|
>> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>{ROM}fis load RedBoot[RAM]</B
|
>{ROM}fis load RedBoot[RAM]</B
|
></TT
|
></TT
|
>
|
>
|
>> <TT
|
>> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>{ROM}go</B
|
>{ROM}go</B
|
></TT
|
></TT
|
>
|
>
|
>> <TT
|
>> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>{RAM}fis li</B
|
>{RAM}fis li</B
|
></TT
|
></TT
|
>
|
>
|
>>
|
>>
|
Boot script timeout (1000ms resolution): <TT
|
Boot script timeout (1000ms resolution): <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>2</B
|
>2</B
|
></TT
|
></TT
|
>
|
>
|
Use BOOTP for network configuration: <TT
|
Use BOOTP for network configuration: <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>false</B
|
>false</B
|
></TT
|
></TT
|
>
|
>
|
...
|
...
|
Update RedBoot non-volatile configuration - continue (y/n)? <TT
|
Update RedBoot non-volatile configuration - continue (y/n)? <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>y</B
|
>y</B
|
></TT
|
></TT
|
>
|
>
|
... Unlock from 0x007c0000-0x007e0000: .
|
... Unlock from 0x007c0000-0x007e0000: .
|
... Erase from 0x007c0000-0x007e0000: .
|
... Erase from 0x007c0000-0x007e0000: .
|
... Program from 0xa0015030-0xa0016030 at 0x007df000: .
|
... Program from 0xa0015030-0xa0016030 at 0x007df000: .
|
... Lock from 0x007c0000-0x007e0000: .
|
... Lock from 0x007c0000-0x007e0000: .
|
RedBoot> <TT
|
RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>reset</B
|
>reset</B
|
></TT
|
></TT
|
>
|
>
|
... Resetting.
|
... Resetting.
|
+Ethernet eth0: MAC address 00:80:4d:46:01:05
|
+Ethernet eth0: MAC address 00:80:4d:46:01:05
|
IP: 192.168.1.153, Default server: 192.168.1.10
|
IP: 192.168.1.153, Default server: 192.168.1.10
|
|
|
RedBoot(tm) bootstrap and debug environment [ROM]
|
RedBoot(tm) bootstrap and debug environment [ROM]
|
Red Hat certified release, version R1.xx - built 17:37:36, Aug 14 2001
|
Red Hat certified release, version R1.xx - built 17:37:36, Aug 14 2001
|
|
|
Platform: IQ80310 (XScale)
|
Platform: IQ80310 (XScale)
|
Copyright (C) 2000, 2001, Red Hat, Inc.
|
Copyright (C) 2000, 2001, Red Hat, Inc.
|
|
|
RAM: 0xa0000000-0xa2000000, 0xa001b088-0xa1fdf000 available
|
RAM: 0xa0000000-0xa2000000, 0xa001b088-0xa1fdf000 available
|
FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each.
|
FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each.
|
== Executing boot script in 2.000 seconds - enter ^C to abort
|
== Executing boot script in 2.000 seconds - enter ^C to abort
|
RedBoot> <TT
|
RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fis load RedBoot[RAM]</B
|
>fis load RedBoot[RAM]</B
|
></TT
|
></TT
|
>
|
>
|
RedBoot> <TT
|
RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>go</B
|
>go</B
|
></TT
|
></TT
|
>
|
>
|
+Ethernet eth0: MAC address 00:80:4d:46:01:05
|
+Ethernet eth0: MAC address 00:80:4d:46:01:05
|
IP: 192.168.1.153, Default server: 192.168.1.10
|
IP: 192.168.1.153, Default server: 192.168.1.10
|
|
|
RedBoot(tm) bootstrap and debug environment [RAM]
|
RedBoot(tm) bootstrap and debug environment [RAM]
|
Red Hat certified release, version R1.xx - built 13:03:47, Aug 14 2001
|
Red Hat certified release, version R1.xx - built 13:03:47, Aug 14 2001
|
|
|
Platform: IQ80310 (XScale)
|
Platform: IQ80310 (XScale)
|
Copyright (C) 2000, 2001, Red Hat, Inc.
|
Copyright (C) 2000, 2001, Red Hat, Inc.
|
|
|
RAM: 0xa0000000-0xa2000000, 0xa0057fe8-0xa1fdf000 available
|
RAM: 0xa0000000-0xa2000000, 0xa0057fe8-0xa1fdf000 available
|
FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each.
|
FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each.
|
== Executing boot script in 2.000 seconds - enter ^C to abort
|
== Executing boot script in 2.000 seconds - enter ^C to abort
|
RedBoot> <TT
|
RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fis li</B
|
>fis li</B
|
></TT
|
></TT
|
>
|
>
|
Name FLASH addr Mem addr Length Entry point
|
Name FLASH addr Mem addr Length Entry point
|
RedBoot 0x00000000 0x00000000 0x00040000 0x00002000
|
RedBoot 0x00000000 0x00000000 0x00040000 0x00002000
|
RedBoot config 0x007DF000 0x007DF000 0x00001000 0x00000000
|
RedBoot config 0x007DF000 0x007DF000 0x00001000 0x00000000
|
FIS directory 0x007E0000 0x007E0000 0x00020000 0x00000000
|
FIS directory 0x007E0000 0x007E0000 0x00020000 0x00000000
|
RedBoot></PRE
|
RedBoot></PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></P
|
></P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="NAVFOOTER"
|
CLASS="NAVFOOTER"
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"><TABLE
|
WIDTH="100%"><TABLE
|
SUMMARY="Footer navigation table"
|
SUMMARY="Footer navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="fis-write-command.html"
|
HREF="fis-write-command.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="ecos-ref.html"
|
HREF="ecos-ref.html"
|
ACCESSKEY="H"
|
ACCESSKEY="H"
|
>Home</A
|
>Home</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="executing-programs.html"
|
HREF="executing-programs.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
>fis write</TD
|
>fis write</TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="redboot-commands-and-examples.html"
|
HREF="redboot-commands-and-examples.html"
|
ACCESSKEY="U"
|
ACCESSKEY="U"
|
>Up</A
|
>Up</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
>Executing Programs from RedBoot</TD
|
>Executing Programs from RedBoot</TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
></BODY
|
></BODY
|
></HTML
|
></HTML
|
|
|