RedBoot™ User's Guide: Document Version R1.24, August 2001 | ||
---|---|---|
Prev | Chapter 2. RedBoot Commands and Examples | Next |
The general format of commands is:
command <options, parameters> |
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.
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.
-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 IP> | The address of the other device to contact. |
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 |................| |
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.
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.
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.
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'.
This command is used to list disk partitions recognized by RedBoot.
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. Note that it 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,| |
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.
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> |
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 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]
file | The 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. |
-v | Display 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. |
-d | Decompress gzipped image during download. |
-b | Specify 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. |
-r | Download 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:
|
-h | Used 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 |