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

最全的u-boot命令详解

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

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


命令:
loadb   - load binary file over serial line (kermit mode)
loadx   - load binary file over serial line (xmodem mode)
loady   - load binary file over serial line (ymodem mode)


功能:以不同的协议从串口获取文件.。
格式基本都为:
load? [ off ] [ baud ]
第1个参数是下载到SDRAM的地址,如果不填,就是用默认配置:CONFIG_SYS_LOAD_ADDR
第2个参数是波特率,一般不填,用默认的115200.


    在windows下的超级终端可以用这些协议发送文件,但是在ubuntu下基本只能用kermit协议。一下使用C-kermit来发送一个文件到mini2440。

[u-boot@MINI2440]# loadb
## Ready for binary (kermit) download to 0x30008000 at 115200 bps...


    上面已经启动了U-boot的kermit传输协议,这时按下 Ctrl + \ , 再按 c, 切换到C-kermit的命令行模式,输入命令:send  <文件路径>,回车。

[u-boot@MINI2440]# loadb
## Ready for binary (kermit) download to 0x30008000 at 115200 bps...

(Back at MAGI-Linux)
----------------------------------------------------
C-Kermit 8.0.211, 10 Apr 2004, for Linux
Copyright (C) 1985, 2004,
  Trustees of Columbia University in the City of New York.
Type ? or HELP for help.
(/home/tekkaman/桌面/) C-Kermit>send/home/tekkaman/development/share/zImage.img

C-kermit就开始传送,并且显示一个传送界面,并动态显示传送进度。
C-Kermit 8.0.211, 10 Apr 2004, MAGI-Linux

   Current Directory: /home/tekkaman/&#65533;&#65533;~L&#65533;~]&#65533;
Communication Device: /dev/ttyUSB0
Communication Speed: 115200
              Parity: none
         RTT/Timeout: 01 / 02
             SENDING: /home/tekkaman/development/share/zImage.img => zImage.img
           File Type: BINARY
           File Size: 2277540
        Percent Done: 19 
/////////-

                          ...10...20...30...40...50...60...70...80...90..100
Estimated Time Left: 00:03:35
  Transfer Rate, CPS: 8536
        Window Slots: 1 of 1
         Packet Type: D
        Packet Count: 557
       Packet Length: 1000
         Error Count: 0
          Last Error:
        Last Message:

X to cancel file, Z to cancel group, <CR> to resend last packet,
E to send Error packet, ^C to quit immediately, ^L to refresh screen.

传送完毕后,输入c ,回到U-boot的串口界面。
[u-boot@MINI2440]# loadb
## Ready for binary (kermit) download to 0x30008000 at 115200 bps...

(Back at MAGI-Linux)
----------------------------------------------------
C-Kermit 8.0.211, 10 Apr 2004, for Linux
Copyright (C) 1985, 2004,
  Trustees of Columbia University in the City of New York.
Type ? or HELP for help.
(/home/tekkaman/桌面/) C-Kermit>send/home/tekkaman/development/share/zImage.img
(/home/tekkaman/桌面/) C-Kermit>c
Connecting to /dev/ttyUSB0, speed 115200
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
## Total Size = 0x0022c0a4 = 2277540 Bytes
## Start Addr = 0x30008000


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, 2025-5-1 19:07

返回顶部