Log In |  Site Map  | 
Location  
Powered by Embedian :: Trusted Embedded ARM/XSCALE Computers Embedian Embedian Embedian Embedian
  
   Advanced Search
     Monday, Sep 06, 2010
  Welcome!

U-Boot Command Line Interface

1.3. U-Boot Command Line Interface


In the default configuration, U-Boot operates in an interactive mode which provides a simple command line-oriented user interface using a serial console port. (CN20)

1.3.1. Command Line Interface Initial Steps

When you entering the command Ine interface, in the simplest case, this means that u-boot shows a prompt (default: =>) when it is ready to receive user input. You then type a command, and press enter. U-boot will try to run the required action(s), and then prompt for another command.

To see a list of the available u-boot commands, you can type help (or simply ?). This will print a list of all commands that are available in your current configuration. [Please note that u-boot provides a lot of configuration options; not all options are available for all processors and boards, and some options might be simply not selected for your configuration.]

=> help
askenv  - get environment variables from stdin
autoscr - run script from memory
base    - print or set address offset
bdinfo  - print Board Info structure
bootm   - boot application image from memory
bootp   - boot image via network using BootP/TFTP protocol
bootd   - boot default, i.e., run 'bootcmd'
cmp     - memory compare
coninfo - print console devices and informations
cp      - memory copy
crc32   - checksum calculation
date    - get/set/reset date & time
dhcp    - invoke DHCP client to obtain IP/boot params
diskboot- boot from IDE device
echo    - echo args to console
erase   - erase FLASH memory
flinfo  - print FLASH memory information
go      - start application at address 'addr'
help    - print online help
ide     - IDE sub-system
iminfo  - print header information for application image
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loop    - infinite loop on address range
md      - memory display
mm      - memory modify (auto-incrementing)
mtest   - simple RAM test
mw      - memory write (fill)
nm      - memory modify (constant address)
printenv- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
reset   - Perform RESET of the CPU
run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
sleep   - delay execution for some time
tftpboot- boot image via network using TFTP protocol
               and env variables ipaddr and serverip
version - print monitor version
?       - alias for 'help'
=>

With the command help you can get additional information about most commands:

=> help tftpboot
tftpboot [loadAddress] [bootfilename]
=> help setenv printenv
setenv name value ...
    - set environment variable 'name' to 'value ...'
setenv name
    - delete environment variable 'name'
 
printenv
    - print values of all environment variables
printenv name ...
    - print value of environment variable 'name'
 
=>

Most commands can be abbreviated as long as the string remains unambiguous:

=> help fli tftp
flinfo
    - print information for all FLASH memory banks
flinfo N
    - print information for FLASH memory bank # N
 
tftpboot [loadAddress] [bootfilename]
 
=>

The following section briefly describes the most important commands available in U-Boot. Since this document is not an exhaustive manual for u-boot, if you are looking for a detailed reference manual or command index, you should consult the main U-boot manual at http://www.denx.de/twiki/bin/view/DULG/Manual or type help to get additional information.

Please note that u-boot is highly configurable, so not all of these commands may be available in the configuration of u-boot installed on your hardware, or additional commands may exist. You can use the help command to print a list of all available commands for your configuration.

For most commands, you do not need to type in the full command name; instead it is sufficient to type a few characters. For instance, help can be abbreviated as h.

Note:

  • The behaviour of some commands depends of the configuration of u-boot and on the definition of some variables in u-boot environment.
  • All u-boot commands expect numbers to be entered in hexadecimal input format.

1.3.2. Basic Command Set

1.3.2.1. Information Commands

bdinfoprint Board Info structure
coninfoprint console devices and informations
flinfoprint Flash memory information
iminfoprint header information for application image
imlslist all images found in flash
helpprint online help

1.3.2.2. Memory Commands

baseprint or set address offset
crc32checksum calculation
cmpmemory compare
cpmemory copy
mdmemory display
mmmemory modify (auto incrementing)
mtestsimple RAM test
mwmemory write (fill)
nmmemory modify (constant address)
loopinfinite loop on address range

1.3.2.3. Flash Memory Commands

cpmemory copy (program flash)
flinfoprint FLASH memory information
eraseerase FLASH memory
protectenable or disable FLASH write protection
nandwwrite image to NAND flash

1.3.2.4. Execution Control Commands

autoscrrun script from memory
bootmboot application image from memory
bootelfBoot from an ELF image in memory
bootvxBoot vxWorks from an ELF image
gostart application at address 'addr'

1.3.2.5. Network Commands

bootpboot image via network using BOOTP/TFTP protocol
cdpPerform Cisco Discovery Protocol network configuration
dhcpinvoke DHCP client to obtain IP/boot params
loadbload binary file over serial line (kermit mode)
loadsload S Record file over serial line
nfsboot image via network using NFS protocol
tftpinvoke TFTP client for file transfer
pingsend ICMP ECHO_REQUEST to network host
rarpbootboot image via network using RARP/TFTP protocol
tftpbootboot image via network using TFTP protocol

1.3.2.6. Environmental Variable Commands

printenvprint environment variables
saveenvsave environment variables to persistent storage
askenvget environment variables from stdin
setenvset environment variables
runrun commands in an environment variable
bootdboot default, i.e., run 'bootcmd'

1.3.2.7. Filesystem Support (FAT, cramfs, JFFS2, Reiser)

chpartchange active partition
fsinfoprint information about filesystems
fsloadload binary file from a filesystem image
lslist files in a directory (default /)
fatinfoprint information about filesystem
fatlslist files in a directory (default /)
fatloadload binary file from a dos filesystem
nandNAND flash sub system
reiserlslist files in a directory (default /)
reiserloadload binary file from a Reiser filesystem

1.3.2.8. Special Commands

i2cI2C sub system
docDisk On Chip sub system
dttDigital Thermometer and Themostat
eepromEEPROM sub system
fpgaFPGA sub system
ideIDE sub system
kgdbenter gdb remote debug mode
diskbootboot from IDE device
icacheenable or disable instruction cache
dcacheenable or disable data cache
diagperform board diagnostics (POST code)
logmanipulate logbuffer
pcilist and access PCI Configuraton Space
regdumpregister dump commands
usbUSB sub system
sspiSPI utility commands

1.3.2.9. Miscellaneous Commands

bmpmanipulate BMP image data
dateget/set/reset date & time
echoecho args to console
exitexit script
kbdread keyboard status
inread data from an IO port
outwrite datum to IO port
resetPerform RESET of the CPU
sleepdelay execution for some time
test minimal test like /bin/sh
versionprint monitor version
wdcheck and set watchdog
?alias for 'help'

Next section, we will introduce the u-boot environment variables so that developers could configure the system and to store parameters for commands, and sequences of commands (simple scripts).

1.2. Dual-BIOS Architecture1.4. U-Boot Environment Variables
Back
 | Home | About Embedian | Shipping & Returns | Privacy Policy | Conditions of Use | ContactUs | WiKi | 
Parse Time: 0.485 - Number of Queries: 96 - Query Time: 0.064509663619995