U-Boot源码之命令

本文详细介绍了U-Boot的命令操作,包括如何进入命令行、查看命令列表以及命令子类。此外,还探讨了U-Boot命令的实现机制,如相关文件、配置选项、数据结构以及命令执行过程。最后,提到了如何在U-Boot中添加自定义命令的参考资料。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值