This article illustrates how to compile u-boot for the FOX Board G20 and how to patch it to boot the kernel from microSD.
Many thanks to Stefano Barbato (http://www.codesink.org) for this patch.
Download the Linux version of Sourcery G++ Lite 2008q3-66 for ARM EABI toolchain from this link:
Set the arm-2008q3-66-arm-none-eabi.bin executable and execute to install Sourcery G++ toochain:
$ chmod +x arm-2008q3-66-arm-none-eabi.bin $ ./arm-2008q3-66-arm-none-eabi.bin
The installation will start:
Select the typical version and confirm the default value during the installation.
Download the u-boot version 2009.08 from this link:
Untar the u-boot-2009.08.tar.bz2:
$ tar xjvf u-boot-2009.08.tar.bz2
Go into the new u-boot-2009.08 directory and copy foxg20-20091222.patch inside it then type:
$ patch -p1 < foxg20-20091222.patch
Set this two environment variables:
$ export ARCH=arm $ export CROSS_COMPILE=/<your home directory>/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-
Then run the cross compilation:
$ make at91sam9g20ek_dataflash_cs1_config $ make
After a while you will obtain this file:
Ready to insert on the FOX Board G20 dataflash.