[U-Boot] fatwrite problem

Ruud Commandeur RCommandeur at clb.nl
Fri Apr 12 14:46:13 CEST 2013


Hi Everyone,

Sinced a few days I noticed some problems writing the uimage to a FAT
partition on my SD-card. At first I was afraid of some (physical)
SD-card problems, but it appears to be related to he size of the uImage.
With some further testing (and adding some debug printing), I could
easily reproduce the problem:

//4K file, result OK
fatwrite mmc 0:1 42000000 testfile 1000
writing testfile
set_cluster; clustnum: 5, startsect: 176, size 2048
set_cluster; clustnum: 6, startsect: 180, size 2048
set_cluster; clustnum: -6, startsect: 132, size 2048
4096 bytes written

//512 bytes file, timeout error, file not written
fatwrite mmc 0:1 42000000 testfile 200
writing testfile
set_cluster; clustnum: 5, startsect: 176, size 0
MMC0: Bus busy timeout!
MMC0: Bus busy timeout!
MMC0: Bus busy timeout!
MMC0: Bus busy timeout!
MMC0: Bus busy timeout!
MMC0: Bus busy timeout!
set_cluster; clustnum: 5, startsect: 176, size 512
MMC0: Bus busy timeout!
MMC0: Bus busy timeout!
MMC0: Bus busy timeout!
set_cluster; clustnum: -6, startsect: 132, size 2048
MMC0: Bus busy timeout!
512 bytes written

It seems to be related to he problem reported here:

http://www.mail-archive.com/u-boot@lists.denx.de/msg107212.html

Once the size of the set_cluster call equals 0, the mmc command is
incomplete and times out. In the earlier reported problem, a patch is
mentioned, but not available for dowload here. Also in the latest
versions of the git repository I could not find a patch for this
problem. Can anyone tell me if there is a fix for this problem?

Regards,

Ruud


More information about the U-Boot mailing list