Difference between revisions of "U-Boot: Quick reference"

From Compulab Mediawiki
Jump to: navigation, search
 
Line 1: Line 1:
 
This page provides quick U-Boot command reference. Please refer to the [http://www.denx.de/wiki/U-Boot/Documentation U-Boot project documentation] for detailed descriptions of the features listed below.
 
This page provides quick U-Boot command reference. Please refer to the [http://www.denx.de/wiki/U-Boot/Documentation U-Boot project documentation] for detailed descriptions of the features listed below.
 
To get more information about a specific command, type {{cmd|help [command]}} in the U-Boot command line.
 
To get more information about a specific command, type {{cmd|help [command]}} in the U-Boot command line.
 +
{{Note|The actual command list depends on the U-Boot version, and the board configuration it was built for.}}
  
 
== Information commands ==
 
== Information commands ==
Line 25: Line 26:
 
* {{cmd|erase}} -  erase FLASH memory
 
* {{cmd|erase}} -  erase FLASH memory
 
* {{cmd|protect}} -  enable or disable FLASH write protection
 
* {{cmd|protect}} -  enable or disable FLASH write protection
 +
 +
== Image commands ==
 +
* {{cmd|iminfo}} -  print header information for application image
 +
* {{cmd|imxtract}} -  extract a part of a multi-image
  
 
== Execution control commands ==
 
== Execution control commands ==
 
* {{cmd|autoscr}} -  run script from memory
 
* {{cmd|autoscr}} -  run script from memory
 +
* {{cmd|source}} -  run script from memory
 
* {{cmd|bootm}} -  boot application image from memory
 
* {{cmd|bootm}} -  boot application image from memory
 
* {{cmd|go}} -  start application at address 'addr'
 
* {{cmd|go}} -  start application at address 'addr'
Line 37: Line 43:
 
* {{cmd|dhcp}} -  invoke DHCP client to obtain IP/boot params
 
* {{cmd|dhcp}} -  invoke DHCP client to obtain IP/boot params
 
* {{cmd|loadb}} -  load binary file over serial line (kermit mode)
 
* {{cmd|loadb}} -  load binary file over serial line (kermit mode)
 +
* {{cmd|loady}} -  load binary file over serial line (ymodem mode)
 
* {{cmd|loads}} -  load S?Record file over serial line
 
* {{cmd|loads}} -  load S?Record file over serial line
 
* {{cmd|rarpboot}} -  boot image via network using RARP/TFTP protocol
 
* {{cmd|rarpboot}} -  boot image via network using RARP/TFTP protocol
Line 44: Line 51:
  
 
== Environment variables commands ==
 
== Environment variables commands ==
 +
* {{cmd|env}} -  environment handling commands
 +
* {{cmd|editenv}} -  edit environment variable
 
* {{cmd|printenv}} -  print environment variables
 
* {{cmd|printenv}} -  print environment variables
 
* {{cmd|saveenv}} -  save environment variables to persistent storage
 
* {{cmd|saveenv}} -  save environment variables to persistent storage
Line 49: Line 58:
 
* {{cmd|run}} -  run commands in an environment variable
 
* {{cmd|run}} -  run commands in an environment variable
 
* {{cmd|bootd}} -  boot default, i.e., run 'bootcmd'
 
* {{cmd|bootd}} -  boot default, i.e., run 'bootcmd'
 +
* {{cmd|boot}} -  boot default, i.e., run 'bootcmd'
  
 
== File system support commands ==
 
== File system support commands ==
Line 54: Line 64:
 
* {{cmd|fatload}} -  load binary file from a FAT file system
 
* {{cmd|fatload}} -  load binary file from a FAT file system
 
* {{cmd|fatls}} -  list files in a FAT file system directory (default /)
 
* {{cmd|fatls}} -  list files in a FAT file system directory (default /)
 +
* {{cmd|ext2load}} -  load binary file from a Ext2 filesystem
 +
* {{cmd|ext2ls}} -  list files in a directory (default /)
 
* {{cmd|fsinfo}} -  print information about JFFS2 file system
 
* {{cmd|fsinfo}} -  print information about JFFS2 file system
 
* {{cmd|fsload}} -  load binary file from a JFFS2 file system image
 
* {{cmd|fsload}} -  load binary file from a JFFS2 file system image
Line 60: Line 72:
 
== NAND flash support ==
 
== NAND flash support ==
 
* {{cmd|nand}} -  NAND sub-system control
 
* {{cmd|nand}} -  NAND sub-system control
 +
* {{cmd|nandecc}} -  switch OMAP3 NAND ECC calculation algorithm
 
* {{cmd|nboot}} -  boot from NAND device
 
* {{cmd|nboot}} -  boot from NAND device
 +
 +
== Partition commands ==
 +
* {{cmd|mtdparts}} -  define flash/nand partitions
 +
* {{cmd|chpart}} -  change active partition
 +
 +
== FDT support ==
 +
* {{cmd|fdt}} -  flattened device tree utility commands
  
 
== MMC support ==
 
== MMC support ==
* {{cmd|mmcinit}} -  detect MMC card
+
* {{cmd|mmc}} -  MMC sub system
 +
* {{cmd|mmcinfo}} -  display MMC information
 +
 
 +
== I2C support ==
 +
* {{cmd|i2c}} -  I2C sub-system control
  
 
== USB support ==
 
== USB support ==
 
* {{cmd|usb}} -  USB sub-system control
 
* {{cmd|usb}} -  USB sub-system control
 
* {{cmd|usbboot}} -  boot from USB device
 
* {{cmd|usbboot}} -  boot from USB device
 +
 +
== Cache support ==
 +
* {{cmd|icache}} -  enable or disable instruction cache
 +
* {{cmd|dcache}} -  enable or disable data cache
  
 
== Bitmap support ==
 
== Bitmap support ==
Line 79: Line 107:
 
* {{cmd|test}} -  minimal test, like /bin/bash
 
* {{cmd|test}} -  minimal test, like /bin/bash
 
* {{cmd|?}} - alias for {{cmd|help}}
 
* {{cmd|?}} - alias for {{cmd|help}}
 
+
* {{cmd|showvar}} - print local hushshell variables
 +
* {{cmd|true}} - do nothing, successfully
 +
* {{cmd|false}} - do nothing, unsuccessfully
 +
* {{cmd|cls}} - clear screen
 +
* {{cmd|itest}} - return true/false on integer compare
  
 
[[Category:U-Boot|Quick reference]]
 
[[Category:U-Boot|Quick reference]]

Revision as of 14:04, 16 August 2012

This page provides quick U-Boot command reference. Please refer to the U-Boot project documentation for detailed descriptions of the features listed below. To get more information about a specific command, type help [command] in the U-Boot command line.

Admolition note.png The actual command list depends on the U-Boot version, and the board configuration it was built for.

Information commands

  • bdinfo - print Board Info structure
  • coninfo - print console devices and information
  • flinfo - print FLASH memory information
  • help - print online help

Memory commands

  • base - print or set address offset
  • crc32 - checksum calculation
  • cmp - memory compare
  • cp - memory copy
  • md - memory display
  • mm - memory modify (auto incrementing)
  • mtest - simple RAM test
  • mw - memory write (fill)
  • nm - memory modify (constant address)
  • loop - infinite loop on address range

Flash memory commands

  • cp - memory copy
  • flinfo - print FLASH memory information
  • erase - erase FLASH memory
  • protect - enable or disable FLASH write protection

Image commands

  • iminfo - print header information for application image
  • imxtract - extract a part of a multi-image

Execution control commands

  • autoscr - run script from memory
  • source - run script from memory
  • bootm - boot application image from memory
  • go - start application at address 'addr'
  • loop - infinite loop on address range
  • exit - exit script

Download commands

  • bootp - boot image via network using BOOTP/TFTP protocol
  • dhcp - invoke DHCP client to obtain IP/boot params
  • loadb - load binary file over serial line (kermit mode)
  • loady - load binary file over serial line (ymodem mode)
  • loads - load S?Record file over serial line
  • rarpboot - boot image via network using RARP/TFTP protocol
  • tftpboot - boot image via network using TFTP protocol
  • nfs - boot image via network using NFS protocol
  • ping - send ICMP ECHO REQUEST to network host

Environment variables commands

  • env - environment handling commands
  • editenv - edit environment variable
  • printenv - print environment variables
  • saveenv - save environment variables to persistent storage
  • setenv - set environment variables
  • run - run commands in an environment variable
  • bootd - boot default, i.e., run 'bootcmd'
  • boot - boot default, i.e., run 'bootcmd'

File system support commands

  • fatinfo - print information about a FAT file system
  • fatload - load binary file from a FAT file system
  • fatls - list files in a FAT file system directory (default /)
  • ext2load - load binary file from a Ext2 filesystem
  • ext2ls - list files in a directory (default /)
  • fsinfo - print information about JFFS2 file system
  • fsload - load binary file from a JFFS2 file system image
  • ls - list files in a JFFS2 file system directory (default /)

NAND flash support

  • nand - NAND sub-system control
  • nandecc - switch OMAP3 NAND ECC calculation algorithm
  • nboot - boot from NAND device

Partition commands

  • mtdparts - define flash/nand partitions
  • chpart - change active partition

FDT support

  • fdt - flattened device tree utility commands

MMC support

  • mmc - MMC sub system
  • mmcinfo - display MMC information

I2C support

  • i2c - I2C sub-system control

USB support

  • usb - USB sub-system control
  • usbboot - boot from USB device

Cache support

  • icache - enable or disable instruction cache
  • dcache - enable or disable data cache

Bitmap support

  • bmp - manipulate BMP image data

Miscellaneous commands

  • echo - echo arguments to console
  • reset - Perform RESET of the CPU
  • sleep - delay execution for some time
  • version - print monitor version
  • test - minimal test, like /bin/bash
  • ? - alias for help
  • showvar - print local hushshell variables
  • true - do nothing, successfully
  • false - do nothing, unsuccessfully
  • cls - clear screen
  • itest - return true/false on integer compare