U-boot on the ARM7 system

Overview

Das u-boot or u-boot for short is a universal boot loader project which provides firmware with full source code under GPL. It has support a wide range of cpu architectures including ARM(ARM7, ARM9, StrongARM, Xscale) as the Arm enabled Actel ProAsic3 supports the ARM7 processor it was possible to port this boot loader to prototype PCB.    

Setup U-boot

Before we can make a u-boot image and start using u-boot we first need to

  1. Download the u-boot-1.1.3 source package

  2. Download and install the ARM-ELF tool chain (so we can compile the code)

  3. Download the actelm7 patch

  4. Unpack the source code and adding the actelm7 patch

1. Download U-boot-1.1.3

Below is the link to where you can find U-boot 1.1.3 source code

http://sourceforge.net/project/showfiles.php?group_id=65938&package_id=63695

(Please note this is not the latest version of U-boot however it is the version that has been ported)

2. Download the ARM-ELF tool chain

Below is the link to where you can find the ARM-elf tool chain

http://opensrc.sec.samsung.com/download/arm-elf-tools-20040427.sh

2.1  Install the ARM-ELF tool chain

To install the toolchain into a linux host machine, be the root user and execute arm-elf-tools-20040427.sh like this:

[root@localhost ]# /bin/sh ~/incoming/arm-elf-tools-20040427.sh

3.Download the actelm7 patch (right click and choose save target as to download)

u-boot-actelv12.patch

4.Unpack the source code and adding the actelm7 patch

To unpack the U-boot-1.1.3 source package, and then add the actelm7 patch, proceed as follows:

[root@localhost src]# bunzip2 < u-boot-1.1.3.tar.bz2 | tar xf

[root@localhost src]# patch -p0 < u-boot-actelv12.patch

Note

The user and the patch must be in the top level directory for the patch to apply properly ie the user and patch should not be in the u-boot directory.

If everything went well the user should normally see the following output from the patch utility:

patching file board/actelm7/actelm7.c

patching file board/actelm7/config.mk

patching file board/actelm7/flash.c

patching file board/actelm7/intel.h

patching file board/actelm7/lowlevel_init.S

patching file board/actelm7/Makefile

patching file board/actelm7/u-boot.lds

patching file cpu/arm7tdmi/config.mk

patching file cpu/arm7tdmi/cpu.c

patching file cpu/arm7tdmi/interrupts.c

patching file cpu/arm7tdmi/Makefile

patching file cpu/arm7tdmi/serial.c

patching file cpu/arm7tdmi/start.S

patching file drivers/rtl8019.c

patching file drivers/rtl8019.h

patching file examples/Makefile

patching file include/asm-arm/arch-arm7tdmi/hardware.h

patching file include/configs/actelm7.h

patching file Makefile

Make the Image

To make the U-boot image, enter the u-boot-1.1.3 directory and proceed as follows:

[root@localhost u-boot-1.1.3]#make distclean

[root@localhost u-boot-1.1.3]#make actelm7_config

[root@localhost u-boot-1.1.3]#make

If everything goes ok, u-boot.bin and some other images will be made in the u-boot-1.1.3 directory.

Downloading u-boot to the M7A3P1000 prototype board

To run u-boot from ROM I needed to download the binary file u-boot.bin to the prototypes boards flash, to do this I followed this Actel application note.

CoreMP7FMP

However as my board had a different flash memory map (32 flash banks not 64) from the one in the application note I needed to change the default TCL script to the one below 

SectorErase32

Therefore the sequence for my board went like this

1) from MSDOS prompt type (within Arm/bin softconsole directory)

cliarm initarm.tcl

2) Now from cliarm user terminal type

config flash i16x32

size 4

flash set 0..0x001FFFFF

source sectorErase32.tcl

load bin 0 u-boot.bin

flash clear all

size 0