What is the Raspberry Pi 4 Bootloader EEPROM?
The Raspberry Pi 4 introduces a significant architectural shift from its predecessors by utilizing an onboard EEPROM (Electrically Erasable Programmable Read-Only Memory) to store its bootloader configuration, rather than relying solely on code stored on the boot media. This article explains the role of this EEPROM chip in the boot process, how it enhances the flexibility of the Raspberry Pi 4, and the step-by-step methods required to keep it updated for optimal performance and compatibility.
Understanding the Bootloader EEPROM
On older Raspberry Pi models, the initial boot code was hardcoded
into the SoC (System on a Chip) and looked directly at the microSD card
for a file named bootcode.bin. The Raspberry Pi 4 replaces
this mechanism with an SPI EEPROM chip located on the motherboard
itself.
This change brings several distinct advantages to the platform:
- Permanent, Upgradable Storage: The bootloader code is permanently stored on the board but can be rewritten, allowing the Raspberry Pi Foundation to fix bugs and add features post-launch.
- Advanced Boot Capabilities: The EEPROM enables native support for advanced booting methods, such as booting from USB 3.0 drives, network booting via PXE, and NVMe boot configurations (when using expansion boards).
- Self-Healing Diagnostics: Newer versions of the EEPROM firmware include visual diagnostic screens that display troubleshooting data on a connected monitor if the operating system fails to load.
How the EEPROM Updating Process Works
By default, modern Raspberry Pi operating systems handle EEPROM maintenance automatically. The system runs a background service that checks for firmware updates during the regular system boot sequence. If a new, stable version of the bootloader is available, the system schedules it to be flashed on the subsequent reboot.
There are two primary update release channels available to users:
- Default/Stable: This channel provides thoroughly tested releases meant for general consumer use, ensuring maximum system stability.
- Latest/Beta: This channel introduces newer features, such as experimental boot modes and hardware compatibility tweaks, ahead of the general public release.
Step-by-Step: Updating the EEPROM Manually
While the system automates updates, users can manually check, configure, and force updates to the EEPROM using the terminal in Raspberry Pi OS.
Step 1: Check Current Firmware Status
To verify the date of the firmware currently running on your system and see if an update is available, open the terminal and execute the following command:
sudo rpi-eeprom-updateThe output will display the “CURRENT” firmware date, the “LATEST” available firmware date, and a notice indicating whether an update is required.
Step 2: Apply an Available Update
If the utility indicates that an update is available and you wish to apply it manually, run the update command with the install flag:
sudo rpi-eeprom-update -aThis command flags the system to write the new firmware image to the EEPROM during the next startup sequence.
Step 3: Restart the System
To complete the flashing process, restart your Raspberry Pi:
sudo rebootChanging the Firmware Release Channel
If you require features found only in the latest beta releases, you can change the release channel by editing the configuration file for the update utility.
- Open the configuration file in a text editor:
sudo nano /etc/default/rpi-eeprom-update- Locate the line that defines the release channel, which typically
looks like
FIRMWARE_RELEASE_STATUS="default". - Change
"default"to"latest"to access newer features. - Save the file by pressing
Ctrl+O, then exit usingCtrl+X.
After changing the channel, running
sudo rpi-eeprom-update will check against the newly
selected repository of firmware images.