U-Boot支持很多命令,通过命令我们可以实现很多操作。这里介绍U-Boot命令的实现。
一、U-Boot命令的操作
1.进入命令
U-Boot 自带命令行接口,在 U-Boot 启动期间,按任意键(如空格键)可进入 U-Boot Shell 命令行,在Shell 界面可输入 U-Boot 支持的命令,使用 U-Boot 提供的各种功能:
U-Boot 2009.08-dirty ( 5 月 18 2015 - 10:22:36)
Freescale i.MX28 family
CPU: 454 MHz
BUS: 151 MHz
EMI: 205 MHz
GPMI: 24 MHz
DRAM: 128 MB
NAND: proton id: c2 f1 80 1d c2 f1
.......
MX28 U-Boot >
2.查看命令列表
在 MX28 U-Boot >提示符下,输入?或者 help 可以查看 U-Boot 所支持的全部命令以及介绍。一个具体的 U-Boot 支持的命令的多寡,由编译时候的配置决定。事实上,由于硬件
差异,一个 U-Boot 不可能同时使用 U-Boot 所支持的全部命令。各命令的功能如下:
MX28 U-Boot > ?
? - alias for 'help'
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
chpart - change active partition
cmp - memory compare
cp - memory copy
crc32 - checksum calculation
dhcp - boot image via network using DHCP/TFTP protocol
echo - echo args to console
go - start application at address 'addr'
help - print command description/usage
i2c - I2C sub-system
loadb - load binary file over serial line (kermit mode)
loads - load S-Record file over serial line
loady - load binary file over serial line (ymodem mode)
loop - infinite loop on address range
md - memory display
mm - memory modify (auto-incrementing address)
mtdparts - define flash/nand partitions
mtest - simple RAM read/write test
mw - memory write (fill)
nand - NAND sub-system
nboot - boot from NAND device
nm - memory modify (constant address)
ping - send ICMP ECHO_REQUEST to network host
printenv - print environment variables
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
saves - save S-Record file over serial line
setenv - set environment variables
tftpboot - boot image via network using TFTP protocol
ubi - ubi commands
ubifsload - load file from an UBIFS filesystem
ubifsls - list files in a directory
ubifsm