Sunday, April 28, 2013

Boot sequence on embbeded platform

When powered on, the CPU will fetch its first instruction from an address preassigned by the manufacturer. From there, two options :

  • the bootlader is programmed at this address (on a NOR memory)
  • the CPU has an integrated boot code that will start ( ROM memory)

The former is not very common anymore as it requires some NOR flash to be wired to the CPU while the latter boots in two steps (first and second stage). Here is a typical example with an AT91 CPU:


The mechanism is almost always identical with other CPUs. The first stage bootloader is usually provided by the CPU vendor (X-Loader instead of AT91Bootstrap for OMAP3 CPUs) and limited in size due to hardware constraints (SRAM size).

The Bootloader

It is a small piece of code responsible of :

  • low level hardware initialization (network, USB, ...)
  • loading the operating system kernel to memory (from disk, network or non-volatile storage)
  • booting the kernel 

Additionally, the bootloader may provide a shell and some services for testing, diagnosis or file transfer.

You can find information about the existing bootloaders at :
Comparison of bootloaders

A very good page describing the boot sequence in details for AT91:
AT91 Boot sequence

We will focus on the bootloader named u-boot as it is the most popular one for ARM platforms.

0 comments:

Post a Comment