1.usb 可以使用此命令读取u盘里的内容,此命令加上相关参数可以有以下功能:

1.1usb start 在使用u盘之前必须启动此命令以初始化好fat文件系统环境,笔者的输出如下:

jello # usb start
(Re)start USB...
USB:   Starting the controller
scanning bus for devices... 5 USB Device(s) found
       scanning bus for storage devices... usb_stor_get_info->1431,blksz:512
Device NOT ready
   Request Sense returned 02 3A 00
2 Storage Device(s) found

1.2 usb dev 查看检测到的usb设备,笔者的输出如下:

jello # usb dev

USB device 0: Vendor: Lexar    Rev: 1100 Prod: USB Flash Drive
            Type: Removable Hard Disk
            Capacity: 3824.0 MB = 3.7 GB (7831552 x 512)

1.3 usb info可列出usb host的属性,笔者的输出如下:

jello # usb dev

USB device 0: Vendor: Lexar    Rev: 1100 Prod: USB Flash Drive
            Type: Removable Hard Disk
            Capacity: 3824.0 MB = 3.7 GB (7831552 x 512)
jello # usb info
1: Hub,  USB Revision 1.10
 -  OHCI Root Hub
 - Class: Hub
 - PacketSize: 8  Configurations: 1
 - Vendor: 0x0000  Product 0x0000 Version 0.0
   Configuration: 1
   - Interfaces: 1 Self Powered 0mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 2 Interval 255ms

2: Hub,  USB Revision 2.0
 -  USB2.0 Hub
 - Class: Hub
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x05e3  Product 0x0608 Version 133.54
   Configuration: 1
   - Interfaces: 1 Self Powered Remote Wakeup 100mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 1 Interval 255ms

3: Hub,  USB Revision 2.0
 -  USB2.0 Hub
 - Class: Hub
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x05e3  Product 0x0608 Version 133.54
   Configuration: 1
   - Interfaces: 1 Self Powered Remote Wakeup 100mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 1
     - Class Hub
     - Endpoint 1 In Interrupt MaxPacket 1 Interval 255ms

4: Mass Storage,  USB Revision 2.0
 - Lexar USB Flash Drive AA066NWLMLMLBQPX
 - Class: (from Interface) Mass Storage
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x05dc  Product 0xa813 Version 17.0
   Configuration: 1
   - Interfaces: 1 Bus Powered 200mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 2
     - Class Mass Storage, Transp. SCSI, Bulk only
     - Endpoint 1 In Bulk MaxPacket 64
     - Endpoint 2 Out Bulk MaxPacket 64

5: Mass Storage,  USB Revision 2.0
 - Generic Ultra Fast Media  000000225001
 - Class: (from Interface) Mass Storage
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x0424  Product 0x2240 Version 1.152
   Configuration: 1
   - Interfaces: 1 Bus Powered 96mA
     Interface: 0
     - Alternate Setting 0, Endpoints: 2
     - Class Mass Storage, Transp. SCSI, Bulk only
     - Endpoint 2 Out Bulk MaxPacket 64
     - Endpoint 2 In Bulk MaxPacket 64

1.4 usb storage 可列出u盘设备信息:

jello # usb storage
  Device 0: Vendor: Lexar    Rev: 1100 Prod: USB Flash Drive
            Type: Removable Hard Disk
            Capacity: 3824.0 MB = 3.7 GB (7831552 x 512)
  Device 1: Vendor: Generic  Rev: 1.98 Prod: Ultra HS-COMBO
            Type: Removable Hard Disk
            Capacity: not available

1.5 usb tree 列出设备树:

jello # usb tree

Device Tree:
  1  Hub (12 Mb/s, 0mA)
  |   OHCI Root Hub
  |
  +-2  Hub (12 Mb/s, 100mA)
    |   USB2.0 Hub
    |
    +-3  Hub (12 Mb/s, 100mA)
    | |   USB2.0 Hub
    | |
    | +-4  Mass Storage (12 Mb/s, 200mA)
    |      Lexar USB Flash Drive AA066NWLMLMLFEPX
    |    
    +-5  Mass Storage (12 Mb/s, 96mA)
         Generic Ultra Fast Media  000000135404

1.6 usb part 列出u盘的分区表

jello # usb part

Partition Map for USB device 0  --   Partition Type: DOS

Partition     Start Sector     Num Sectors     Type
    1              2048       7829504    83

## Unknown partition table

2. fatls 列出fat文件系统中的内容,i其用法如下:

usage: fatls <interface> <dev[:part]> [directory]  interface是指定哪种类型的设备,此处笔者用的usb设备,因此填入usb,dev就是设备号,笔者从以上命令得知为0

jello # fatls usb 0
   187495   check.png
            system volume information/
  4051616   uimage
            hello/
            .trash-1000/

  2 file(s), 3 dir(s)
3. fatload 从u盘加载文件到指定内存地址处,用法如下:

usage: fatload <interface> <dev[:part]> <addr> <filename> [bytes]  interface和dev不再叙述,addr 指定要加载文件到内存的某个地址,filename指定要加载的文件名

jello # fatload usb 0 0x42000000 uimage
reading uimage
..............................................................................

...............................................................................

................................................................................

...................................................................................

...........................................................................

4221634 bytes read

4.sf 支持spi/qspi flash的操作,必须先擦除再写

4.1 sf probe 在操作spi flash之前必须进行此操作:

jello # sf probe 0
32768 KiB spi_flash at 0:0 is now current device
4.2 sf erase 擦除操作:

jello # sf erase 0x100000 0x400000  (0x100000是要擦除的起始地址,0x400000为指定要擦除的大小)
Erasing at 0x500000 -- 100% complete.

4.3 sf write 写操作:

jello # sf write 0x42000000 0x100000 0x400000
Writing at 0x500000 -- 100% complete.

uboot下的命令使用示例的更多相关文章

  1. uboot下的命令行

    1.典型嵌入式linux系统启动过程: 嵌入式系统上电后先执行uboot.然后uboot负责初始化DDR,初始化Flash,然后将OS从Flash中读取到DDR中,然后启动OS(OS启动后uboot就 ...

  2. 解析android framework下利用app_process来调用java写的命令及示例

    解析android framework下利用app_process来调用java写的命令及示例 在android SDK的framework/base/cmds目录下了,有不少目录,这些目的最终都是b ...

  3. [命令]在uboot下查看文件系统的目录结构

    在uboot下敲help可以查看该版本的uboot支持哪些命令 ls mmc 1:1 ls mmc 1:2 可以查看mmc设备上对应的文件目录,支持多种文件系统格式,如fat32/ext

  4. uboot中的命令体系

    一.uboot的命令体系介绍以及实例分析: U-Boot 的命令实现大多在 common 目录下.在该目录下命令的代码文件都是以“ cmd_”开头的,如下图所示: 其中每一个文件都是一个命令实现的代码 ...

  5. Linux下rz命令使用的实例详解

    Linux中rz命令和sz命令都可用于文件传输,而rz命令主要用于文件的上传,下面将通过几个实例来给大家详细介绍下Linux下rz命令的用法,一起来学习下吧. rz命令可以批量上传文件,当然也可上传单 ...

  6. Linux下rar命令详解

    Linux下rar命令详解 用法: rar <命令> -<选项1> ….-<选项N> < 操作文档> <文件…> <@文件列表…> ...

  7. Linux 下 Shell 命令的分类及用法

    当你打算真正操纵好你的 Linux 系统,没有什么能比命令行界面更让你做到这一点.为了成为一个 Linux 高手,你必须能够理解 Shell命令的不同类型,并且会在终端下正确的使用它们. 在 Linu ...

  8. uboot启动 及命令分析(3)

    u-boot命令 先贴一个重要结构,位于uboot/include/command.h,这个结构代表每个uboot命令 struct cmd_tbl_s { char     *name;   /* ...

  9. Linux和Uboot下eMMC boot分区读写

    关键词:eMMC boot.PARTITION_CONFIG.force_ro等. 1. eMMC的分区 大部分eMMC都有类似如下的分区,其中BOOT.RPMB和UDA一般是默认存在的,gpp分区需 ...

随机推荐

  1. http://www.cnblogs.com/linxiyue/p/8244724.html

    http://www.cnblogs.com/linxiyue/p/8244724.html

  2. 【mlflow】执行import mlflow 报错:ImportError: No module named 'pkg_resources'

    命令行运行 python -c “import mlflow” 的时候报错: ImportError: No module named 'pkg_resources' 结果发现是因为本地有一个文件夹叫 ...

  3. Celery 分布式任务队列入门

    一.Celery介绍和基本使用 Celery 是一个 基于python开发的分布式异步消息任务队列,通过它可以轻松的实现任务的异步处理, 如果你的业务场景中需要用到异步任务,就可以考虑使用celery ...

  4. 【python+opencv】轮廓发现

    python+opencv---轮廓发现 轮廓发现---是基于图像边缘提取的基础寻找对象轮廓的方法, 所有边缘提取的阈值选定会影响最终轮廓发现的结果. 介绍两种API使用: -cv.findConto ...

  5. 使用GIT SUBTREE集成项目到子目录(转)

    原文:http://aoxuis.me/post/2013-08-06-git-subtree 使用场景 例如,在项目Game中有一个子目录AI.Game和AI分别是一个独立的git项目,可以分开维护 ...

  6. tornado : 异步、非阻塞

    The terms asynchronous and non-blocking are closely related and are often used interchangeably, but ...

  7. ABP项目创建

    第一种:1.在MyAbp.Migrator下面的appsettings.json里面的sql连接语句 MyAbp.Web.Host 下面的appsettings.json 里面的连接语句2.把MyAb ...

  8. Git:pull --rebase 和 merge --no-ff

    首先是吐嘈 如果你正在 code review,看到上图(下文将称之为:提交线图)之后,特别是像我这样有某种洁癖的人,是否感觉特别难受?如果是的话,请看下文吧 :) 为什么 Git 作为分布式版本控制 ...

  9. Andrew Ng-ML-第十三章-支持向量机

    1.从代价函数谈起SVM 图一 根据将y=0||y=1,得到逻辑回归的代价函数,那么SVM和其代价函数是相似的,只不过是引入了cost0与cost1,并且自变量使用了theta_T*x(i),并且由于 ...

  10. soapUI-Properties

    1.1.1  Properties 1.1.1.1 概述 - Properties Option Description   Toolbar 属性TestStep工具栏   Properties Li ...