I'm using an Overo Fire and a FAT32 formated 8G SDHC card for data collection.  I boot with a newly formatted card, collect and store the data on that card then do a clean shutdown.  On the next boot, x-loader (loaded from NAND) hangs looking for u-boot.bin on the SDHC card.  If I get past the x-loader, u-boot hangs while scaning the SDHC card for boot.scr and uImage.
 
I'm using x-loader as generated by the x-load_git.bb recipe (git://gitorious.org/x-loader/x-loader.git SRCREV 24b8b7f41a83540433024854736518876257672c), and u-boot the u-boot-omap3_git.bb (git://git.denx.de/u-boot.git SRCREV 1e4e5ef0469050f014aee1204dae8a9ab6053e49).  I built both x-loader and u-boot using bitbake and then again by retrieving the source and building outside of bitbake.  Both sets show the same failure.
 
I think the x-loader and u-boot FAT32 root directory scans are not handling the "End Of Chain" marker (0x0FFFFFF8-0x0FFFFFFF) correctly.  Below are two patches that fix the problem, but I'd like get another set
of eyes on this in case I've missed/messed up something.
 
Patrick
 
x-loader patch:
 
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 44ecb4a..921ea40 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -828,6 +828,10 @@ do_fat_read(const char *filename, void *buffer, unsigned long maxsize,
           cursect = (curclus * mydata->clust_size) + mydata->data_begin;
 
           FAT_DPRINT ("root clus %d sector %d\n", curclus, cursect);
+           if (curclus >= 0x0ffffff0) {
+               FAT_DPRINT ("EOC found");
+               return -1;
+           }
        }
     }
   rootdir_done:
 
 
u-boot patch:
 
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 003666e..49ad5ae 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -987,6 +987,11 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize,
 
                        nxt_clust = get_fatent(mydata, root_cluster);
 
+                        if (nxt_clust >= 0x0ffffff0) {
+                           debug("EOC found");
+                            return -1;
+                        }
+
                        nxtsect = mydata->data_begin +
                                (nxt_clust * mydata->clust_size);