how to update raspberry pi firmware

How to Safely Upgrade Your Raspberry Pi Firmware (and when)

If you click our links and make a purchase, we may earn an affiliate commission. Learn more

The Raspberry Pi team regularly releases firmware updates. These updates include the latest features, security upgrades, and other improvements. In this guide, I will show you how to update your Raspberry Pi firmware to the latest version.

The Raspberry Pi firmware is usually updated automatically by running the packages update (with APT), but it’s also possible to use ‘rpi-update’ to manually upgrade or downgrade to a specific version.

In this tutorial, I will discuss both methods of updating the Raspberry Pi Firmware. I will also provide a step-by-step guide of each technique, along with screenshots. This tutorial will also cover various tools that can be useful in managing the firmware.

If you’re new to Raspberry Pi or Linux, I’ve got something that can help you right away!
Download my free Linux commands cheat sheet – it’s a quick reference guide with all the essential commands you’ll need to get things done on your Raspberry Pi. Click here to get it for free!

Introducing the Raspberry Pi Firmware

Before running any command, I just want to make sure you understand what the firmware really is, why and when you may need to do these updates, and other important considerations.

Difference Between Firmware and Operating System

To keep your computer running smoothly, two programs work together:

  • The operating system: displays apps and programs. It gives you an interface to interact with the machine. (Beginner’s Guide: How To Install a New OS on Raspberry Pi)
  • The firmware: defines how the operating system interacts with different hardware.
    It’s basically the bridge between the hardware and higher-level software like the OS.

The firmware defines how hardware elements work and communicate with each other.
This makes it possible for devices like the Raspberry Pi to function correctly.

Regular firmware updates fix existing problems. They also make your computer perform better and add new features.

The Raspberry Pi Firmware

The Raspberry Pi firmware is composed of the following components:

  • Bootloader: The bootloader is the first program that initializes the Raspberry Pi. The bootloader’s primary task is to find and execute the kernel. Some versions of Raspberry Pi have the bootloader stored on EEPROM. In other versions, the bootloader is stored on the SD card.
  • Kernel: The kernel manages hardware resources for the operating system. The Raspberry Pi kernel is optimized for the Raspberry Pi hardware.
  • GPU / VideoCore Firmware: VideoCore Firmware enables the GPU to load and run ARM-specific code for the CPU.
  • Other Files: The firmware also includes additional files, like the device tree overlay. These files handle system configuration during the boot process.

Why are Firmware Updates Important?

Here are a few benefits of updating the Raspberry Pi firmware:

  • Security Fixes: Firmware updates often patch security holes. They keep your Raspberry Pi secure.
  • Bug Fixes: Updates fix bugs or issues in old firmware. This improves stability and performance.
  • Compatibility: New firmware updates can ensure smooth operation with the latest devices.
  • Feature Enhancements: Firmware updates can add new features to the Raspberry Pi and improve its functionality.
  • Optimization: Updates may include optimizations that improve overall system performance and efficiency.
  • Hardware Support: Firmware updates may add support for new hardware. They may also fix problems with existing hardware.

In short, updating the firmware keeps your Raspberry Pi reliable. It also keeps it secure and supports the latest software and hardware.

Lost in the terminal? Grab My Pi Cheat-Sheet!
Download the free PDF, keep it open, and stop wasting time on Google.
Download now

Important Considerations Before Any Update

Before updating your firmware, here are a few things you should consider:

  • Do you need to update?: Most of the time, you do not need to update manually. Routine system updates automatically update your firmware to the latest stable release.
  • Backup: Before you update the firmware, back up any critical data or settings on your Raspberry Pi. Firmware updates are generally safe. However, there’s always a slight risk of something going wrong.
  • Check Release Notes: Check the Release Notes. They explain the changes in the new firmware.

How to Check Your Current Kernel and Bootloader Version

To check your kernel version, open a terminal on your Raspberry Pi and enter the following command:
uname -a

For example, in my case, we can see the kernel version is 6.12.34+rpt-rpi-2712:

If you have a Raspberry Pi 4, 400, or 5, you can check your bootloader version with the following command:
sudo rpi-eeprom-update

In addition to showing the current version of your bootloader, it will also show you the latest one available and indicate if you are up-to-date. For example, in my case, it showed me that my bootloader version is up-to-date.

Caution: Before proceeding, ensure you have backed up your system and have a stable power supply and network connected to your Raspberry Pi.

Are you a bit lost in the Linux command line? Check this article first for the most important commands to remember and a free downloadable cheat sheet so you can have the commands at your fingertips.

How to Update the Raspberry Pi Firmware

As mentioned in the introduction, there are two ways to update the Raspberry Pi firmware: automatically (via APT) or manually (via “rpi-update”). Let’s see how to do both.

Automatic Method: via APT

The conventional/ automatic method for updating Raspberry Pi firmware is to use APT (Advance Packaging Tool).

Lost in the terminal? Grab My Pi Cheat-Sheet!
Download the free PDF, keep it open, and stop wasting time on Google.
Download now

Open a terminal and update your package list:
sudo apt update

Wait for it to update your package list. See the screenshot below:

Once your package list is updated successfully, run the following command in the terminal to upgrade all your installed packages to their latest versions:
sudo apt full-upgrade

It may take some time, depending on your network speed and the number of packages that you have installed.

Now reboot your Raspberry Pi and check that the kernel has been updated using:
uname -a

This set of commands will update all your packages. Run these commands often to update your system with all the security packages. You will also update your firmware to the latest stable version by running these two commands.

For an average user, this should be enough, and there is usually no need to update the firmware manually.

Manual Method: Using rpi-update

Maybe there’s a reason you don’t want to use the default stable kernel and need a different kernel. In that case, you can use these manual methods to get other versions.

Update to the Latest Version Available

Lost in the terminal? Grab My Pi Cheat-Sheet!
Download the free PDF, keep it open, and stop wasting time on Google.
Download now

If you need to update the firmware of your Raspberry Pi to the latest pre-release version, you can use the rpi-update command.

To run the script, open a terminal and enter the following command:
sudo rpi-update

Running this command will download the latest pre-release version of the Linux kernel, matching modules, device tree files, and the VideoCore firmware (GPU firmware) and install these files in the relevant locations on your SD Card.

Once completed, reboot your Raspberry Pi and check your updated kernel and bootloader version using uname-a and rpi-eeprom-update commands.

Updating to a Specific Firmware Version

If instead of updating to the latest pre-release version of Linux Kernel, you wish to update to a specific version, use the following command syntax:
sudo rpi-update <HASH_CODE>

The requisite <HASH_CODE> can be found on the GitHub project. Search for the kernel version to which you wish to update/downgrade:

Click on the commit corresponding to the required kernel version and open its webpage. The required hash code can be found from the address bar, as shown in the following screenshot:

For example, to update to kernel version 6.1.74, you must run the following command:
sudo rpi-update d86b5843d68b9972a5430a6d3da1b271cfc83521

Once completed, reboot your Raspberry Pi.
You can then verify the current kernel version using:
uname -a

Lost in the terminal? Grab My Pi Cheat-Sheet!
Download the free PDF, keep it open, and stop wasting time on Google.
Download now

Which should give you the exact version you decided to install.


🛠 This tutorial doesn't work anymore? Report the issue here, so that I can update it!

If you enjoy learning about Raspberry Pi, you’ll feel right at home in the RaspberryTips Community. It’s a friendly group of makers helping each other grow. Join us today for $1 and see what it’s like inside.

Related Questions

How to revert a firmware update?

If, after a manual update using rpi-update, things are not working as you intended but your Raspberry Pi is still bootable, you can return to the latest stable release of the Raspberry Pi kernel via the following commands:
sudo apt update
sudo apt install --reinstall raspi-firmware

What if my Raspberry Pi is no longer booting after a firmware upgrade?

If, after an update, your Raspberry Pi is bricked/stuck at the rainbow screen of death, the easiest way to recover your Raspberry Pi is to flash your card with the backup you made before updating.

Another option is to update the bootloader manually using Raspberry Pi Imager (see next question).

How to update the Raspberry Pi bootloader Only?

Usually, when you update your firmware using apt or rpi-update script, the bootloader is also automatically updated.

However, if you wish to update the bootloader only, you can use one of the following methods:

With Raspberry Pi Imager

You can update your Raspberry Pi bootloader using a spare SD card.

  • Insert your spare SD Card into a PC and launch Raspberry Pi Imager.
  • Click on Choose OS > Misc utility images:
  • Select the board you are working with:
  • Select the SD Card Boot option (or any other based on your setup):
  • Select the SD Card and then Write.

Boot the Raspberry Pi with the SD Card and wait at least 10 seconds.

You have successfully updated the Bootloader when the green LED blinks with a steady pattern, and the HDMI display shows a green screen. You can now power off the Raspberry Pi and remove the SD Card.

Using raspi-config

If your Raspberry Pi is bootable, you can use raspi-config to update your bootloader:
sudo raspi-config

  • Go to Advanced Options.
  • Select Bootloader Version.
  • Select Default for factory default settings and Latest for the latest stable bootloader version.
  • Reboot your Raspberry Pi.

Whenever you’re ready, here are other ways I can help you:

Test Your Raspberry Pi Level (Free): Not sure why everything takes so long on your Raspberry Pi? Take this free 3-minute assessment and see what’s causing the problems.

The RaspberryTips Community: Need help or want to discuss your Raspberry Pi projects with others who actually get it? Join the RaspberryTips Community and get access to private forums, exclusive lessons, and direct help (try it for just $1).

Master your Raspberry Pi in 30 days: If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.

Master Python on Raspberry Pi: Create, understand, and improve any Python script for your Raspberry Pi. Learn the essentials step-by-step without losing time understanding useless concepts.

You can also find all my recommendations for tools and hardware on this page.

Similar Posts