Common Commands

The general format of commands is:

command <options, parameters>
Elements are separated by the space character. Other control characters, such as Tab or editing keys (Insert) are not currently supported.

Numbers, such as a memory location, may be specified in either decimal or hexadecimal (requires a 0x prefix).

Commands may be abbreviated to any unique string. For example, lo is equivalent to loa and load.

Connectivity

dns [IP]

This command is used to show/change the IP address used for DNS lookups. If an IP address of 0.0.0.0 is entered, DNS lookups are disabled.

ip_address [-l <local_ip_address>] [-h <server_address>]

This command is used to show/change the basic IP addresses used by RedBoot. The -l option is used to set the IP address used by the target device. The -h option is used to set the default server address, such as is used by the load command.

ping - Check network connectivity ping

ping [-v] [-n <count>] [-l <length>] [-t <timeouts>] [-r <rate>][-i <IP_addr>] -h <IP_addr>

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.

Arguments

-v Be verbose, displaying information about each packet sent.
-n <count>Controls the number of packets to be sent. Default is 10 if -n is not specified.
-t <timeout>How long to wait for the round-trip to complete, specified in milliseconds. Default is 1000ms (1 second).
-r <rate>How fast to deliver packets, i.e. time between successive sends. Default is 1000ms (1 second). Specifying "-r 0" will send packets as quickly as possible.
-l <length>Each packet contains some amount of payload data. This option specifies the length of that data. The default is 64 and the value is restricted to the range 64 .. 1400.
-i <local IP>This allows the ping command to override its local network address. While this is not recommended procedure, it can help diagnose some situations, for example where BOOTP is not working properly.
-h <host>The hostname or IP address of the other device to contact.

General

alias name [value]

The 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 a script, the corresponding value will be substituted.

Aliases are kept in RedBoot's non-volatile configuration area, i.e. Flash memory.

This is an example of setting an alias. Notice the use of a quoted string when the value contains spaces.

RedBoot> alias SBUF "-b 0x100000"
Update RedBoot non-volatile configuration - are you sure (y/n)? y
... Unlock from 0x50f80000-0x50fc0000: .
... Erase from 0x50f80000-0x50fc0000: .
... Program from 0x0000b9e8-0x0000c9e8 at 0x50f80000: .
... Lock from 0x50f80000-0x50fc0000: .

This example shows querying of an alias, as well as how it might be used.

RedBoot> alias SBUF
'SBUF' = '-b 0x100000'
RedBoot> d %{SBUF}
0x00100000: FE03 00EA 0000 0000  0000 0000 0000 0000   |................|
0x00100010: 0000 0000 0000 0000  0000 0000 0000 0000   |................|

baud [-b value]

This command sets the baud rate for the system serial console. If the platform supports non-volatile configuration data, then the new value will be saved and used when the system is reset.

cache [ON | OFF]

This 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.

channel [-1|<channel number>]

With no arguments, this command displays the current console channel number.

When passed an argument of 0 upwards, this command switches the console channel to that channel number. The mapping between channel numbers and physical channels is platform specific.

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.

cksum -b <location> -l <length>

Computes the POSIX checksum on a range of memory (either RAM or FLASH). The value printed can be compared with the output from the Linux program 'chksum'.

mfill -b <location> -l <length> [-p <pattern>] [-1|-2|-4]

Fills a range of memory with the given pattern. If the pattern is ommitted, then a value of zero is used. The options -1, -2, -4 are used to select the length of the objects used while filling. For example, -2 selects to fill 16 bits at a time, etc.

mcmp -s <location> -d <location> -l <length> [-1|-2|-4]

Compares two ranges of memory. The options -1, -2, -4 are used to select the length of the objects used while comparing. For example, -2 selects to compare 16 bits at a time, etc.

swab -b <location> -l <length> [-2|-4]

Swap bytes in a block of 16-bit or 32-bit words. The options -2, -4 are used to select the length of the words to be byte-swapped. For example, -2 selects to swap bytes inside 16 bit words, etc.

disks

This command is used to list disk partitions recognized by RedBoot.

dump -b <location> [-l <length>] [-s]

Display (hex dump) a range of memory.

This command displays the contents of memory in hexadecimal format. It is most useful for examining a segment of RAM or flash. If the optional -s switch is provided, then the dump will be formatted as Motorola S-records. The x command 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.

RedBoot> du -b 0x100 -l 0x80
0x00000100: 3C60 0004 6063 2000 7C68 03A6 4E80 0020 |<`..`c .|h..N.. |
0x00000110: 0000 0000 0000 0000 0000 0000 0000 0000 |................|
0x00000120: 0000 0000 0000 0000 0000 0000 0000 0000 |................|
0x00000130: 0000 0000 0000 0000 0000 0000 0000 0000 |................|
0x00000140: 0000 0000 0000 0000 0000 0000 0000 0000 |................|
0x00000150: 0000 0000 0000 0000 0000 0000 0000 0000 |................|
0x00000160: 0000 0000 0000 0000 0000 0000 0000 0000 |................|
0x00000170: 0000 0000 0000 0000 0000 0000 0000 0000 |................|
RedBoot> d -b 0xfe00b000 -l 0x80
0xFE00B000: 2025 700A 0000 0000 4174 7465 6D70 7420 | %p.....Attempt |
0xFE00B010: 746F 206C 6F61 6420 532D 7265 636F 7264 |to load S-record|
0xFE00B020: 2064 6174 6120 746F 2061 6464 7265 7373 | data to address|
0xFE00B030: 3A20 2570 205B 6E6F 7420 696E 2052 414D |: %p [not in RAM|
0xFE00B040: 5D0A 0000 2A2A 2A20 5761 726E 696E 6721 |]...*** Warning!|
0xFE00B050: 2043 6865 636B 7375 6D20 6661 696C 7572 | Checksum failur|
0xFE00B060: 6520 2D20 4164 6472 3A20 256C 782C 2025 |e - Addr: %lx, %|
0xFE00B070: 3032 6C58 203C 3E20 2530 326C 580A 0000 |02lX <> %02lX...|
0xFE00B080: 456E 7472 7920 706F 696E 743A 2025 702C |Entry point: %p,|
RedBoot> x -b 0x3e00000 -s -l 0x80
S31503E00000803C04E980880000808800008088000046
S31503E00010825010188948100088400001C01A040174
S31503E00020825010188948100088400002C01A03FD68
S31503E00030825010188948100088400003C01A03F95B
S31503E00040825010188948100088400004C01A03F54E
S31503E00050825010188948100088400005C01A03F141
S31503E00060825010188948100088400006C01A03ED34
S31503E00070825010188948100088400007C01A03E927

reset

Reset the system.

This command resets the platform. On many targets this is equivalent to a power-on reset, but on others it may just cause a jump to the architecture's reset entry resulting in a reinitialization of the system.

version

Display RedBoot version information.

This command simply displays version information about RedBoot.

RedBoot> version
RedBoot(tm) debug environment - built 09:12:03, Feb 12 2001
Platform: XYZ (PowerPC 860)
Copyright (C) 2000, 2001, Red Hat, Inc.
RAM: 0x00000000-0x00400000
RedBoot>

Download Process

load

The load command is used to download data into the target system. Data can be loaded via a network connection, using either the TFTP protocol, 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. The format of the command is:

load {file} [-v] [-d] [-b location] [-r] [-m {xmodem | ymodem | tftp | disk}] [-h host_IP_address]

Arguments

fileThe name of the file on the TFTP 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.
-vDisplay 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.
-dDecompress gzipped image during download.
-cSpecify which I/O channel to use for download. This option is only supported when using either xmodem or ymodem protocol.
-bSpecify the location in memory to which the file should be loaded. Executable images normally load at the location to which the file was linked. This option allows the file to be loaded to a specific memory location, possibly overriding any assumed location.
-rDownload raw data. Normally, the load command is used to load executable images into memory. This option allows for raw data to be loaded. If this option is given, -b will also be required.
-m

The -m option is used to select the download method. The choices are:

xmodem, ymodem

serial download using standard protocols over a port. If no -c option is used, the current console port will be used, otherwise the protocol transfer will take place on the specified channel. When using this method, the file parameter is not required.

tftp

network based download using the TFTP protocol.

disk

load a file from local disk.

-hUsed explicitly to name a host computer to contact for the download data. This works in TFTP mode only.

RedBoot> lo redboot.ROM -b 0x8c400000
Address offset = 0x0c400000
Entry point: 0x80000000, address range: 0x80000000-0x8000fe80