RedBoot Commands and ExamplesIntroductionRedBootcommands and examples
commands and examplesRedBoot provides three basic classes of commands: Program loading and executionFlash image and configuration managementMiscellaneous commandsGiven the extensible and configurable nature of eCos and RedBoot,
there may be extended or enhanced sets of commands available.The basic format for commands is: RedBoot> COMMAND [-S]... [-s val]... operand
Commands may require additional information beyond the basic
command name. In most cases this additional information is optional, with
suitable default values provided if they are not present.
FormatDescriptionExample-SA boolean switch; the behavior of the command will differ, depending
on the presence of the switch. In this example, the -f switch
indicates that a complete initialization of the FIS data should be performed.
There may be many such switches available for any given command and any or all of
them may be present, in any order. RedBoot> fis init -f-s valA qualified value; the letter "s" introduces the value, qualifying it's meaning. In the
example, -b 0x100000 specifies where the memory dump should begin.
There may be many such switches available for any given command and any or all of
them may be present, in any order.
RedBoot> dump -b 0x100000 -l 0x20 operandA simple value; some commands require a single parameter for which an additional
-X switch would be redundant. In the example, JFFS2
is the name of a flash image. The image name is always required, thus is no need to qualify it with
a switch.
Note that any un-qualified operand must always appear at the end of the command. RedBoot> fis delete JFFS2The list of available commands, and their syntax, can be obtained by
typing help at the command line:
RedBoot> help
Manage aliases kept in FLASH memory
alias name [value]
Set/Query the system console baud rate
baudrate [-b <rate>]
Manage machine caches
cache [ON | OFF]
Display/switch console channel
channel [-1|<channel number>]
Display disk partitions
disks
Display (hex dump) a range of memory
dump -b <location> [-l <length>] [-s]
Manage flash images
fis {cmds}
Manage configuration kept in FLASH memory
fconfig [-i] [-l] [-n] [-f] [-d] | [-d] nickname [value]
Execute code at a location
go [-w <timeout>] [-c] [-n] [entry]
Help about help?
help [<topic>]
Set/change IP addresses
ip_address [-l <local_ip_address>[/<mask_length>]] [-h <server_address>]
Load a file
load [-r] [-v] [-d] [-c <channel>] [-h <host>] [-m {TFTP | HTTP | {x|y}MODEM | disk}]
[-b <base_address>] <file_name>
Network connectivity test
ping [-v] [-n <count>] [-t <timeout>] [-i <IP_addr]
-h <host>
Reset the system
reset
Display RedBoot version information
version
Display (hex dump) a range of memory
x -b <location> [-l <length>] [-s]
Commands can be abbreviated to their shortest
unique string. Thus in the list above, d,du,dum
and dump are all valid for the dump command. The fconfig
command can be abbreviated fc, but
f would be ambiguous with fis.
There is one additional, special command. When RedBoot detects '$' or '+'
(unless escaped via '\') in a command, it switches to GDB protocol mode. At this
point, the eCos GDB stubs take over, allowing connections from a GDB host.
The only way to get back to RedBoot from GDB mode is to restart the platform.
NOTE
Multiple commands may be entered on a single line, separated by the semi-colon “;” character.
The standard RedBoot command set is structured around the bootstrap
environment. These commands are designed to be simple to use and remember,
while still providing sufficient power and flexibility to be useful. No attempt
has been made to render RedBoot as the end-all product. As such, things such
as the debug environment are left to other modules, such as GDB stubs, which
are typically included in RedBoot. The command set may be also be extended on a platform basis. Common CommandscommandscommonaliasManipulate command line aliasesalias name valueArgumentsNameTypeDescriptionDefaultnameNameThe name for this alias.nonevalueStringReplacement value for the alias.noneDescriptionThe alias command is used to maintain simple command
line aliases. These aliases are shorthand for longer expressions.
When the pattern %{name} appears in a command line, including in a script,
the corresponding value will be substituted. Aliases may be nested.
If no value is provided, then the current value of the alias is displayed.
If the system supports non-volatile configuration data via the
fconfig command (see ),
then the value will be saved and used when the system is reset.
Examples
Set an alias.
RedBoot> alias joe "This is Joe"
Update RedBoot non-volatile configuration - continue (y/n)? n
Display an alias.
RedBoot> alias joe
'joe' = 'This is Joe'
Use an alias. Note: the "=" command simply echoes the command to to console.
RedBoot> = %{joe}
This is Joe
Aliases can be nested.
RedBoot> alias frank "Who are you? %{joe}"
Update RedBoot non-volatile configuration - continue (y/n)? n
RedBoot> = %{frank}
Who are you? This is Joe
Notice how the value of %{frank} changes when %{joe} is changed since
the value of %{joe} is not evaluated until %{frank} is evaluated.
RedBoot> alias joe "This is now Josephine"
Update RedBoot non-volatile configuration - continue (y/n)? n
RedBoot> = %{frank}
Who are you? This is now Josephine
baudrateSet the baud rate for the system serial consolebaudrate-b rateArgumentsNameTypeDescriptionDefault-b rateNumberThe baud rate to use for the serial console.noneDescriptionThe baudrate command sets the baud rate for the system serial console.
If no value is provided, then the current value of the console baud rate is displayed.
If the system supports non-volatile configuration data via the
fconfig command (see ),
then the value will be saved and used when the system is reset.
Examples
Show the current baud rate.
RedBoot> baudrate
Baud rate = 38400
Change the console baud rate. In order to make this operation safer,
there will be a slight pause after the
first message to give you time to change to the new baud rate.
If it doesn't work, or a less than affirmative answer is given to the
"continue" prompt, then the baud rate will revert to the current value.
Only after the baud rate has been firmly established will RedBoot
give you an opportunity to save the value in persistent storage.
RedBoot> baudrate -b 57600
Baud rate will be changed to 57600 - update your settings
Device baud rate changed at this point
Baud rate changed to 57600 - continue (y/n)? y
Update RedBoot non-volatile configuration - continue (y/n)? n
cacheControl hardware cachescacheonoffArgumentsNameTypeDescriptionDefaultonTurn the caches onnoneoffTurn the caches offnoneDescriptionThe cache command is used to manipulate the caches on the processor. With no options, this command specifies the state of the system caches.When an option is given, the caches are turned off or on appropriately.Examples
Show the current cache state.
RedBoot> cache
Data cache: On, Instruction cache: On
Disable the caches.
RedBoot> cache off
RedBoot> cache
Data cache: Off, Instruction cache: Off
Enable the caches.
RedBoot> cache on
RedBoot> cache
Data cache: On, Instruction cache: On
channelSelect the system console channelchannel-1channel_numberArgumentsNameTypeDescriptionDefault-1Reset the console channelnonechannel_numberNumberSelect a channelnoneDescription
With no arguments, the channel command displays the current console channel number.
When passed an argument of 0 upward, this command switches the console
channel to that channel number. The mapping between channel numbers and
physical channels is platform specific but will typically be something like
channel 0 is the first serial port, channel 1 is the second, etc.
When passed an argument of -1, this command reverts RedBoot to responding
to whatever channel receives input first, as happens when RedBoot initially
starts execution.
Examples
Show the current channel.
RedBoot> channel
Current console channel id: 0
Change to an invalid channel.
RedBoot> channel 99
**Error: bad channel number '99'
Revert to the default channel setting (any console mode).
RedBoot> channel -1cksumCompute POSIX checksumscksum-b location-l lengthArgumentsNameTypeDescriptionDefault-b locationMemory addressLocation in memory for stat of data.none-l lengthNumberLength of datanoneDescriptionComputes the POSIX checksum on a range of memory (either RAM or FLASH).
The values printed (decimal cksum, decimal length, hexadecimal cksum,
hexadecimal length) can be compared with the output from the Linux program 'cksum'.
Examples
Checksum a buffer.
RedBoot> cksum -b 0x100000 -l 0x100
POSIX cksum = 3286483632 256 (0xc3e3c2b0 0x00000100)
Checksum an area of memory after loading a file. Note that the base
address and length parameters are provided by the preceding
load command.
RedBoot> load -r -b %{FREEMEMLO} redboot.bin
Raw file loaded 0x06012800-0x0602f0a8
RedBoot> cksum
Computing cksum for area 0x06012800-0x0602f0a8
POSIX cksum = 2092197813 116904 (0x7cb467b5 0x0001c8a8)
disksList available disk partitions.disksArgumentsNone.DescriptionThe disks command is used to list disk partitions recognized by RedBoot.Examples
Show what disk partitions are available.
RedBoot> disks
hda1 Linux Swap
hda2 Linux
00100000: 00 3E 00 06 00 06 00 06 00 00 00 00 00 00 00 00 |.>..............|
00100010: 00 00 00 78 00 70 00 60 00 60 00 60 00 60 00 60 |...x.p.`.`.`.`.`|
dumpDisplay memory.dump-b location-l length-s-1-2-4ArgumentsNameTypeDescriptionDefault-b locationMemory addressLocation in memory for start of data.none-l lengthNumberLength of data32-sBooleanFormat data using Motorola S-records.-1Access one byte (8 bits) at a time.
Only the least significant 8 bits of the pattern will be used.-1-2Access two bytes (16 bits) at a time.
Only the least significant 16 bits of the pattern will be used.-1-4Access one word (32 bits) at a time.-1DescriptionDisplay a range of memory on the system console.The x is a synonym for dump.Note that this command could
be detrimental if used on memory mapped hardware registers. The memory is displayed at most sixteen bytes per line, first as the
raw hex value, followed by an ASCII interpretation of the data. Examples
Display a buffer, one byte at a time.
RedBoot> mfill -b 0x100000 -l 0x20 -p 0xDEADFACE
RedBoot> x -b 0x100000
00100000: CE FA AD DE CE FA AD DE CE FA AD DE CE FA AD DE |................|
00100010: CE FA AD DE CE FA AD DE CE FA AD DE CE FA AD DE |................|
Display a buffer, one short (16 bit) word at a time. Note in this case that
the ASCII interpretation is suppressed.
RedBoot> dump -b 0x100000 -2
00100000: FACE DEAD FACE DEAD FACE DEAD FACE DEAD
00100010: FACE DEAD FACE DEAD FACE DEAD FACE DEAD
Display a buffer, one word (32 bit) word at a time. Note in this case that
the ASCII interpretation is suppressed.
RedBoot> dump -b 0x100000 -4
00100000: DEADFACE DEADFACE DEADFACE DEADFACE
00100010: DEADFACE DEADFACE DEADFACE DEADFACE
Display the same buffer, using Motorola S-record format.
RedBoot> dump -b 0x100000 -s
S31500100000CEFAADDECEFAADDECEFAADDECEFAADDE8E
S31500100010CEFAADDECEFAADDECEFAADDECEFAADDE7E
Display a buffer, with visible ASCII strings.
RedBoot> d -b 0xfe00b000 -l 0x80
0xFE00B000: 20 25 70 0A 00 00 00 00 41 74 74 65 6D 70 74 20 | %p.....Attempt |
0xFE00B010: 74 6F 20 6C 6F 61 64 20 53 2D 72 65 63 6F 72 64 |to load S-record|
0xFE00B020: 20 64 61 74 61 20 74 6F 20 61 64 64 72 65 73 73 | data to address|
0xFE00B030: 3A 20 25 70 20 5B 6E 6F 74 20 69 6E 20 52 41 4D |: %p [not in RAM|
0xFE00B040: 5D 0A 00 00 2A 2A 2A 20 57 61 72 6E 69 6E 67 21 |]...*** Warning!|
0xFE00B050: 20 43 68 65 63 6B 73 75 6D 20 66 61 69 6C 75 72 | Checksum failur|
0xFE00B060: 65 20 2D 20 41 64 64 72 3A 20 25 6C 78 2C 20 25 |e - Addr: %lx, %|
0xFE00B070: 30 32 6C 58 20 3C 3E 20 25 30 32 6C 58 0A 00 00 |02lX <> %02lX...|
0xFE00B080: 45 6E 74 72 79 20 70 6F 69 6E 74 3A 20 25 70 2C |Entry point: %p,|
helpDisplay help on available commandshelp topicArgumentsNameTypeDescriptionDefaulttopicStringWhich command to provide help for.All commandsDescription
The help command displays information about the available
RedBoot commands. If a topic is given, then the display
is restricted to information about that specific command.
If the command has sub-commands, e.g. fis, then the topic
specific display will print additional information about the available sub-commands.
special (ICMP) packets to a specific host. These packets should be automatically
returned by that host. The command will indicate how many of these round-trips
were successfully completed.
Examples
Show generic help. Note that the contents of this display will depend on the various configuration
options for RedBoot when it was built.
RedBoot> help
Manage aliases kept in FLASH memory
alias name [value]
Manage machine caches
cache [ON | OFF]
Display/switch console channel
channel [-1|<channel number>]
Compute a 32bit checksum [POSIX algorithm] for a range of memory
cksum -b <location> -l <length>
Display (hex dump) a range of memory
dump -b <location> [-l <length>] [-s] [-1|-2|-4]
Manage FLASH images
fis {cmds}
Manage configuration kept in FLASH memory
fconfig [-i] [-l] [-n] [-f] [-d] | [-d] nickname [value]
Execute code at a location
go [-w <timeout>] [entry]
Uncompress GZIP compressed data
gunzip -s <location> -d <location>
Help about help?
help [<topic>]
Read I/O location
iopeek [-b <location>] [-1|2|4]
Write I/O location
iopoke [-b <location>] [-1|2|4] -v <value>
Set/change IP addresses
ip_address [-l <local_ip_address>[/<mask_length>]] [-h <server_address>]
Load a file
load [-r] [-v] [-d] [-h <host>] [-m {TFTP | HTTP | {x|y}MODEM -c <channel_number>}]
[-f <flash_address>] [-b <base_address>] <file_name>
Compare two blocks of memory
mcmp -s <location> -d <location> -l <length> [-1|-2|-4]
Fill a block of memory with a pattern
mfill -b <location> -l <length> -p <pattern>
[-1|-2|-4]
Network connectivity test
ping [-v] [-n <count>] [-l <length>] [-t <timeout>] [-r <rate>]
[-i <IP_addr>] -h <IP_addr>
Reset the system
reset
Display RedBoot version information
version
Display (hex dump) a range of memory
x -b <location> [-l <length>] [-s] [-1|-2|-4]
Help about a command with sub-commands.
RedBoot> help fis
Manage FLASH images
fis {cmds}
Create an image
fis create -b <mem_base> -l <image_length> [-s <data_length>]
[-f <flash_addr>] [-e <entry_point>] [-r <ram_addr>] [-n] <name>
Display an image from FLASH Image System [FIS]
fis delete name
Erase FLASH contents
fis erase -f <flash_addr> -l <length>
Display free [available] locations within FLASH Image System [FIS]
fis free
Initialize FLASH Image System [FIS]
fis init [-f]
Display contents of FLASH Image System [FIS]
fis list [-c] [-d]
Load image from FLASH Image System [FIS] into RAM
fis load [-d] [-b <memory_load_address>] [-c] name
Write raw data directly to FLASH
fis write -f <flash_addr> -b <mem_base> -l <image_length>
iopeekRead I/O locationiopeek-b location-1-2-4ArgumentsNameTypeDescriptionDefault-b locationI/O addressI/O Location.none-1Access a one byte (8 bit) I/O location.-1-2Access a two byte (16 bit) I/O location.-1-4Access a one word (32 bit) I/O location.-1DescriptionReads a value from the I/O address space.Examples
Examine 8 bit value at I/O location 0x3F8.
RedBoot> iopeek -b 0x3f8
0x03f8 = 0x30
Examine 32 bit value at I/O location 0x3f8.
RedBoot> iopeek -b 0x3f8 -4
0x03f8 = 0x03c10065
iopokeWrite I/O locationiopoke-b location-1-2-4-v valueArgumentsNameTypeDescriptionDefault-b locationI/O addressI/O Location.none-1Access a one byte (8 bit) I/O location.
Only the 8 least significant bits of value will be used-1-2Access a two byte (16 bit) I/O location.
Only the 16 least significant bits of value will be used-1-4Access a one word (32 bit) I/O location.-1DescriptionWrites a value to the I/O address space.Examples
Write 0x0123 to 16 bit I/O location 0x200.
RedBoot> iopoke -b 0x200 -v 0x123 -2gunzipUncompress GZIP compressed datagunzip-s source-d destinationArgumentsNameTypeDescriptionDefault-s location1Memory addressLocation of GZIP compressed data to uncompress.Value set by last load or fis load command.-d location2Memory addressDestination to write uncompressed data to.noneDescriptionUncompress GZIP compressed data.Examples
Uncompress data at location 0x100000 to 0x200000.
RedBoot> gunzip -s 0x100000 -d 0x200000
Decompressed 38804 bytes
ip_addressSet IP addressesip_address-b-l local_IP_address/netmask_length-h server_IP_address-d
DNS_server_IP_addressArgumentsNameTypeDescriptionDefault-bBooleanObtain an IP address using BOOTP or DHCP.don't use BOOTP/DHCP-l
local_IP_addressNumeric IP or DNS nameThe IP address RedBoot should use, optionally
with the network mask length.none-h
server_IP_addressNumeric IP or DNS nameThe IP address of the default server. Use of this
address is implied by other commands, such as
load.none-d
DNS_server_IP_addressNumeric IP or DNS nameThe IP address of the DNS server.noneDescriptionThe ip_address command is used to show and/or change the basic IP
addresses used by RedBoot. IP addresses may be given as numeric
values, e.g. 192.168.1.67, or as symbolic names such as www.redhat.com
if DNS support is enabled.
The option is used to cause the target to perform a bootp or dhcp negotiation to get an IP address.
The option is used to set the IP address used by
the target device. The network mask length can also be specified
The option is used to set the default server
address, such as is used by the load command.
The option is used to set the default DNS server
address which is used for resolving symbolic network addresses. Note
that an address of 0.0.0.0 will disable DNS lookups.
Examples
Display the current network settings.
RedBoot> ip_address
IP: 192.168.1.31, Default server: 192.168.1.101, DNS server IP: 0.0.0.0, DNS domain name:
Change the DNS server address.
RedBoot> ip_address -d 192.168.1.101
IP: 192.168.1.31, Default server: 192.168.1.101, DNS server IP: 192.168.1.101, DNS domain name:
Change the DNS domain name.
RedBoot> ip_address -D example.com
IP: 192.168.1.31, Default server: 192.168.1.101, DNS server IP: 192.168.1.101, DNS domain name: example.com
Change the default server address.
RedBoot> ip_address -h 192.168.1.104
IP: 192.168.1.31, Default server: 192.168.1.104, DNS server IP: 192.168.1.101, DNS domain name:
Set the IP address to something new, with a 255.255.255.0 netmask
RedBoot> ip_address -l 192.168.1.32/24
IP: 192.168.1.32, Default server: 192.168.1.104, DNS server IP: 192.168.1.101, DNS domain name:
loadDownload programs or data to the RedBoot platformload-v -d -r -m
xmodemymodemtftpdiskfile-h server_IP_address-f location-b location-c channelfile_nameArgumentsNameTypeDescriptionDefault-vBooleanDisplay a small spinner (indicator)
while the download is in progress. This is just for feedback, especially
during long loads. Note that the option has no effect when using a
serial download method since it would interfere with the protocol.quiet-dBooleanDecompress data stream (gzip data)non-compressed data-rBooleanRaw (or binary) data. -b or -f must be usedformatted (S-records, ELF image, etc)-m tftpTransfer data via the network using TFTP protocol.TFTP-m httpTransfer data via the network using HTTP protocol.TFTP-m xmodemTransfer data using X-modem protocol.TFTP-m ymodemTransfer data using Y-modem protocol.TFTP-m diskTransfer data from a local disk.TFTP-m fileTransfer data from a local filesystem such as
JFFS2 or FAT.TFTP-h server_IP_addressNumeric IP or DNS nameThe IP address of the TFTP or HTTP server.Value set by ip_address-b locationNumberAddress in memory to load the data. Formatted data streams will have
an implied load address which this option may override.Depends on data format-f locationNumberAddress in flash to load the data. Formatted data streams will have
an implied load address which this option may override.Depends on data format-c channelNumberSpecify which I/O channel to
use for download. This option is only supported when using either
xmodem or ymodem protocol.Depends on data formatfile_nameStringThe name of the file on the TFTP or HTTP
server or the local disk. Details of how this is specified for TFTP are
host-specific. For local disk files, the name must be in disk:
filename format. The disk portion must match one of the disk
names listed by the disks command.NoneDescription
The load command is used to download
data into the target system. Data can be loaded via a network connection,
using either the TFTP or HTTP protocols, or the console serial connection using the
X/Y modem protocol. Files may also be loaded directly from local filesystems
on disk. Files to be downloaded may either be executable images in
ELF executable program format,
Motorola S-record (SREC)
format or raw data.
Note
When downloading an ELF image, RedBoot will forcibly terminate the transfer
once all the relevant (loadable) ELF sections have been received. This
behaviour reduces download time when using the X/Y modem protocol
over a slow serial connection. However, the terminal emulator may report
that the transfer is incomplete and has been cancelled. Such messages
are normal and may be ignored.
Examples
Download a Motorola S-record (or ELF) image, using TFTP, specifying the
base memory address.
RedBoot> load redboot.ROM -b 0x8c400000
Address offset = 0x0c400000
Entry point: 0x80000000, address range: 0x80000000-0x8000fe80
Download a Motorola S-record (or ELF) image, using HTTP, specifying the
host [server] address.
RedBoot> load /redboot.ROM -m HTTP -h 192.168.1.104
Address offset = 0x0c400000
Entry point: 0x80000000, address range: 0x80000000-0x8000fe80
Load an ELF file from /dev/hda1 which should be an EXT2 partition:
RedBoot> load -mode disk hda1:hello.elf
Entry point: 0x00020000, address range: 0x00020000-0x0002fd70
Load an ELF file from /jffs2/applications which should be a directory
in a JFFS2 filesystem:
RedBoot> load -mode file /jffs2/applications/hello.elf
Entry point: 0x00020000, address range: 0x00020000-0x0002fd70
mcmpCompare two segments of memorymcmp-s location1-d location1-l length-1-2-4ArgumentsNameTypeDescriptionDefault-s location1Memory addressLocation for start of data.none-d location2Memory addressLocation for start of data.none-l lengthNumberLength of datanone-1Access one byte (8 bits) at a time.
Only the least significant 8 bits of the pattern will be used.-4-2Access two bytes (16 bits) at a time.
Only the least significant 16 bits of the pattern will be used.-4-4Access one word (32 bits) at a time.-4DescriptionCompares the contents of two ranges of memory (RAM, ROM, FLASH, etc).Examples
Compare two buffers which match (result is quiet).
RedBoot> mfill -b 0x100000 -l 0x20 -p 0xDEADFACE
RedBoot> mfill -b 0x200000 -l 0x20 -p 0xDEADFACE
RedBoot> mcmp -s 0x100000 -d 0x200000 -l 0x20
Compare two buffers which don't match.
Only the first non-matching element is displayed.
RedBoot> mcmp -s 0x100000 -d 0x200000 -l 0x30 -2
Buffers don't match - 0x00100020=0x6000, 0x00200020=0x0000
mcopyCopy memorymcopy-s source-d destination-l length-1-2-4ArgumentsNameTypeDescriptionDefault-s location1Memory addressLocation of data to copy.none-d location2Memory addressDestination for copied data.none-l lengthNumberLength of datanone-1Copy one byte (8 bits) at a time.-4-2Copy two bytes (16 bits) at a time.-4-4Copy one word (32 bits) at a time.-4DescriptionCopies memory (RAM, ROM, FLASH, etc) from one area to another.Examples
Copy 16 bits at a time.
RedBoot> mfill -b 0x100000 -l 0x20 -2 -p 0xDEAD
RedBoot> mfill -b 0x200000 -l 0x20 -2 -p 0x0
RedBoot> dump -b 0x200000 -l 0x20 -2
00200000: 0000 0000 0000 0000 0000 0000 0000 0000
00200010: 0000 0000 0000 0000 0000 0000 0000 0000
RedBoot> mcopy -s 0x100000 -d 0x200000 -2 -l 0x20
RedBoot> dump -b 0x200000 -l 0x20 -2
00200000: DEAD DEAD DEAD DEAD DEAD DEAD DEAD DEAD
00200010: DEAD DEAD DEAD DEAD DEAD DEAD DEAD DEAD
mfillFill RAM with a specified patternmfill-b location-l length-p value-1-2-4ArgumentsNameTypeDescriptionDefault-b locationMemory addressLocation in memory for start of data.none-l lengthNumberLength of datanone-p patternNumberData value to fill with0-1Access one byte (8 bits) at a time.
Only the least significant 8 bits of the pattern will be used.-4-2Access two bytes (16 bits) at a time.
Only the least significant 16 bits of the pattern will be used.-4-4Access one word (32 bits) at a time.-4DescriptionFills a range of memory with the given pattern.Examples
Fill a buffer with zeros.
RedBoot> x -b 0x100000 -l 0x20
00100000: 00 3E 00 06 00 06 00 06 00 00 00 00 00 00 00 00 |.>..............|
00100010: 00 00 00 78 00 70 00 60 00 60 00 60 00 60 00 60 |...x.p.`.`.`.`.`|
RedBoot> mfill -b 0x100000 -l 0x20
RedBoot> x -b 0x100000 -l 0x20
00100000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00100010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
Fill a buffer with a pattern.
RedBoot> mfill -b 0x100000 -l 0x20 -p 0xDEADFACE
RedBoot> x -b 0x100000 -l 0x20
00100000: CE FA AD DE CE FA AD DE CE FA AD DE CE FA AD DE |................|
00100010: CE FA AD DE CE FA AD DE CE FA AD DE CE FA AD DE |................|
pingVerify network connectivityping-v -i local_IP_address-l length-n count-t timeout-r rate-h server_IP_addressArgumentsNameTypeDescriptionDefault-vBooleanBe verbose, displaying information about each packet sent.quiet-n local_IP_addressNumberControls the number of packets to be sent.10-i local_IP_addressNumeric IP or DNS nameThe IP address RedBoot should use.Value set by ip_address-h server_IP_addressNumeric IP or DNS nameThe IP address of the host to contact.none-l lengthNumberThe length of the ICMP data payload.64-r lengthNumberHow fast to deliver packets, i.e. time between successive sends.
A value of 0 sends packets as quickly as possible.1000ms (1 second)-t lengthNumberHow long to wait for the round-trip to complete, specified in milliseconds.1000ms (1 second)Description
The ping command checks the connectivity of the local network by sending
special (ICMP) packets to a specific host. These packets should be automatically
returned by that host. The command will indicate how many of these round-trips
were successfully completed.
Examples
Test connectivity to host 192.168.1.101.
RedBoot> ping -h 192.168.1.101
Network PING - from 192.168.1.31 to 192.168.1.101
PING - received 10 of 10 expected
Test connectivity to host 192.168.1.101, with verbose reporting.
RedBoot> ping -h 192.168.1.101 -v -n 4
Network PING - from 192.168.1.31 to 192.168.1.101
seq: 1, time: 1 (ticks)
seq: 2, time: 1 (ticks)
seq: 3, time: 1 (ticks)
seq: 4, time: 1 (ticks)
PING - received 10 of 10 expected
Test connectivity to a non-existent host (192.168.1.109).
RedBoot> ping -h 192.168.1.109 -v -n 4
PING: Cannot reach server '192.168.1.109' (192.168.1.109)
resetReset the deviceresetArgumentsNoneDescription
The reset command causes the target platform to be reset.
Where possible (hardware support permitting), this will be
equivalent to a power-on reset condition.
Examples
Reset the platform.
RedBoot> reset
... Resetting.+... Waiting for network card: .
Socket Communications, Inc: Low Power Ethernet CF Revision C 5V/3.3V 08/27/98
Ethernet eth0: MAC address 00:c0:1b:00:ba:28
IP: 192.168.1.29, Default server: 192.168.1.101
RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version UNKNOWN - built 10:41:41, May 14 2002
Platform: Compaq iPAQ Pocket PC (StrongARM 1110)
Copyright (C) 2000, 2001, 2002, Free Software Foundation, Inc.
RAM: 0x00000000-0x01fc0000, 0x00014748-0x01f71000 available
FLASH: 0x50000000 - 0x51000000, 64 blocks of 0x00040000 bytes each.
RedBoot>
versionDisplay RedBoot version informationversionArgumentsNoneDescriptionThe version command simply displays version information about RedBoot.
Examples
Display RedBoot's version.
RedBoot> version
RedBoot(tm) debug environment - built 09:12:03, Feb 12 2001
Platform: XYZ (PowerPC 860)
Copyright (C) 2000, 2001, Free Software Foundation, Inc.
RAM: 0x00000000-0x00400000
Flash Image System (FIS)commandsflash image system
flash image system commandscommandsfisfis commandsIf the platform
has flash memory, RedBoot can use this for image storage. Executable images,
as well as data, can be stored in flash in a simple file store. The
fis command (fis is short for Flash Image System) is used to
manipulate and maintain flash images.
fis initInitialize Flash Image System (FIS)fis init-fArgumentsNameTypeDescriptionDefault-fAll blocks of flash memory (except for the boot
blocks) will be erased as part of the initialization
procedure.DescriptionThis command is used to initialize the Flash Image System
(FIS). It should normally only be executed once, when RedBoot
is first installed on the hardware. If the reserved images or
their sizes in the FIS change, due to a different configuration
of RedBoot being used, it may be necessary to issue the command
again though.
Subsequent executions will cause loss of
previously stored information in the FIS.Examples
Initialize the FIS directory.
RedBoot> fis init
About to initialize [format] flash image system - continue (y/n)? y
*** Initialize FLASH Image System
Warning: device contents not erased, some blocks may not be usable
... Erase from 0x00070000-0x00080000: .
... Program from 0x0606f000-0x0607f000 at 0x00070000: .
Initialize the FIS directory and all of flash memory, except for first
blocks of the flash where the boot monitor resides.
RedBoot> fis init -f
About to initialize [format] flash image system - continue (y/n)? y
*** Initialize FLASH Image System
... Erase from 0x00020000-0x00070000: .....
... Erase from 0x00080000-0x00080000:
... Erase from 0x00070000-0x00080000: .
... Program from 0x0606f000-0x0607f000 at 0x00070000: .
fis listList Flash Image System directoryfis list-c-dArgumentsNameTypeDescriptionDefault-cShow image checksum instead of memory address
(column Mem addr is
replaced by
Checksum).-dShow image data length instead of amount of flash
occupied by image (column
Length is replaced by
Datalen).DescriptionThis command lists the images currently available in the FIS. Certain
images used by RedBoot have fixed names and have reserved slots in the
FIS (these can be seen after using the fis init
command). Other images can be manipulated by the user.The images are listed in the order they appear in the FIS
directory, not by name or creation time.Examples
List the FIS directory.
RedBoot> fis list
Name FLASH addr Mem addr Length Entry point
RedBoot 0x00000000 0x00000000 0x00020000 0x00000000
RedBoot config 0x0007F000 0x0007F000 0x00001000 0x00000000
FIS directory 0x00070000 0x00070000 0x0000F000 0x00000000
List the FIS directory, with image checksums substituted for
memory addresses.
RedBoot> fis list -c
Name FLASH addr Checksum Length Entry point
RedBoot 0x00000000 0x00000000 0x00020000 0x00000000
RedBoot config 0x0007F000 0x00000000 0x00001000 0x00000000
FIS directory 0x00070000 0x00000000 0x0000F000 0x00000000
List the FIS directory with image data lengths substituted for flash
block reservation lengths.
RedBoot> fis list -d
Name FLASH addr Mem addr Datalen Entry point
RedBoot 0x00000000 0x00000000 0x00000000 0x00000000
RedBoot config 0x0007F000 0x0007F000 0x00000000 0x00000000
FIS directory 0x00070000 0x00070000 0x00000000 0x00000000
fis freeFree flash imagefis freeDescriptionThis command shows which areas of the flash memory are currently
not in use. When a block contains non-erased contents it is considered
in use. Since it is possible to force an image to be loaded at a
particular flash location, this command can be used to check whether
that location is in use by any other image.There is currently no cross-checking between actual flash
contents and the FIS directory, which mans that there could be a
segment of flash which is not erased that does not correspond to a
named image, or vice-versa.Examples
Show free flash areas.
RedBoot> fis free
0xA0040000 .. 0xA07C0000
0xA0840000 .. 0xA0FC0000
fis createCreate flash imagefis create-b data address-l length-f flash address-e entry-r relocation address-s data length-n nameArgumentsNameTypeDescriptionDefault-bNumberAddress of data to be written to the flash.Address of last loaded file. If not set in a load
operation, it must be specified.-lNumberLength of flash area to occupy. If specified, and
the named image already exists, the length must match
the value in the FIS directory.Length of area reserved in FIS directory if the
image already exists, or the length of the last loaded
file. If neither are set, it must be specified.-fNumberAddress of flash area to occopy.The address of an area reserved in the FIS
directory for extant images. Otherwise the first free block
which is large enough will be used.-eNumberEntry address for an executable image, used by
the fis load command.The entry address of last loaded file.-rNumberAddress where the image should be relocated to by
the fis load command. This is only
relevant for images that will be loaded with the
fis load command.The load address of the last loaded file.-sNumberActual length of data written to image. This is
used to control the range over which the checksum is
made.It defaults to the length of the last loaded
file.-nWhen set, no image data will be written to the
flash. Only the FIS directory will be updated.nameStringName of flash image.DescriptionThis command creates an image in the FIS directory. The data for the
image must exist in RAM memory before the copy. Typically, you would use the
RedBoot load command to load file into
RAM and then the fis create command to write
it to a flash image.ExamplesTrying to create an extant image, will require the action
to be verified.
RedBoot> fis create RedBoot -f 0xa0000000 -b 0x8c400000 -l 0x20000
An image named ‘RedBoot’ exists - continue (y/n)? nCreate a new test image, let the command find a suitable place.
RedBoot> fis create junk -b 0x8c400000 -l 0x20000
... Erase from 0xa0040000-0xa0060000: .
... Program from 0x8c400000-0x8c420000 at 0xa0040000: .
... Erase from 0xa0fe0000-0xa1000000: .
... Program from 0x8c7d0000-0x8c7f0000 at 0xa0fe0000: .
Update the RedBoot[RAM] image.
RedBoot> load redboot_RAM.img
Entry point: 0x060213c0, address range: 0x06020000-0x06036cc0
RedBoot> fis create RedBoot[RAM]
No memory address set.
An image named 'RedBoot[RAM]' exists - continue (y/n)? y
* CAUTION * about to program 'RedBoot[RAM]'
at 0x00020000..0x00036cbf from 0x06020000 - continue (y/n)? y
... Erase from 0x00020000-0x00040000: ..
... Program from 0x06020000-0x06036cc0 at 0x00020000: ..
... Erase from 0x00070000-0x00080000: .
... Program from 0x0606f000-0x0607f000 at 0x00070000: .
fis loadLoad flash imagefis load-b load address-c -d nameArgumentsNameTypeDescriptionDefault-bNumberAddress the image should be loaded to. Executable
images normally load at the location to which the file
was linked. This option allows the image to be loaded to
a specific memory location, possibly overriding any
assumed location.If not specified, the address associated with the
image in the FIS directory will be used.-cCompute and print the checksum of the image data
after it has been loaded into memory.-dDecompress gzipped image while copying it from
flash to RAM.nameStringThe name of the file, as shown in the FIS
directory.DescriptionThis command is used to transfer an image from flash memory to RAM.
Once the image has been loaded, it may be executed using the
go command.ExamplesLoad and run RedBoot[RAM] image.
RedBoot> fis load RedBoot[RAM]
RedBoot> gofis deleteDelete flash imagefis deletenameArgumentsNameTypeDescriptionDefaultnameNumberName of image that should be deleted.DescriptionThis command removes an image from the FIS. The flash memory will be
erased as part of the execution of this command, as well as removal of the
name from the FIS directory.Certain images are reserved by RedBoot and cannot be deleted.
RedBoot will issue a warning if this is attempted.Examples
RedBoot> fis list
Name flash addr Mem addr Length Entry point
RedBoot 0xA0000000 0xA0000000 0x020000 0x80000000
RedBoot config 0xA0FC0000 0xA0FC0000 0x020000 0x00000000
FIS directory 0xA0FE0000 0xA0FE0000 0x020000 0x00000000
junk 0xA0040000 0x8C400000 0x020000 0x80000000
RedBoot> fis delete junk
Delete image ‘junk’ - continue (y/n)? y
... Erase from 0xa0040000-0xa0060000: .
... Erase from 0xa0fe0000-0xa1000000: .
... Program from 0x8c7d0000-0x8c7f0000 at 0xa0fe0000: .
fis lockLock flash areafis lock-f flash_address-l lengthArgumentsNameTypeDescriptionDefaultflash_addressNumberAddress of area to be locked.lengthNumberLength of area to be locked.DescriptionThis command is used to write-protect (lock) a portion of flash memory,
to prevent accidental overwriting of images. In order to make any modifications
to the flash, a matching fis unlock command must be
issued. This command is optional and will only be provided on hardware
which can support write-protection of the flash space.Depending on the system, attempting to write to write-protected flash
may generate errors or warnings, or be benignly quiet. ExamplesLock an area of the flash
RedBoot> fis lock -f 0xa0040000 -l 0x20000
... Lock from 0xa0040000-0xa0060000: .
fis unlockUnlock flash areafis unlock-f flash_address-l lengthArgumentsNameTypeDescriptionDefaultflash_addressNumberAddress of area to be unlocked.lengthNumberLength of area to be unlocked.DescriptionThis command is used to unlock a portion of flash memory forcibly, allowing
it to be updated. It must be issued for regions which have been locked before
the FIS can reuse those portions of flash.Some flash devices power up in locked state and always need to
be manually unlocked before they can be written to.ExamplesUnlock an area of the flash
RedBoot> fis unlock -f 0xa0040000 -l 0x20000
... Unlock from 0xa0040000-0xa0060000: .
fis eraseErase flash areafis erase-f flash_address-l lengthArgumentsNameTypeDescriptionDefaultflash_addressNumberAddress of area to be erased.lengthNumberLength of area to be erased.DescriptionThis command is used to erase a portion of flash memory forcibly. There
is no cross-checking to ensure that the area being erased does not correspond
to an existing image.ExamplesErase an area of the flash
RedBoot> fis erase -f 0xa0040000 -l 0x20000
... Erase from 0xa0040000-0xa0060000: .
fis writeWrite flash areafis write-b mem_address-l length-f flash_addressArgumentsNameTypeDescriptionDefaultmem_addressNumberAddress of data to be written to flash.lengthNumberLength of data to be writtem.flash_addressNumberAddress of flash to write to.DescriptionThis command is used to write data from memory to flash. There
is no cross-checking to ensure that the area being written to does not
correspond to an existing image.ExamplesWrite an area of data to the flash
RedBoot> fis write -b 0x0606f000 -l 0x1000 -f 0x00020000
* CAUTION * about to program FLASH
at 0x00020000..0x0002ffff from 0x0606f000 - continue (y/n)? y
... Erase from 0x00020000-0x00030000: .
... Program from 0x0606f000-0x0607f000 at 0x00020000: .
Filesystem Interfacecommandsfilesystem access
filesystem commandscommandsfsfs commands
If the platform has access to secondary storage, then RedBoot may be
able to access a filesystem stored on this device. RedBoot can access
FAT filesystems stored on IDE disks or CompactFlash devices and can
use JFFS2 filesystems stored in FLASH memory. The
fs command is used to manipulate files on
filesystems. Applications may be loaded into memory using the
file mode of the load command.
fs infoPrint filesystem informationfs infoArguments
The command takes no arguments.
DescriptionThis command prints information about the filesystems that are
available. Three lists are produced. The first is a list of the
filsystem implementations available in RedBoot; names from this list
may be used in the -t option to the fs
mount command. The second list describes the block devices
that are available for mounting a filesystem; names from this list may
be used in the -d option to the fs
mount command. The last list describes the filesystems that
are already mounted.
Examples
RedBoot> fs info
Filesystems available:
ramfs
jffs2
Devices available:
/dev/flash1
Mounted filesystems:
Device Filesystem Mounted on
<undefined> ramfs /
/dev/flash1 jffs2 /flash
RedBoot>fs mountMount a filesystemfs mount-d device-t fstypemountpointArgumentsNameTypeDescriptionDefaultdeviceNumberDevice containing filsystem to mount.undefinedfstypeNumberFilesystem type.mountpointStringPathname for filesystem root./DescriptionThis command is used make a filesystem available for access with
the filesystem access commands. Three things need to be defined to do
this. First, the name of the device on which the filesystem is stored
needs to be given to the -d option. Secondly,
the type of filesystem it is needs to be given to the
-t option. Finally, the pathname by which the
new filesystem will be accessed needs to be supplied. Following a
successful mount, the root of the filesystem will be accessible
at the mountpoint.
ExamplesMount a JFF2 partititon:
RedBoot> fs info
Filesystems available:
ramfs
jffs2
Devices available:
/dev/flash1
Mounted filesystems:
Device Filesystem Mounted on
<undefined> ramfs /
RedBoot> fs mount -d /dev/flash1 -t jffs2 /flash
RedBoot> fs info
Filesystems available:
ramfs
jffs2
Devices available:
/dev/flash1
Mounted filesystems:
Device Filesystem Mounted on
<undefined> ramfs /
/dev/flash1 jffs2 /flash
RedBoot>
fs umountUnmount filesystemfs umountmountpointArgumentsNameTypeDescriptionDefaultmountpointStringMountpoint of filesystem to unmount.DescriptionThis command removes a filesystem from being accessible using
the filesystem commands. The single argument needs to be the
mountpoint that was used when mounting the filesystem. This command
will fail if the current directory is currently within the filesystem
to be unmounted.
ExamplesUnmount a JFF2 partititon:
RedBoot> fs info
Filesystems available:
ramfs
jffs2
Devices available:
/dev/flash1
Mounted filesystems:
Device Filesystem Mounted on
<undefined> ramfs /
/dev/flash1 jffs2 /flash
RedBoot> fs umount /flash
RedBoot> fs info
Filesystems available:
ramfs
jffs2
Devices available:
/dev/flash1
Mounted filesystems:
Device Filesystem Mounted on
<undefined> ramfs /
RedBoot>
fs cdChange filesystem directoryfs cddirectoryArgumentsNameTypeDescriptionDefaultdirectoryStringPathname to directory to change to.Root directoryDescriptionThis command changes the current filesystem
directory. Subsequent filesystem commands will be executed in the new
directory. If no argument is given, then the current directory is set
back to the root of the filesystem name space.
ExamplesChange current directory:
RedBoot> fs list
212416 d--------- 3 size 128 .
212416 d--------- 3 size 128 ..
211392 d--------- 2 size 96 tests
210368 ---------- 1 size 4096 image
RedBoot> fs cd tests
RedBoot> fs list
211392 d--------- 2 size 96 .
212416 d--------- 3 size 128 ..
205760 ---------- 1 size 16384 test1
RedBoot>
fs mkdirCreate filesystem directoryfs mkdirdirectoryArgumentsNameTypeDescriptionDefaultdirectoryStringPathname to directory to delete.DescriptionThis command creates (makes) a directory in the filesystem.
ExamplesCreate directory:
RedBoot> fs list
212416 d--------- 2 size 128 .
212416 d--------- 2 size 128 ..
210368 ---------- 1 size 4096 image
RedBoot> fs mkdir tests
RedBoot> fs list
212416 d--------- 3 size 128 .
212416 d--------- 3 size 128 ..
211392 d--------- 2 size 64 tests
210368 ---------- 1 size 4096 image
RedBoot>
fs deldirDelete filesystem directoryfs deldirdirectoryArgumentsNameTypeDescriptionDefaultdirectoryStringPathname to directory to delete.DescriptionThis command deletes a directory from the filesystem. If the
directory contains files or other directories then this command will
fail.
ExamplesDelete directory:
RedBoot> fs list
212416 d--------- 3 size 128 .
212416 d--------- 3 size 128 ..
211392 d--------- 2 size 96 tests
210368 ---------- 1 size 4096 image
RedBoot> fs deldir tests
RedBoot> fs list
212416 d--------- 2 size 128 .
212416 d--------- 2 size 128 ..
210368 ---------- 1 size 4096 image
RedBoot>
fs delDelete filefs delfileArgumentsNameTypeDescriptionDefaultfileStringPathname of file to delete.DescriptionThis command deletes a file from the filesystem.
ExamplesChange current directory:
RedBoot> fs list tests
211392 d--------- 2 size 96 .
212416 d--------- 3 size 128 ..
205760 ---------- 1 size 16384 test1
RedBoot> fs del tests/test1
RedBoot> fs list tests
211392 d--------- 2 size 96 .
212416 d--------- 3 size 128 ..
RedBoot>
fs moveMove filefs movesourcedestArgumentsNameTypeDescriptionDefaultsourceStringPathname of file to move.destStringPathname to new file location.DescriptionThis command moves a file within a filesystem. This command will
fail if the destination file already exists, or is in a different
filesystem.
ExamplesRename a file:
RedBoot> fs list tests
211392 d--------- 2 size 96 .
212416 d--------- 3 size 128 ..
205760 ---------- 1 size 12288 test1
RedBoot> fs move tests/test1 tests/test2
RedBoot> fs list tests
211392 d--------- 2 size 128 .
212416 d--------- 3 size 128 ..
205760 ---------- 1 size 12288 test2
RedBoot>
fs listList filesystem directoryfs listdirectoryArgumentsNameTypeDescriptionDefaultdirectoryStringPathname to directory to list.Current directoryDescriptionThis command prints a list of the contents of the named
directory. Each line of the listing starts with the file's inode
number, which is its address in the filesystem. Following is a set of
UNIX-like access flags, the first character of this will be a
”d“ if this entry is a directory. The third item indicates
the number of links to the file. Following this is the size of the
file in bytes and the last item is its name.
ExamplesList the current directory:
RedBoot> fs list
212416 d--------- 3 size 128 .
212416 d--------- 3 size 128 ..
211392 ---------- 1 size 4096 image
206784 d--------- 2 size 96 tests
RedBoot>
List a subdirectory:
RedBoot> fs list tests
206784 d--------- 2 size 96 .
212416 d--------- 3 size 128 ..
205760 ---------- 1 size 16384 test1
RedBoot>
fs writeWrite to filesystemfs write-b mem_address-l lengthnameArgumentsNameTypeDescriptionDefaultmem_addressNumberAddress of data to be written to flash.Address of last loaded file. If not set by a load
operation it must be specified.lengthNumberLength of data to be written.Length of last loaded file.nameStringName of file to create.DescriptionThis command is used to write data from memory to a file. If the
file does not exist it will be created. If it does exist, then it will
be overwritten with the new contents.ExamplesWrite an area of data to a file
RedBoot> fs write -b 0x0606f000 -l 0x1000 image
RedBoot> fs list
212416 d--------- 3 size 128 .
212416 d--------- 3 size 128 ..
211392 ---------- 1 size 4096 image
206784 d--------- 2 size 96 tests
RedBoot>
Persistent State Flash-based Configuration and Controlpersistent state flash-based configuration and control
flash-based configuration and control
configuration and controlflash-basedRedBoot 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 keyThis 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 .
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. This is also needed the first time RedBoot is installed on the
target, or when updating to a newer RedBoot with different
configuration keys.
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”, . If any changes are made in the configuration, then the updated data
will be written back to flash after getting acknowledgment 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 nicknamevalue
If no
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
be prompted whether to write the new information into flash if any change
was made. For example
RedBoot> fconfig -l -n
boot_script: false
bootp: false
bootp_my_ip: 10.16.19.176
bootp_server_ip: 10.16.19.66
dns_ip: 10.16.19.1
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 - continue (y/n)? y
... Unlock from 0x507c0000-0x507e0000: .
... Erase from 0x507c0000-0x507e0000: .
... Program from 0x0000a8d0-0x0000acd0 at 0x507c0000: .
... Lock from 0x507c0000-0x507e0000: .
RedBoot>
Additionally, nicknames can be used like aliases via the format %{nickname}.
This allows the values stored by fconfig to be used
directly by scripts and commands.
Depending on how your terminal program is connected and its
capabilities, you might find that you are unable to use line-editing to
delete the ‘old’ value when using the default behaviour of
fconfig nickname or just
plain fconfig, as shown in this example:
RedBoot> fco bootp
bootp: false_
The user deletes the word “false;&rdquo and enters “true”
so the display looks like this:
RedBoot> fco bootp
bootp: true
Update RedBoot non-volatile configuration - continue (y/n)? y
... Unlock from ...
RedBoot> _
To edit when you cannot backspace, use the optional flag
-d (for “dumb terminal”)
to provide a simpler interface thus:
RedBoot> fco -d bootp
bootp: false ? _
and you enter the value in the obvious manner thus:
RedBoot> fco -d bootp
bootp: false ? true
Update RedBoot non-volatile configuration - continue (y/n)? y
... Unlock from ...
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
DNS server IP address: 192.168.1.1
DNS domain name: example.com
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 - continue (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, Free Software Foundation, 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 config 0xA0FC0000 0xA0FC0000 0x020000 0x00000000
FIS directory 0xA0FE0000 0xA0FE0000 0x020000 0x00000000
RedBoot>
NOTEThe 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. NOTE
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
is primarily to allow the possibility of canceling the script. Since
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
value is zero, then RedBoot will abort the script execution immediately.
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 startup 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[RAM]
>> {ROM}go
>> {RAM}fis li
>>
Boot script timeout (1000ms resolution): 2
Use BOOTP for network configuration: false
...
Update RedBoot non-volatile configuration - continue (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 [ROM]
Red Hat certified release, version R1.xx - built 17:37:36, Aug 14 2001
Platform: IQ80310 (XScale)
Copyright (C) 2000, 2001, Free Software Foundation, 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[RAM]
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 [RAM]
Red Hat certified release, version R1.xx - built 13:03:47, Aug 14 2001
Platform: IQ80310 (XScale)
Copyright (C) 2000, 2001, Free Software Foundation, 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 config 0x007DF000 0x007DF000 0x00001000 0x00000000
FIS directory 0x007E0000 0x007E0000 0x00020000 0x00000000
RedBoot>
Executing Programs from RedBootexecuting programsRedBootexecuting programsOnce
an image has been loaded into memory, either via the load
command or the fis load
command, execution may be transfered to that image.NOTEThe image is assumed to be a stand-alone entity, as RedBoot gives the
entire platform over to it. Typical examples would be an eCos application
or a Linux kernel.goExecute a programgo-w timeout-c-n start_addressArgumentsNameTypeDescriptionDefault-w timeoutNumberHow long to wait before starting execution.0-cBooleanGo with caches enabled.caches off-nBooleanGo with network interface stopped.network enabledstart_addressNumberAddress in memory to begin execution.Value set by last load or fis load command.Description
The go command causes RedBoot to give control of the target platform to
another program. This program must execute stand alone, e.g. an eCos
application or a Linux kernel.
If the -w option is used, RedBoot will print a message and then
wait for a period of time before starting the execution. This is
most useful in a script, giving the user a chance to abort executing
a program and move on in the script.
Examples
Execute a program - no explicit output from RedBoot.
RedBoot> go 0x40040
Execute a program with a timeout.
RedBoot> go -w 10
About to start execution at 0x00000000 - abort with ^C within 10 seconds
^C
RedBoot>
Note that the starting address was implied (0x00000000 in this example).
The user is prompted that execution will commence in 10 seconds. At
anytime within that 10 seconds the user may type Ctrl+C
on the console and RedBoot will abort execution and return for the next
command, either from a script or the console.
execExecute a Linux kernelexec-w timeout-r ramdisk_address-s ramdisk_length-b load_address-l load_length-c kernel_command_line entry_pointArgumentsNameTypeDescriptionDefault-w timeoutNumberTime to wait before starting execution.0-r ramdisk_addressNumberAddress in memory of "initrd"-style ramdisk - passed to Linux kernel.None-s ramdisk_lengthNumberLength of ramdisk image - passed to Linux kernel.None-b load_addressNumberAddress in memory of the Linux kernel image.Value set by load or fis load-l load_lengthNumberLength of Linux kernel image.none-c kernel_command_lineStringCommand line to pass to the Linux kernel.None-xBoot kernel with endianess opposite of RedBoot endianess.Boot kernel with same endianess as RedBootentry_addressNumberStarting address for Linux kernel executionImplied by architectureDescription
The exec command is used to execute a non-eCos application, typically a
Linux kernel. Additional information may be passed to the kernel at startup
time. This command is quite special (and unique from the go command) in
that the program being executed may expect certain environmental setups, for
example that the MMU is turned off, etc. The Linux kernel expects to have been loaded to a particular memory
location which is architecture dependent(0xC0008000 in the case of the SA1110).
Since this memory is used
by RedBoot internally, it is not possible to load the kernel to that location
directly. Thus the requirement for the "-b" option which tells the command
where the kernel has been loaded. When the exec command runs, the image will
be relocated to the appropriate location before being started. The "-r" and
"-s" options are used to pass information to the kernel about where a statically
loaded ramdisk (initrd) is located.The "-c" option can be used to pass textual "command line" information
to the kernel. If the command line data contains any punctuation (spaces,
etc), then it must be quoted using the double-quote character '"'. If the
quote character is required, it should be written as '\"'.
The "-x" option is optionally available on some bi-endian platforms. It is used to boot
a kernel built with an endianess opposite of RedBoot.Examples
Execute a Linux kernel, passing a command line, which needs relocation.
The result from RedBoot is normally quiet, with the target platform being
passed over to Linux immediately.
RedBoot> exec -b 0x100000 -l 0x80000 -c "noinitrd root=/dev/mtdblock3 console=ttySA0"
Execute a Linux kernel, default entry address and no relocation required, with a timeout.
The emphasized lines are output from the loaded kernel.
RedBoot> exec -c "console=ttyS0,38400 ip=dhcp nfsroot=/export/elfs-sh" -w 5
Now booting linux kernel:
Base address 0x8c001000 Entry 0x8c210000
Cmdline : console=ttyS0,38400 ip=dhcp nfsroot=/export/elfs-sh
About to start execution at 0x8x210000 - abort with ^C within 5 seconds
Linux version 2.4.10-pre6 (...) (gcc version 3.1-stdsh-010931) #3 Thu Sep 27 11:04:23 BST 2001