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