From mboxrd@z Thu Jan 1 00:00:00 1970 From: michael Date: Sun, 05 Oct 2008 18:52:24 +0200 Subject: [U-Boot] Fat32 and VFAT support In-Reply-To: <48E7DE97.2030903@boundarydevices.com> References: <48E7DE97.2030903@boundarydevices.com> Message-ID: <48E8F0C8.40904@gandalf.sssup.it> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi eric, Eric Nelson wrote: > Hello all, > > I've recently been looking into a problem loading files from a FAT32 filesystem > and (re)discovered that there are issues with this code. > > Some of the symptoms are related to problems discussed in a thread back in > April titled "USB SUPPORT & get_vfatname". > > http://lists.denx.de/pipermail/u-boot/2008-April/033117.html > > I ran into the issue(s) on an SD(MMC) card when I noticed a failure to load > a certain file from the card. > > I've been able to narrow down a set of problems in fs/fat.c. I'm not sure > when I'll have the time to generate a proper patch, but wanted to at least > write some notes on the nature of the problem to save others some grief. > > The first problem I encountered was that the main loop in fs/fat.c/do_fat_read > was built for fixed-size root directories. The Microsoft document > "FAT: General Overview of On-Disk Format" > says this on page 22: > "For FAT32, the root directory can be of variable size and is a > cluster chain, just like any other ..." > > When running the command: > > fatls mmc 0 > > I try to investigate but I don't have spare time to fix. I send to the list an linux-user space program that use the u-boot routine to read on the image. You can use that to track down the problem. Regards Michael