Working with mainline U-Boot
Freescale BSP provides an i.MX51 EVK U-boot port. However, i.MX51 EVK is also supported on I-boot main tree. This quick "how to" teaches how to use it.
0. Get u-boot code from the imx U-Boot Custodian tree:
$ git clone git://git.denx.de/u-boot-imx.git
1. Prepare the environment:
$ export PATH="$PATH:/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/"
$ export CROSS_COMPILE=arm-none-linux-gnueabi-
2. Configure for i.MX 51 EVK
$ cd u-boot-imx
$ make mx51evk_config
$ make u-boot.imx
iMX may SoCs use its internal ROM to execute some instructions at boot time, using "make u-boot.imx" an image containing the instructions
4. Copy the compiled file to a SD card on your host machine, insert the SD card and:
$ sudo dd if=u-boot.imx of=/dev/mmcblk0 bs=512 seek=2
"/dev/mmcblk0" should replaced according to your host, use "dmesg" after inserting the SD to find out where is the SD on your host. Unmount it before issuing the dd command. seek 2, skips the first 1K bytes (2x512) of the SD where the ROM expects the boot image for SD.
5. Insert the SD on the i.MX51 EVK, and set the switches for SD card boot and power on the board.