Monthly Archives: August 2015

When X-loader hangs …

I recently decided to play with an old OMAP3 EVM development board from Mistral. My aim was to run a Rowboat Android distribution and use it as my home automation server.

I decided to first use an SDCard for experimentations before using the embedded flash. The board first boots an internal ROM which expects to find the first primary DOS partition with a FAT32 file system in it. When found, it seeks for a file named MLO, loads it and jumps into.

The MLO file is traditionally X-loader, a primary bootloader from TI (which seems to be derived from u-boot). When started it looks for an u-boot.bin file in the same partition as the ROM, then loads and launch it. Then you can interact with the loader and parametrize/load your kernel.

So I first gathered binary versions of X-loader and u-boot from an online repository here: https://code.google.com/p/rowboat/downloads/list

Then I prepared the sdcard using TI wiki: http://processors.wiki.ti.com/index.php/SD/MMC_format_for_OMAP3_boot

I configured the board SW4 switch to boot on MMC, see: http://processors.wiki.ti.com/index.php/GSG:_OMAP35x_DVEVM_Hardware_Setup#Main_Board_SW4

And from the serial console I got:

Texas Instruments X-Loader 1.41
Could not read bootloader!
X-Loader hangs

The solution is pretty simple but it took me some time! X-loader does the assumption that the partition where it expects to find u-boot is the first one, thus located 512 bytes from the beginning of the sdcard. It was true years ago when sdcard blocks were 512 bytes long like classic hard drives. But now it’s often 2048 or 4096 bytes and the first partition made by fdisk commands found in TI wiki are not at the desired offset. The solution is to configure fdisk to use 512 bytes block size, and everything works. Here is a example of a correct fdisk command line:

fdisk -b 512 -c=dos -u=cylinders -H 255 -S 63 /dev/sdX

I hope this will help!