tech stuff

Main - Archive - About - Feed

RPi boot

ok, first, several links:

As mentioned elsewhere, "ARM CPU is the not main CPU - it's only a co-processor to the VideoCore GPU. When the RaspberryPi starts, a GPU blob is read from the SD card to the L2 cache and executed. This code then brings up all the important peripherals (RAM, clocks etc) and starts the ARM CPU. Then the 2nd stage bootloader or some operating system itself can be run on ARM CPU."

According to this and other sources, RPi boot process looks like this:

  1. GPU Core
  2. first stage bootloader, which is stored in ROM on the SoC
  3. bootcode.bin (loader.bin merged) - the 2nd stage bootloader
  4. start.elf - the main GPU code
  5. config.txt - file is read by the GPU before the ARM core is initialised
  6. fixup.dat - is used to configure the SDRAM partition between the GPU and the CPU
  7. cmdline.txt - file for passing arguments to the Linux kernel
  8. kernel.img - The OS kernel to load on the ARM processor

For board to boot you need an SD-card with FAT32 partition, and files mentioned above placed in a root of this partition. Binaries are available here in boot folder. Actually there are more of them there:

  • fixup_cd.dat, start_cd.elf - cut-down versions of the above files, used when GPU memory is set to 16 MB, which in result disables some GPU features
  • fixup_x.dat, start_x.elf - testing versions of the above files, which enable potentially unstable/not-fully-tested/hacky functionality

config.txt and cmdline.txt are just a text files, you can edit them according to docummentation. kernel.img is usually a linux kernel - the first thing to run on ARM CPU, but it can be an additional chained boot loader like u-boot, and for our experiments we will use the later.