103

I understand that the software on the Raspberry Pi is divided into three sections: the closed-source GPU firmware, the patched ARM Linux kernel and the user space software.

Is the GPU firmware on the chip or SD card? Is there an easy way to update everything (firmware, kernel, modules)?

3 Answers 3

102

EDIT: Since this post was written, the advice has changed. rpi-update should not be used unless specifically advised to by an RPi engineer / beta-testing. It is an unstable version of the firmware. It used to be necessary for updates but isn't anymore. See this answer on another question.

What is the GPU firmware and kernel?

The kernel is responsible for managing the resources of the Raspberry Pi and runs on the central processing unit (CPU). It allows tasks to run on the CPU. The GPU firmware, on the other hand, manages the graphical processing unit (GPU). The two separate units are on the same chip and share memory, which is segregated at boot time according to hard-coded start.elf files. In order to use the Raspberry Pi, both sets of files must be in the correct locations on the SD card.

You can buy preloaded SD cards from the retail partners of the Foundation.

Alternatively, the Foundation regularly release new SD cards images at http://www.raspberrypi.org/downloads. You must use Unix's dd or Windows' Win32DiskImager to load this on an existing SD card.

It's not possible to compile your own GPU firmware image, because it is closed source, so we rely on the Foundation and Broadcom to supply this. On the other hand, you can compile your own kernel image from source. Cross-compilation is the subject of other questions, such as How do I cross-compile the kernel on a Ubuntu host?

Updating the GPU firmware - Debian/Raspbian

You can update the firmware using rpi-update by Hexxeh. On Raspbian, you can install it by running

sudo apt-get install rpi-update

To update the software, run

sudo rpi-update

Updating userspace and kernel Software - Debian/Raspbian

The userspace software must be maintained. It's pretty easy; just run

sudo apt-get upgrade

If there are any errors, you can try updating the database first by running

sudo apt-get update

If you don't understand an error, then it's probably best you ask here or try googling.

Updating software - Arch Linux

The software must be maintained. The advantage of Arch Linux over Debian here is that Arch Linux manages the Raspberry Pi's firmware within the package management system. To update, just run

sudo pacman -Syu

If there are any errors and you don't understand it, then it's probably best you ask here or try googling.

References

  1. rpi-update Repository
5
  • A user has also created a tool called rpi-updater which will update the firmware, kernel and modules
    – Alex L
    Commented Jun 13, 2012 at 6:25
  • 2
    Doesn't Raspbian come with the rpi-update tool?
    – Jivings
    Commented Aug 7, 2012 at 22:46
  • Also, did you ever find out why debian can't manage the firmware using apt?
    – Jivings
    Commented Aug 8, 2012 at 7:04
  • 1
    @Jivings Laziness? Commented Aug 8, 2012 at 7:21
  • 1
    Kind of old, but at this point, Raspbian comes with the rpi-update tool installed, and it is in the default raspberry pi apt repositories. You can do a simple sudo apt-get install rpi-update instead of the manual installation now. Commented Feb 22, 2014 at 16:13
20

Have a look at Hexxeh's RPi-Updater. It's specifically built for upgrading the firmware and kernel.

https://github.com/Hexxeh/rpi-update

If you're running Arch Linux then the updates will be a part of your regular pacman -Syu as they exist in the official RPi repositories.

1
14

To update your system to latest versions of the userland software you need to run the update before the upgrade - the update actually downloads the new package listings so that upgrade can go get them and install them (as explained in Debian Linux documentation):

sudo apt-get update
sudo apt-get upgrade

Furthermore you may need to run a dist-upgrade to perform larger upgrades:

sudo apt-get dist-upgrade

Automatic updates

If you want to automate these procedures it can be done by configuring apt's Periodic options. The Raspberry Pi comes with apt installed (it provides the apt-get commands, etc.), and as part of that package an automated script is installed (in /etc/cron.daily/apt) for doing automated updates on a daily basis (using the cron daemon). These may be controlled by creating (as root) a file /etc/apt/apt.conf.d/10periodic putting the following into it:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";

This configuration will just run update every day for you so when you run sudo apt-get upgrade you'll install the latest packages (without having to first run apt-get update).

Automatic upgrades

To configure apt to automatically upgrade packages as well - firstly you'll need to install a new package to make the unattended upgrades work:

sudo apt-get install unattended-upgrades

Then you change the following option to "1" in /etc/apt/apt.conf.d/10periodic to enable automated upgrades:

APT::Periodic::Unattended-Upgrade "1";

For more details see the comments inside the /etc/cron.daily/apt and then put the relevant options into the /etc/apt/apt.conf.d/10periodic file.

3
  • 1
    This is the correct answer to update RPI in beginning of 2017, rpi-update is not needed any more Commented Feb 26, 2017 at 1:32
  • is the filename not '02periodic' (in /etc/apt/apt.conf.d) - at least that is what the 'apt' file says in cron.daily - "# Create /etc/apt/apt.conf.d/02periodic file to set your preference."
    – matthiku
    Commented Mar 8, 2017 at 19:07
  • The files are numbered in order of precedence so it may be 02 on your system (and/or newer systems).
    – Pierz
    Commented Mar 9, 2017 at 22:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.