无线论坛 门户 我要刷机 查看内容

最全的u-boot命令详解

2016-6-28 13:59| 查看: 10977| 评论: 6|来自: Anywlan

uboot一个小型的linux核心,其命令非常丰富,本文收集了常用的命令和操作供大家参考。

U-boot发展到现在,他的命令行模式已经非常接近Linux下的shell了,命令行模式模式下支持“Tab”键的命令补全和命令的历史记录功能。而且如果你输入的命令的前几个字符和别的命令不重复,那么你就只需要打这几个字符即可,比如我想看这个U-boot的版本号,命令就是“ version”,但是在所有的命令中没有其他任何一个的命令是由“v”开头的,所以只需要输入“v”即可。


[u-boot@MINI2440]# version

U-Boot 2009.11 ( 4月 04 2010 - 12:09:25)
[u-boot@MINI2440]# v

U-Boot 2009.11 ( 4月 04 2010 - 12:09:25)
[u-boot@MINI2440]# base
Base Address: 0x00000000
[u-boot@MINI2440]# ba
Base Address: 0x00000000

    由于U-boot支持的命令实在太多,一个一个细讲不现实,也没有必要。所以下面我挑一些烧写和引导常用命令介绍一下,其他的命令大家就举一反三,或者“help”吧!


一、获取帮助

命令:help 或 ?
功能:查看当前U-boot版本中支持的所有命令。

[u-boot@MINI2440]# help
? - alias for 'help'
askenv - get environment variables from stdin
base - print or set address offset
bdinfo - print Board Info structure
bmp - manipulate BMP image data
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootelf - Boot from an ELF image in memory
bootm - boot application image from memory
bootp - boot image via network using BOOTP/TFTP protocol
bootvx - Boot vxWorks from an ELF image
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
crc32 - checksum calculation
date - get/set/reset date & time
dcache - enable or disable data cache
dhcp - boot image via network using DHCP/TFTP protocol
echo - echo args to console
editenv - edit environment variable
eeprom - EEPROM sub-system
erase - erase FLASH memory
exit - exit script
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls - list files in a directory (default /)
flinfo - print FLASH memory information
fsinfo - print information about filesystems
fsload - load binary file from a filesystem image
go - start application at address 'addr'
help - print online help
i2c - I2C sub-system
icache - enable or disable instruction cache
iminfo - print header information for application image
imls - list all images found in flash
imxtract- extract a part of a multi-image
itest - return true/false on integer compare
loadb - load binary file over serial line (kermit mode)
loads - load S-Record file over serial line
loadx - load binary file over serial line (xmodem mode)
loady - load binary file over serial line (ymodem mode)
loop - infinite loop on address range
ls - list files in a directory (default /)
md - memory display
mm - memory modify (auto-incrementing address)
mmc - MMC sub-system
mtest - simple RAM read/write test
mw - memory write (fill)
nand - NAND sub-system
nboot - boot from NAND device
nfs - boot image via network using NFS protocol
nm - memory modify (constant address)
ping - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
reginfo - print register information
reset - Perform RESET of the CPU
run - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv - set environment variables
showvar - print local hushshell variables
sleep - delay execution for some time
source - run script from memory
test - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
unzip - unzip a memory region
usb - USB sub-system
usbboot - boot from USB device
version - print monitor version

如果你想获取某条命令的更详细的帮助,可以使用:
help <你想要查的指令>
或者 ? <你想要查的指令> ,
甚至 h <你想要查的指令缩写>

以bmp指令为例:

[u-boot@MINI2440]# help bmp
bmp - manipulate BMP image data

Usage:
bmp info <imageAddr> - display image info
bmp display <imageAddr> [x y] - display image at x,y
[u-boot@MINI2440]# ? bmp
bmp - manipulate BMP image data

Usage:
bmp info <imageAddr> - display image info
bmp display <imageAddr> [x y] - display image at x,y
[u-boot@MINI2440]# h bm
bmp - manipulate BMP image data

Usage:
bmp info <imageAddr> - display image info
bmp display <imageAddr> [x y] - display image at x,y



19

高人
2

专业

握手

霸气

雷人

吐血

山寨

奋斗

刚表态过的朋友 (21 人)

发表评论

最新评论

引用 gd28084646 2016-10-26 19:04
看不懂
引用 deepinwl 2016-8-8 01:37
搞成一个PDF文件更好学与用吧
引用 deepinwl 2016-8-8 01:35
与CISCO的IOS一样的啦
引用 below63 2016-6-29 13:07
但是uboot已经不再更新了/微笑
引用 wyzabc110 2016-6-28 22:13
学习下...............
引用 modi5156 2016-6-28 21:53
菜鸟来学习下!灰常感谢大神科普

查看全部评论(6)

文章栏目
论坛新贴
今日热议
本周排行
最新文章

站点统计 | Archiver | 手机版 | 无线门户 ( 粤ICP备11076993号|粤公网安备44010602008359号 ) |网站地图

GMT+8, 2024-4-26 16:35

返回顶部