3

For example, vcgencmd version might report:

Feb 14 2015 22:20:17
Copyright (c) 2012 Broadcom
version 7789db485409720b0e523a3d6b86b12ed56fd152 (clean) (release)

How do I determine which commit in the firmware repository matches this firmware version?

  • They don't seem to correspond to commit hashes from either the Hexxah o the raspberrypi repos. strace vcgencmd version implies it is getting this value from /dev/vhciq, i.e., kernelspace. Since much of that stuff, including I think the vcgencmd itself, is not open source, there may be no way to know where that version string comes from or to correspond it to the public repos, which contain only the compiled binaries. – goldilocks Apr 27 '15 at 13:03
  • The version comes from the commit ID of the private source code repository used to build the firmware. But that doesn't help answer the question at all. – Alistair Buxton Apr 28 '15 at 6:26
  • I suppose it does come from the private repo. As I said in reference to your other question though, you seem to working under the assumption that this number from vcgencmd is the "firmware version", as opposed to the version of the command application itself. These are two distinct things that may be developed in relation to each other, but are still independent entities. – goldilocks Apr 28 '15 at 13:23
  • 1
    The string output by "vcgencmd version" can also be found by running "strings start.elf | grep VC_BUILD_ID_VERSION" so yes it is a firmware version. – Alistair Buxton Apr 29 '15 at 13:00
  • Well, that's a sort of answer then, although it means having to correspond that with the commit tags used in the public repo. Those repos contains various artifacts, not just the pre-compiled start.elf, and a revision/commit of the repo may not always include a new version of start.elf. So if you want some kind of table that maps the versions of all the pre-compiled, closed source artifacts (that presumably have separate private repos) to "revisions" of the public repo, methinks you are going to have to email someone about it. – goldilocks Apr 29 '15 at 13:08
1

For Raspbian and derivatives

The firmware is installed by the raspberrypi-bootloader package. It has the revision in the changelog:

zcat /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz | head

raspberrypi-firmware (1.20150214-1) unstable; urgency=low

  • firmware as of 8aca5762

-- Sun, 15 Feb 2015 11:19:20 +0000

For rpi-update

If you used rpi-update to get firmware, it creates a /boot/.firmware_revision containing the commit hash.

cat /boot/.firmware_revision

5b0cbedacf45e111f02d925fa5b1cec9041fb279

For everything else

If you have a mystery firmware not managed by any particular tool, the date given by vcgencmd version is a good indicator of the firmware version. The first commit with a date more recent than that of the running firmware is most likely the same one. You can then use strings to verify the build version of the firmware from that commit without installing it:

strings start.elf | grep VC_BUILD_ID_VERSION

VC_BUILD_ID_VERSION: 2d5ad04b63af4233440c3f7c8587108223201102 (clean)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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