So, this is actually a U-boot problem, suggest you find a ready-made U-boot version, and search its source code, then transplant its fatload() fuction in your custom U-boot source code.
Besides, MLO is not the "first" file in side FAT system. It can be anywhere in the flash. I think those file operations under FAT FS have implemented in Overo bootstrap. Only in this way, booting from SD independently is possible. So MLO must not be the first jump location, there can be a NOR flash on Overo board, where is the first jump location.
>Date: Fri, 19 Aug 2011 07:26:45 -0700 (PDT)
>From: Kendall York <gumstix@...>
>Subject: Re: [Gumstix-users] Syntax
>To: Kendall York <gumstix@...>, "General mailing list for
> gumstix users." <gumstix-users@...>
>Content-Type: text/plain; charset="us-ascii"
>Ok so as an update to this I believe that my issue may be that I can't address my SD card. I am booting from it so it is connected but I noticed that in my version of u-boot that the mmcinit command is no longer available. I have been looking through the u-boot docs all morning and haven't found anything saying that. I have tried using "mmc info" and have found that it is aware of the card so I assume, yes I know that makes an ass out of me, that the mmc initilized at startup now so they dropped the command. I still am not clear on how this effects the syntax of "fatload"
>From: Kendall York <gumstix@...>
>To: "gumstix-users@..." <gumstix-users@...>
>Sent: Friday, August 19, 2011 9:17 AM
>Subject: [Gumstix-users] Syntax
>Hey guys. I am still stuck on trying to load the MLO file from my bootable SD card to NAND. I have the instruction page but am not having much luck with the syntax. I was hoping some out there would understand it. The command I am stuck on is fatload. Here is the syntax
>fatload <interface> <dev[:part]> <addr> <filename> [bytes]
>The example uses the command like this
>Overo # fatload mmc 0 $loadaddr MLO
>Based on what I know the way this is working is fatload pulls a file into memory from a FAT file system and holds it to be placed in NAND later. (mmc 0) refers to the location of the file. In this case it is on an SD card and is the first file on the card. Question there is does fatload always take the first file? Next is the <addr> argument. To me it looks like this is the temp file that will hold MLO until you write to NAND. So is this arbitrary? Last is the name of the file, MLO. Why does it need this if it knows where the file is held on the drive? Hope I am not to far off.
There was a 16 bit and a 32 bit version of fdisk which ran under
MS-DOS/Windows... but it doesn't give you enough control of the partition
sizes or disk setup to be useful in this case. The boot process reads a
specific memory address on the SD card which must be where the MLO is; fdisk
for windows won't allow you to create an SD card to the required
specifications to guarantee that the MLO is at the expected memory address
on the card. Even if it you could wrangle it into doing what you wanted
though, you'll not be creating and formatting an ext3 file system with it
any time soon ;)
From: xiooozzz [mailto:xiooozzz@...]
Sent: 19 August 2011 18:15
Subject: Re: [Gumstix-users] Create a Bootable MicroSD Card on Windows
Back to the origin task, as far as i know, FDISK is a old Windows16 program
originally. So it is easy to find a fdisk.exe or other disk editor program
easily to complete the task under Win.