1 <!-- Copyright (C) 2003 Red Hat, Inc. -->
2 <!-- This material may be distributed only subject to the terms -->
3 <!-- and conditions set forth in the Open Publication License, v1.0 -->
4 <!-- or later (the latest version is presently available at -->
5 <!-- http://www.opencontent.org/openpub/). -->
6 <!-- Distribution of the work or derivative of the work in any -->
7 <!-- standard (paper) book form is prohibited unless prior -->
8 <!-- permission is obtained from the copyright holder. -->
12 >Persistent State Flash-based Configuration and Control</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos Reference Manual"
20 HREF="ecos-ref.html"><LINK
22 TITLE="RedBoot Commands and Examples"
23 HREF="redboot-commands-and-examples.html"><LINK
26 HREF="fis-write-command.html"><LINK
28 TITLE="Executing Programs from RedBoot"
29 HREF="executing-programs.html"></HEAD
40 SUMMARY="Header navigation table"
49 >eCos Reference Manual</TH
57 HREF="fis-write-command.html"
65 >Chapter 2. RedBoot Commands and Examples</TD
71 HREF="executing-programs.html"
85 NAME="PERSISTENT-STATE-FLASH">Persistent State Flash-based Configuration and Control</H1
89 >RedBoot provides flash management support for storage in the flash memory
90 of multiple executable images and of non-volatile information such as IP addresses
91 and other network information.</P
93 >RedBoot on platforms that support flash based configuration information
94 will report the following message the first time that RedBoot is booted on
104 >flash configuration checksum error or invalid key</PRE
109 >This error can be ignored if no flash based configuration is desired,
110 or can be silenced by running the <B
114 command as described below. At this point you may also wish to run the <B
117 > command. See other fis commands in <A
118 HREF="flash-image-system.html"
119 >the Section called <I
120 >Flash Image System (FIS)</I
124 >Certain control and configuration information used by RedBoot can be
127 >The details of what information is maintained in flash differ, based
128 on the platform and the configuration. However, the basic operation used to
129 maintain this information is the same. Using the <B
132 > command, the information may be displayed and/or changed.</P
134 >If the optional flag <TT
135 CLASS="COMPUTEROUTPUT"
138 then the configuration database will be reset to its default
139 state. This is also needed the first time RedBoot is installed on the
140 target, or when updating to a newer RedBoot with different
141 configuration keys.</P
143 >If the optional flag <TT
144 CLASS="COMPUTEROUTPUT"
147 the configuration data is simply listed. Otherwise, each configuration parameter
148 will be displayed and you are given a chance to change it. The entire value
149 must be typed - typing just carriage return will leave a value unchanged.
150 Boolean values may be entered using the first letter (<TT
151 CLASS="COMPUTEROUTPUT"
155 CLASS="COMPUTEROUTPUT"
157 > for false). At any time the editing
158 process may be stopped simply by entering a period (.) on the line. Entering
159 the caret (^) moves the editing back to the previous item. See “RedBoot
160 Editing Commands”, <A
161 HREF="redboot-editing-commands.html"
162 >the Section called <I
163 >RedBoot Editing Commands</I
167 >If any changes are made in the configuration, then the updated data
168 will be written back to flash after getting acknowledgment from the user.</P
170 >If the optional flag <TT
171 CLASS="COMPUTEROUTPUT"
175 CLASS="COMPUTEROUTPUT"
177 >) then “nicknames”
178 of the entries are used. These are shorter and less descriptive than
179 “full” names. The full name may also be displayed by adding the
181 CLASS="COMPUTEROUTPUT"
185 >The reason for telling you nicknames is that a quick way to set a single
186 entry is provided, using the format
216 value is supplied, the command will list and prompt for only that entry.
217 If a value is supplied, then the entry will be set to that value. You will
218 be prompted whether to write the new information into flash if any change
219 was made. For example
236 bootp_my_ip: 10.16.19.176
237 bootp_server_ip: 10.16.19.66
244 >fconfig bootp_my_ip 10.16.19.177</B
247 bootp_my_ip: 10.16.19.176 Setting to 10.16.19.177
248 Update RedBoot non-volatile configuration - continue (y/n)? <TT
254 ... Unlock from 0x507c0000-0x507e0000: .
255 ... Erase from 0x507c0000-0x507e0000: .
256 ... Program from 0x0000a8d0-0x0000acd0 at 0x507c0000: .
257 ... Lock from 0x507c0000-0x507e0000: .
264 >Additionally, nicknames can be used like aliases via the format %{nickname}.
265 This allows the values stored by <TT
271 directly by scripts and commands.</P
273 >Depending on how your terminal program is connected and its
274 capabilities, you might find that you are unable to use line-editing to
275 delete the ‘old’ value when using the default behaviour of
288 >, as shown in this example:
303 bootp: false_</PRE
308 The user deletes the word “false;” and enters “true”
309 so the display looks like this:
330 Update RedBoot non-volatile configuration - continue (y/n)? y
332 RedBoot> _</PRE
338 >To edit when you cannot backspace, use the optional flag
340 CLASS="COMPUTEROUTPUT"
342 > (for “dumb terminal”)
343 to provide a simpler interface thus:
358 bootp: false ? _</PRE
363 and you enter the value in the obvious manner thus:
384 Update RedBoot non-volatile configuration - continue (y/n)? y
386 RedBoot> _</PRE
392 >One item which is always present in the configuration data is the ability
393 to execute a script at boot time. A sequence of RedBoot commands can be entered
394 which will be executed when the system starts up. Optionally, a time-out period
395 can be provided which allows the user to abort the startup script and proceed
396 with normal command processing from the console. </P
412 Run script at boot: false
413 Use BOOTP for network configuration: false
414 Local IP address: 192.168.1.29
415 Default server IP address: 192.168.1.101
416 DNS server IP address: 192.168.1.1
417 GDB connection port: 9000
418 Network debug at boot time: false</PRE
424 >The following example sets a boot script and then shows it running.
441 Run script at boot: false <TT
448 Enter script, terminate with empty line
455 Boot script timeout: 0 <TT
461 Use BOOTP for network configuration: false .
462 Update RedBoot non-volatile configuration - continue (y/n)? <TT
468 ... Erase from 0xa0fc0000-0xa0fe0000: .
469 ... Program from 0x8c021f60-0x8c022360 at 0xa0fc0000: .
471 RedBoot(tm) debug environment - built 08:22:24, Aug 23 2000
472 Copyright (C) 2000, Red Hat, Inc.
475 RAM: 0x8c000000-0x8c800000
476 flash: 0xa0000000 - 0xa1000000, 128 blocks of 0x00020000 bytes ea.
477 Socket Communications, Inc: Low Power Ethernet CF Revision C \
478 5V/3.3V 08/27/98 IP: 192.168.1.29, Default server: 192.168.1.101 \
479 == Executing boot script in 10 seconds - enter ^C to abort
486 Name flash addr Mem addr Length Entry point
487 RedBoot 0xA0000000 0xA0000000 0x020000 0x80000000
488 RedBoot config 0xA0FC0000 0xA0FC0000 0x020000 0x00000000
489 FIS directory 0xA0FE0000 0xA0FE0000 0x020000 0x00000000
502 >The bold characters above indicate where something was entered on the
503 console. As you can see, the <B
507 at the end came from the script,
508 not the console. Once the script is executed, command processing reverts to
520 >RedBoot supports the notion of a boot script timeout, i.e. a period of
521 time that RedBoot waits before executing the boot time script. This period
522 is primarily to allow the possibility of canceling the script. Since
523 a timeout value of zero (0) seconds would never allow the script to
524 be aborted or canceled, this value is not allowed. If the timeout
525 value is zero, then RedBoot will abort the script execution immediately.</P
529 On many targets, RedBoot may be configured to run from ROM or it may be
530 configured to run from RAM. Other configurations are also possible. All
531 RedBoot configurations will execute the boot script, but in certain cases
532 it may be desirable to limit the execution of certain script commands to
533 one RedBoot configuration or the other. This can be accomplished by
535 CLASS="COMPUTEROUTPUT"
536 >{<startup type>}</TT
538 commands which should be executed only by the RedBoot configured for the
539 specified startup type. The following boot script illustrates this concept
540 by having the ROM based RedBoot load and run the RAM based RedBoot. The RAM
541 based RedBoot will then list flash images.</P
557 Run script at boot: false <TT
564 Enter script, terminate with empty line
568 >{ROM}fis load RedBoot[RAM]</B
584 Boot script timeout (1000ms resolution): <TT
590 Use BOOTP for network configuration: <TT
597 Update RedBoot non-volatile configuration - continue (y/n)? <TT
603 ... Unlock from 0x007c0000-0x007e0000: .
604 ... Erase from 0x007c0000-0x007e0000: .
605 ... Program from 0xa0015030-0xa0016030 at 0x007df000: .
606 ... Lock from 0x007c0000-0x007e0000: .
614 +Ethernet eth0: MAC address 00:80:4d:46:01:05
615 IP: 192.168.1.153, Default server: 192.168.1.10
617 RedBoot(tm) bootstrap and debug environment [ROM]
618 Red Hat certified release, version R1.xx - built 17:37:36, Aug 14 2001
620 Platform: IQ80310 (XScale)
621 Copyright (C) 2000, 2001, Red Hat, Inc.
623 RAM: 0xa0000000-0xa2000000, 0xa001b088-0xa1fdf000 available
624 FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each.
625 == Executing boot script in 2.000 seconds - enter ^C to abort
629 >fis load RedBoot[RAM]</B
638 +Ethernet eth0: MAC address 00:80:4d:46:01:05
639 IP: 192.168.1.153, Default server: 192.168.1.10
641 RedBoot(tm) bootstrap and debug environment [RAM]
642 Red Hat certified release, version R1.xx - built 13:03:47, Aug 14 2001
644 Platform: IQ80310 (XScale)
645 Copyright (C) 2000, 2001, Red Hat, Inc.
647 RAM: 0xa0000000-0xa2000000, 0xa0057fe8-0xa1fdf000 available
648 FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each.
649 == Executing boot script in 2.000 seconds - enter ^C to abort
656 Name FLASH addr Mem addr Length Entry point
657 RedBoot 0x00000000 0x00000000 0x00040000 0x00002000
658 RedBoot config 0x007DF000 0x007DF000 0x00001000 0x00000000
659 FIS directory 0x007E0000 0x007E0000 0x00020000 0x00000000
671 SUMMARY="Footer navigation table"
682 HREF="fis-write-command.html"
700 HREF="executing-programs.html"
716 HREF="redboot-commands-and-examples.html"
724 >Executing Programs from RedBoot</TD