日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

U-BOOT中mmc命令简介

發(fā)布時間:2024/1/8 编程问答 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 U-BOOT中mmc命令简介 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

目前很多板卡都是用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?:查詢系統(tǒng)中可用的mmc設(shè)備;

U-Boot> mmc list
FSL_SDHC: 0 (eMMC)? ? ? ? ? ? ? ? ? ? ? ?//系統(tǒng)中可用的mmc設(shè)備只有一個,編號為0;


2.mmc dev:設(shè)置當(dāng)前用來操作的mmc設(shè)備;

U-Boot> mmc dev 0? ? ? ? ? ? ? ? ? ? ? ? ? ?//設(shè)置當(dāng)前設(shè)備為mmc 0
switch to partitions #0, OK
mmc0(part 0) is current device


3.mmc info: 顯示當(dāng)前mmc設(shè)備的信息;

U-Boot> mmc info
Device: FSL_SDHC
Manufacturer ID: d6
OEM: 103
Name: 88A39?
Tran Speed: 52000000
Rd Block Len: 512? ? ? ? ? ? ? ? ? ? ? //重點關(guān)注下塊大小和容量
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設(shè)備塊編號為0x600處開始,擦除長度為0x4000 x 512大小(Block Len 指定)的數(shù)據(jù);


5.mmc write 0x10100000 0x600 0x4000
把內(nèi)存0x10100000開始,長度為0x4000 x 512大小的數(shù)據(jù),寫入到當(dāng)前mmc設(shè)備塊編號為0x600處;


6.mmc read 0x10100000 0x600 0x4000

從當(dāng)前mmc設(shè)備塊偏移為0x600處開始,長度為0x4000 x 512大小的數(shù)據(jù),讀入到內(nèi)存0x10100000處;

總結(jié)

以上是生活随笔為你收集整理的U-BOOT中mmc命令简介的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。