U-Boot and MMC/SDIO

U-Boot supports MMC Cards with multiple paritions, with the FAT file system. For general information on MMC Cards - see the MMC Cards page.

To initialize the mmc/sdio subsystem, use the mmcinit call:

bfin> mmcinit
CID information:
Manufacturer ID:       03
OEM/Application ID:    5344
Product name:          SD256
Product Revision:      8.0
Product Serial Number: 544862406
Manufacturing Date:    07/08
SD Card detected (RCA 32769)
CSD information:
CSD structure version:   1.0
Card command classes:    5f5
Max trans speed: 25MHz
Read block length:       512
Write block length:      512
Card capacity:          252968960 bytes

To get the FAT info about the card, use the fatinfo command

bfin> help fatinfo
fatinfo <interface> <dev[:part]>
    - print information about filesystem from 'dev' on 'interface'
bfin> fatinfo mmc
Interface:  MMC
  Device 0: Vendor: Man 035344 Snr 2079f0c6 Rev: 8 0 Prod: SD256
            Type: Hard Disk
            Capacity: 241.2 MB = 0.2 GB (494080 x 512)
Partition 1: Filesystem: FAT16 "           "

To list the files on the card, use the fatls command:

bfin> help fatls
fatls <interface> <dev[:part]> [directory]
    - list files from 'dev' on 'interface' in a 'directory'
bfin> fatls mmc 0:1
  6349262   uimage

1 file(s), 0 dir(s)

To load a file from the MMC/SDIO card, use the fatload command

bfin> help fatload
fatload <interface> <dev[:part]>  <addr> <filename> [bytes]
    - load binary file 'filename' from 'dev' on 'interface'
      to address 'addr' from dos filesystem
bfin> fatload mmc 0:1 0x1000000 /uimage
reading /uimage

6349262 bytes read

And then you can boot the image as normal.

bfin> bootm
## Booting kernel from Legacy Image at 01000000 ...
   Image Name:   Linux-2.6.28.10-ADI-2009R1
   Created:      2009-06-10   6:06:18 UTC
   Image Type:   Blackfin Linux Kernel Image (gzip compressed)
   Data Size:    6349198 Bytes =  6.1 MB
   Load Address: 00001000
   Entry Point:  0027d49c
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
Starting Kernel at = 0027d49c

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值