RedBoot™ User's Guide: Document Version R1.24, August 2001 | ||
---|---|---|
Prev | Chapter 2. RedBoot Commands and Examples | Next |
RedBoot provides flash management support for storage in the flash memory of multiple executable images and of non-volatile information such as IP addresses and other network information.
RedBoot on platforms that support flash based configuration information will report the following message the first time that RedBoot is booted on the target:
flash configuration checksum error or invalid key |
This error can be ignored if no flash based configuration is desired, or can be silenced by running the fconfig command as described below. At this point you may also wish to run the fis init command. See other fis commands in the section called Flash Image System (FIS).
Certain control and configuration information used by RedBoot can be stored in flash.
The details of what information is maintained in flash differ, based on the platform and the configuration. However, the basic operation used to maintain this information is the same. Using the fconfig -l command, the information may be displayed and/or changed.
If the optional flag -i is specified, then the configuration database will be reset to its default state.
If the optional flag -l is specified, 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 must be typed - typing just carriage return will leave a value unchanged. Boolean values may be entered using the first letter (t for true, f for false). At any time the editing 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 Editing Commands”, the section called RedBoot Editing Commands.
If any changes are made in the configuration, then the updated data will be written back to flash after getting acknowledgement from the user.
If the optional flag -n is specified (with or without -l) then “nicknames” of the entries are used. These are shorter and less descriptive than “full” names. The full name may also be displayed by adding the -f flag.
The reason for telling you nicknames is that a quick way to set a single entry is provided, using the format
RedBoot> fconfig nickname value |
RedBoot> fconfig -l -n boot_script: false bootp: false bootp_my_ip: 10.16.19.176 bootp_server_ip: 10.16.19.66 gdb_port: 9000 net_debug: false RedBoot> fconfig bootp_my_ip 10.16.19.177 bootp_my_ip: 10.16.19.176 Setting to 10.16.19.177 Update RedBoot non-volatile configuration - are you sure (y/n)? y ... Unlock from 0x507c0000-0x507e0000: . ... Erase from 0x507c0000-0x507e0000: . ... Program from 0x0000a8d0-0x0000acd0 at 0x507c0000: . ... Lock from 0x507c0000-0x507e0000: . RedBoot> |
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 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 with normal command processing from the console.
RedBoot> fconfig -l Run script at boot: false Use BOOTP for network configuration: false Local IP address: 192.168.1.29 Default server IP address: 192.168.1.101 GDB connection port: 9000 Network debug at boot time: false |
The following example sets a boot script and then shows it running.
RedBoot> fconfig Run script at boot: false t Boot script: Enter script, terminate with empty line >> fi li Boot script timeout: 0 10 Use BOOTP for network configuration: false . Update RedBoot non-volatile configuration - are you sure (y/n)? y ... Erase from 0xa0fc0000-0xa0fe0000: . ... Program from 0x8c021f60-0x8c022360 at 0xa0fc0000: . RedBoot> RedBoot(tm) debug environment - built 08:22:24, Aug 23 2000 Copyright (C) 2000, Red Hat, Inc. RAM: 0x8c000000-0x8c800000 flash: 0xa0000000 - 0xa1000000, 128 blocks of 0x00020000 bytes ea. 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 \ == Executing boot script in 10 seconds - enter ^C to abort RedBoot> fi li Name flash addr Mem addr Length Entry point RedBoot 0xA0000000 0xA0000000 0x020000 0x80000000 RedBoot[backup] 0xA0020000 0x8C010000 0x020000 0x8C010000 RedBoot config 0xA0FC0000 0xA0FC0000 0x020000 0x00000000 FIS directory 0xA0FE0000 0xA0FE0000 0x020000 0x00000000 RedBoot> |
NOTE: The bold characters above indicate where something was entered on the console. As you can see, the fi li command at the end came from the script, not the console. Once the script is executed, command processing reverts to the console.
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 RedBoot configurations will execute the boot script, but in certain cases it may be desirable to limit the execution of certain script commands to one RedBoot configuration or the other. This can be accomplished by prepending {<startup type>} to the commands which should be executed only by the RedBoot configured for the specified statrtup type. The following boot script illustrates this concept by having the ROM based RedBoot load and run the RAM based RedBoot. The RAM based RedBoot will then list flash images.
RedBoot> fco Run script at boot: false t Boot script: Enter script, terminate with empty line >> {ROM}fis load RedBoot[backup] >> {ROM}go >> {RAM}fis li >> Boot script timeout (1000ms resolution): 2 Use BOOTP for network configuration: false ... Update RedBoot non-volatile configuration - are you sure (y/n)? y ... Unlock from 0x007c0000-0x007e0000: . ... Erase from 0x007c0000-0x007e0000: . ... Program from 0xa0015030-0xa0016030 at 0x007df000: . ... Lock from 0x007c0000-0x007e0000: . RedBoot> reset ... Resetting. +Ethernet eth0: MAC address 00:80:4d:46:01:05 IP: 192.168.1.153, Default server: 192.168.1.10 RedBoot(tm) bootstrap and debug environment, version UNKNOWN - built 17:37:36, Aug 14 2001 Platform: IQ80310 (XScale) Copyright (C) 2000, 2001, Red Hat, Inc. RAM: 0xa0000000-0xa2000000, 0xa001b088-0xa1fdf000 available FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each. == Executing boot script in 2.000 seconds - enter ^C to abort RedBoot> fis load RedBoot[backup] RedBoot> go +Ethernet eth0: MAC address 00:80:4d:46:01:05 IP: 192.168.1.153, Default server: 192.168.1.10 RedBoot(tm) bootstrap and debug environment, version UNKNOWN - built 13:03:47, Aug 14 2001 Platform: IQ80310 (XScale) Copyright (C) 2000, 2001, Red Hat, Inc. RAM: 0xa0000000-0xa2000000, 0xa0057fe8-0xa1fdf000 available FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each. == Executing boot script in 2.000 seconds - enter ^C to abort RedBoot> fis li Name FLASH addr Mem addr Length Entry point RedBoot 0x00000000 0x00000000 0x00040000 0x00002000 RedBoot[backup] 0x00040000 0xA0020000 0x00040000 0xA0020040 RedBoot config 0x007DF000 0x007DF000 0x00001000 0x00000000 FIS directory 0x007E0000 0x007E0000 0x00020000 0x00000000 RedBoot> |