User manual
Linux Guide taskit GmbH
4. Using the bootloader „U-Boot“
U-Boot is an open-source boot loader for embedded systems. U-Boot is well-documented,
customizable, and loaded with functions. The U-Boot boot loader has been ported to more
than 100 platforms. Wolfgang Denk (www.denx.de) maintains this project at
www.sourceforge.de. The README in the U-Boot source code contains very detailed
documentation of U-Boot.
Before you can start customizing the bootloader you will have to know the flash addresses
of the installed software and flash partition sizes belonging to your product. These
informations can be found in the appendix (Memory map).
4.1. Setting up a TFTP server under Linux
To transfer customized firmware a protocol for transferring data without the use of the
operating system is needed.
The TFTP (Trivial File Transfer Protocol) implemented in the bootloader U-Boot is used for
simple transfer of a Linux kernel image or a root file system image.
A corresponding TFTP server must be set up on the development system for this purpose.
Use apt-get to install the required tftpd demon under Debian: apt-get install tftpd .
Usually tftpd is not started directly, but rather via the inetd Internet demon. An entry for
TFTP must be on hand in the inetd configuration file after installation. Under Debian, the
line tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot is
automatically entered in the configuration file /etc/inetd.conf during packet installation.
The server is given the base directory with /tftpboot. If no argument is given at start-up,
the server uses /tftpboot as the base directory. This directory must exist, and must be
readable by all users.
mkdir /tftpboot
chmod 777 /tftpboot
4.2. Description of the bootprocess
After resetting or turning on the power supply, an internal boot loader is started on the
AT91RM9200. It searches the peripherals for a bootable program, in the following order:
1. Dataflash on NPCS0
2. EEPROM on TWI
3. 8-bit memory on NSC0
A bootable program can be identified by the eight exception vectors at the beginning of the
program. If no valid sector sequence is found, the internal uploader is started. The
uploader initializes the serial debug port and loads a program via DBGU for USART0 or
using DFU (Device Firmware Upgrade) for USB into internal SRAM. It then starts the
newly-loaded program.
If a valid vector sequence is found, the code is likewise loaded into the internal SRAM.
(Information about the code length is stored in the sixth vector.) Then the remap command
is carried out, and jumps to the first address of the internal SRAM.
Page 9 of 65 Version 1.26 (2008-04-30)