how to update raspberry pi firmware

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

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!

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

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:

Something not working as expected?
You can get answers from real experts in minutes.
Get help with your setup
  • 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.

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.18.50+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

Recommended next step
Master Raspberry Pi in 30 Days

If you want a clearer path than jumping from tutorial to tutorial, my book gives you a step-by-step roadmap to really understand your Raspberry Pi.

Check the book here

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 a few months behind the latest one.

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

Tip: Command lines can be a pain to memorize. I put the essential Linux commands on a printable cheat sheet so you don't have to keep googling them. You can grab the PDF here if you want to save some time.

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).

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.

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.

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

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 Firmware Available

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 the 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.18.58, you must run the following command:
sudo rpi-update 4b27efc5346462f9829efaf36045d12d4a663a4f

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

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!

Still stuck after following this guide? Drop your question in the RaspberryTips Community — real Pi users answer fast. Post your question here.

Related Questions

How can I 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 do I 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.

  • Launch Raspberry Pi Imager, and make the following selections.
  • Device – scroll to the bottom and select No filtering to see all options.
  • OS – scroll down to select Misc utility images.
  • Select the bootloader for your model:
  • Select the SD Card Boot option (or any other based on your setup):
  • Storage – insert a spare SD Card into your PC and select it from the list.
  • Writing – click WRITE to proceed.

After it’s done, plug it into your Raspberry Pi.
Boot the Raspberry Pi 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 the Raspberry Pi Software Configuration Tool

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.

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.

Master Linux Commands: Overwhelmed with Linux commands? This book is your essential guide to mastering the terminal. It includes practical tips, real-world examples, and a bonus cheat sheet to keep by your side.

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

Similar Posts

Leave a Reply

Community members only
Comments are reserved for RaspberryTips Community members. Join the community to ask questions, get help, and interact with other Raspberry Pi users.

Join the community  or  log in