6

Reading this answer I get the impression both the Raspberry Pi BIOS and firmware are located on the SD card.

Is that correct? What is exactly located on the SD card? There's nothing stored on the Pi itself? Is that the reason for it not being able to boot without an SD card?

That Brazilian Guy
  • 442
  • 1
  • 7
  • 20
  • Related: see http://raspberrypi.stackexchange.com/a/8480/8926, then http://raspberrypi.stackexchange.com/a/8483/8926 and http://raspberrypi.stackexchange.com/a/7126/8926 and https://github.com/raspberrypi/firmware/blob/fb156967a2f07ac03cda68cc8629816eba109b67/README – That Brazilian Guy Aug 12 '13 at 09:24

1 Answers1

14

Short answer: firmware is programmed into the chips on the Raspberry Pi, and there really is no BIOS.

Expanded answer from here:

The firmware is closed-source proprietary code programmed into the SoC (System on a Chip) processor, which cannot be modified. Upon power-up the firmware will initiate a bootloader on the SD card. I do not believe that any other services are provided through the SoC firmware, so it is not really a "BIOS" (Basic Input/Output System) per se. After this point everything else comes from the SD card.

According to the software section of the wiki, the boot order is as follows:

  1. First stage bootloader - This is used to mount the FAT32 boot partition on the SD card so that the second stage bootloader can be accessed. It is programmed into the SoC itself during manufacture of the RPi and cannot be reprogrammed by a user.
  2. Second stage bootloader (bootcode.bin) - This is used to retrieve the GPU firmware from the SD card, program the firmware, then start the GPU.
  3. GPU firmware (start.elf) - Once loaded, this allows the GPU to start up the CPU. An additional file, fixup.dat, is used to configure the SDRAM partition between the GPU and the CPU. At this point, the CPU is release from reset and execution is transferred over.
  4. User code - This can be one of any number of binaries. By default, it is the Linux kernel (usually named kernel.img), but it can also be another bootloader (e.g. U-Boot), or a bare-bones application.
syb0rg
  • 8,108
  • 4
  • 35
  • 50
  • 3
    This answer is correct. The original IBM-PC "BIOS" had two main functions, (a) configure the hardware, (b) start the bootloader from the filesystem. After many years of using it, even today, many people say "BIOS" when they mean any sort of firmware which perform this sort of functionality: configure the hardware and start the bootloader. This "BIOS" does not exist in Raspberry Pi. It has been separated into different components, *some* of which live in the ROM inside the SoC chip itself. If the SD card is missing then step #2 (2nd stage bootloader) can not be found and the boot process halts. – Vassilis Papanikolaou Aug 30 '13 at 15:50
  • OK, the CPU is started at the end of step 3, so anything up to that point cannot be run by the CPU. The GPU is started at the end of step 2, so anything before that cannot be run by the GPU. But what does, then, run steps 1 and 2? – celtschk Jun 12 '16 at 06:37