28

Is there a way to find the current firmware version number? Either the running version or the version currently installed in /boot?

uname -a shows only the kernel version, not the GPU "binary blob."

Related: How do I update software and firmware?

finnw
  • 5,680
  • 3
  • 31
  • 42

3 Answers3

26

You can check the GPU's firmware version by entering the following on the command line:

sudo /opt/vc/bin/vcgencmd version
Alex Chamberlain
  • 15,120
  • 13
  • 63
  • 112
Steve Robillard
  • 34,158
  • 17
  • 102
  • 108
  • 4
    The real question is why have they put it in such an obscure location? – Alex Chamberlain Aug 07 '12 at 08:12
  • 6
    @AlexChamberlain, It is because of the architurcture of the linux operating system. The /opt folder contains the optional packages, That is why the vcgencmd package must be installed there – Suhaib May 17 '13 at 01:31
  • But the firmware version doesn't seem to track with the [release notes](https://downloads.raspberrypi.org/raspbian/release_notes.txt). [Why is that?](https://raspberrypi.stackexchange.com/questions/100625/how-to-verify-id-of-installed-firmware) – Seamus Jun 09 '20 at 04:46
  • @seamus no idea you may need to ask the foundation, how does it not track? – Steve Robillard Jun 09 '20 at 09:36
  • According to [this question](https://raspberrypi.stackexchange.com/questions/100625/how-to-verify-id-of-installed-firmware) - also confirmed it myself just prior to the comment. – Seamus Jun 09 '20 at 10:13
7

Steve's answer is correct, but here are some more details that may be of interest.

The firmware version seems to be identified by two pieces of information:

  • A release/commit date
  • A 160-bit hash value (AFAIK, the algorithm used to compute the hash is unpublished)

There are two sources for this information:

  • from the command line: sudo /opt/vc/bin/vcgencmd version
  • from the RPi website: the release notes

However, as at least one eagle-eyed contributor here has noted, the 160-bit hash values from the vcgencmd version command and the release notes do not match. The reason these hash values do not match for any given release date is that the hash values are computed on different file sets REFERENCE:

The Organization (and possibly their suppliers/subcontractors) maintain two repositories for the Raspberry Pi firmware. One of the repositories houses the source code for the RPi firmware, the other repository houses the compiled/binary version of the firmware. The firmware source code repo is unpublished (i.e. it is 'closed-source'); the compiled/binary firmware is housed in this GitHub repo.

And finally to the point of this answer:

  • If you want to know what version of the firmware is on your RPi, use sudo /opt/vc/bin/vcgencmd version; i.e. Steve's answer.

  • If you want to know the latest version of the firmware, check the release notes

NOTE new link for Raspberry Pi OS release notes

  • However, know that the the 160-bit hash values in these two sources will never match. The only valid comparison between these sources is the dates.
Milliways
  • 54,718
  • 26
  • 92
  • 182
Seamus
  • 18,728
  • 2
  • 27
  • 57
1

A simple script to print HOSTNAME, date, Firmware date

MilliwaysPi4    2020-12-12  Nov 30 2020 22:12:08
#! /bin/sh
if [ -e /opt/vc/bin/vcgencmd ]; then
    VERS=$(/opt/vc/bin/vcgencmd version  | grep ":")
fi
echo -e `hostname`'\t'`date -I`'\t'$VERS
Milliways
  • 54,718
  • 26
  • 92
  • 182