目前很多板卡都是用emmc来存储文件,所以熟悉u-boot中的mmc操作命令还是很有必要的。

在u-boot下键入mmc,会显示mmc命令的操作格式:


mmc info - display info of the current MMC device
mmc read addr blk# cnt
mmc write addr blk# cnt
mmc erase blk# cnt
mmc rescan
mmc part - lists available partition on current mmc device
mmc dev [dev] [part] - show or set current mmc device [partition]
mmc list - lists available devices
mmc hwpartition [args...] - does hardware partitioning
  arguments (sizes in 512-byte blocks):
    [user [enh start cnt] [wrrel {on|off}]] - sets user data area attributes
    [gp1|gp2|gp3|gp4 cnt [enh] [wrrel {on|off}]] - general purpose partition
    [check|set|complete] - mode, complete set partitioning completed
  WARNING: Partitioning is a write-once setting once it is set to complete.
  Power cycling is required to initialize partitions after set to complete.
mmc bootbus dev boot_bus_width reset_boot_bus_width boot_mode
 - Set the BOOT_BUS_WIDTH field of the specified device
mmc bootpart-resize <dev> <boot part size MB> <RPMB part size MB>
 - Change sizes of boot and RPMB partitions of specified device
mmc partconf dev boot_ack boot_partition partition_access
 - Change the bits of the PARTITION_CONFIG field of the specified device
mmc rst-function dev value
 - Change the RST_n_FUNCTION field of the specified device
   WARNING: This is a write-once field and 0 / 1 / 2 are the only valid values.
mmc setdsr <value> - set DSR register value


1.mmc list :查询系统中可用的mmc设备;

U-Boot> mmc list
FSL_SDHC: 0 (eMMC)                       //系统中可用的mmc设备只有一个,编号为0;


2.mmc dev:设置当前用来操作的mmc设备;

U-Boot> mmc dev 0                           //设置当前设备为mmc 0
switch to partitions #0, OK
mmc0(part 0) is current device


3.mmc info: 显示当前mmc设备的信息;

U-Boot> mmc info
Device: FSL_SDHC
Manufacturer ID: d6
OEM: 103
Name: 88A39 
Tran Speed: 52000000
Rd Block Len: 512                      //重点关注下块大小和容量
MMC version 4.0
High Capacity: Yes
Capacity: 7.3 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB


4.mmc erase 0x600 0x4000

从mmc设备块编号为0x600处开始,擦除长度为0x4000 x 512大小(Block Len 指定)的数据;


5.mmc write 0x10100000 0x600 0x4000
把内存0x10100000开始,长度为0x4000 x 512大小的数据,写入到当前mmc设备块编号为0x600处;


6.mmc read 0x10100000 0x600 0x4000

从当前mmc设备块偏移为0x600处开始,长度为0x4000 x 512大小的数据,读入到内存0x10100000处;

U-BOOT中mmc命令简介相关推荐

  1. linux 命令 是mmc 大小,u-boot中mmc命令使用

    [u-boot: v2013.01] [Author: Bo Shen ] mmc命令的帮助信息如下: U-Boot> mmc mmc - MMC sub system Usage: mmc r ...

  2. Spring Boot中的Properties

    文章目录 简介 使用注解注册一个Properties文件 使用属性文件 Spring Boot中的属性文件 @ConfigurationProperties yaml文件 Properties环境变量 ...

  3. Spring Boot中的测试

    文章目录 简介 添加maven依赖 Repository测试 Service测试 测试Controller @SpringBootTest的集成测试 Spring Boot中的测试 简介 本篇文章我们 ...

  4. Linux中hexdump命令

    Linux中hexdump命令 简介 hexdump主要用来查看"二进制"文件的十六进制编码.*注意:它能够查看任何文件,不限于与二进制文件.* 语法 hexdump [选项] [ ...

  5. uboot中的mmc命令

    一:mmc的命令例如以下: 1:对mmc读操作 mmc read addr blk# cnt 2:对mmc写操作 mmc write addr blk# cnt 3:对mmc擦除操作 mmc eras ...

  6. uboot环境下mmc操作_android uboot中的mmc命令

    一:mmc的命令如下: 1:对mmc读操作 mmc read addr blk# cnt 2:对mmc写操作 mmc write addr blk# cnt 3:对mmc擦除操作 mmc erase ...

  7. mmc命令 uboot_uboot中的mmc命令(轉)

    一:mmc的命令如下: 1:對mmc讀操作 mmc read addr blk# cnt 2:對mmc寫操作 mmc write addr blk# cnt 3:對mmc擦除操作 mmc erase ...

  8. linux chkconfig 目录,Linux中chkconfig命令的简介及使用方法

    Linux中chkconfig命令的简介及使用方法 发布时间:2020-08-17 16:39:04 来源:亿速云 阅读:94 作者:小新 小编给大家分享一下Linux中chkconfig命令的简介及 ...

  9. 编程实现linux中的who命令功能,Linux who命令简介及使用方法详解

    玩蛇网推荐图文教程:python 列表 本文是关于Linux who命令简介及使用方法详解一文.如果你是一名系统管理员,可能需要需要在一个特定的时间点都有谁活跃在系统上.以便必须严密监视我们的服务器. ...

最新文章

  1. Auto-Publishing and Monitoring APIs With Spring Boot--转
  2. windows7 'telnet'不是内部或外部命令--转载
  3. 同洲EOC局端MAC地址修改方法
  4. JAVA类 与类文件
  5. 什么材料反射热量好_封阳台用什么材料好,封阳台用什么玻璃好
  6. __proto__和prototype 1
  7. android崩解日志,android – 使用rxJava2和改造的UndeliverableException
  8. jQuery版本升级踩坑大全
  9. 全国银行开户行名称查询数据库,包括行号、电话、地址、
  10. CentOS7.6重装系统步骤
  11. 单播、广播、组播的区别和特点
  12. Kettle的Web版分享
  13. 新闻丨5G牌照发布,智链万源携手动物健康与食品安全创新联盟在农业领域先声夺人...
  14. 互联网大佬做公益,图什么?
  15. 养胃有道——送给胃不好的人 (转)
  16. 服务器网站崩溃怎么解决
  17. 真免费的电脑屏幕录制软件推荐:低调奢华有内涵的超级录屏软件了解下
  18. Spark大数据分析与实战:基于Spark MLlib 实现音乐推荐
  19. excel 基础语法 数组
  20. Teamviewer显示“未就绪,请检查您的连接”解决办法

热门文章

  1. 编程老手的哪些特点,是值得新手程序员学习的?
  2. 环境模块迁移-freeze
  3. 698. 划分为k个相等的子集:给定一个整数数组 nums 和一个正整数 k,找出是否有可能把这个数组分成 k 个非空子集,其总和都相等。
  4. 当你们玩挂机游戏累了(_杰森大师_JAVA)
  5. vscode使用技巧(2)
  6. Json和其序列化和反序列化
  7. 图文电视related
  8. 八卦는 生命의 運動 (韓長庚 易學原理總論)
  9. java graphics2d renderinghints_java - Graphics2D错误 - 堆栈内存溢出
  10. 玩客云添加到我的计算机,电脑连接玩客云访问玩客云硬盘空间传输文件方法