Update firmware for Raspberry Pi 3 support

Bug #1578745 reported by Ryan Finnie on 2016-05-05
This bug affects 13 people
Affects Status Importance Assigned to Milestone
linux-firmware-raspi2 (Ubuntu)

Bug Description

Please see the debdiff for updating to 1.20160503+6832d9a (https://github.com/raspberrypi/firmware/tree/6832d9a431a98b640accb2b76eac38a420d7c680). This enables boot support for the Raspberry Pi 3 (https://wiki.ubuntu.com/ARM/RaspberryPi/RaspberryPi3).

In addition, I've modified the package to install Broadcom 43430 firmware, needed for the RPi3's wifi/bluetooth module. Apparently this firmware was given directly from Broadcom to the Raspberry Pi folks, as the only canonical location I've found for it is http://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-nonfree_0.43+rpi4.dsc . There's a copy on Github at https://github.com/RPi-Distro/firmware-nonfree/tree/54bab3d6a6d43239c71d26464e6e10e5067ffea7/brcm80211/brcm though:

a591a0865e5af6803aab4dc2dda83141b4e0de3bf36e9ee0f986518af4da4ffc brcmfmac43430-sdio.bin
872fde4f9942d9aba805880d6eaddfe050305626fd58ad955bfe77c04f6b75a5 brcmfmac43430-sdio.txt

tags: added: patch
Changed in linux-firmware-raspi2 (Ubuntu):
importance: Undecided → Medium
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-firmware-raspi2 (Ubuntu):
status: New → Confirmed
Ryan Finnie (fo0bar) on 2016-05-10
tags: added: raspi3
Paolo Pisati (p-pisati) wrote :

Have you tested the updated bootloader with the raspi2 image?

IIRC we need to explicitly set where the dtb resides in memory with the latest fw release:


or something like that.

Otherwise, looks good to me.

Ryan Finnie (fo0bar) wrote :

Damn, you're right. I knew that was needed in certain situations with the new firmware (and have it being written in my MP for raspi3 support in livecd-rootfs), but for some reason thought xenial u-boot + new firmware + raspi2 didn't need it.

I'll write a configure hook for detecting the upgrade and modifying config.txt, and get back to you.

FYI, this seems to be the traditional location for the DTB (and where it was placed originally):


0x100 begin is the same, but end is now 0x8000 (before the kernel area) as the xenial kernel DTB is approaching the size of (0x4000-0x100).

Ryan Finnie (fo0bar) wrote :

Debdiff updated with postinst config test for config.txt ^device_tree_address=. If not found, it adds:

# Added by linux-firmware-raspi2

Tested with vanilla raspi2 install + upgrade to 1.20160503+6832d9a-0ubuntu1, and subsequent reinstalls.

Paolo Pisati (p-pisati) wrote :

Looks good.

Ryan Finnie (fo0bar) wrote :

This firmware also works with 64-bit kernel / userland; enable arm64 arch (debdiff updated).

Changed in linux-firmware-raspi2 (Ubuntu):
status: Confirmed → Triaged
Martin Pitt (pitti) wrote :

debdiffs don't work for binary file updates. These need to be attached as a tarball, or be put into a PPA or something. Also, this probably shouldn't be touched by general sponsors, but should be done by the kernel team. Unsubscribing sponsors for these two reasons.

Ryan Finnie (fo0bar) wrote :

The debdiff was meant to be a general overview of what had changed w/r/t the binaries, not a literal debdiff, sorry.

ppa:ubuntu-raspi2/ppa-rpi3 linux-firmware-raspi2 1.20160503+6832d9a-0ubuntu1~rpi3 is the same as what's being proposed (minus the ~rpi3 suffix). Paolo, could you possible take this?

Michael Dreher (nospam2000) wrote :

there is a Debian package "firmware-brcm80211": "Binary firmware for Broadcom 802.11 wireless cards"
which contains firmware files for many Broadcom wirelesss cards (e.g. brcmfmac43340-sdio.bin).

It is supposed to contain all firmware files for "wireless network cards supported by the brcmsmac or brcmfmac driver"

Why don't you put the brcmfmac43430-sdio.bin into this archive?.
This would be one step in the direction to make the Raspberry Pi independent of special distributions.

Michael Dreher (nospam2000) wrote :

I've just seen, that brcmfmac43430-sdio.bin is already part of firmware-brcm80211 in version 0.43+rpi5, but not in the version 20160110-1 maintained by the Debian Kernel Team

Andreas Hösl (blafasl) wrote :
Download full text (5.0 KiB)

The lastest version (1.20161020-0ubuntu1~0.2~rpi3) of firmware-linux-raspi2 from ppa:ubuntu-raspi2/ppa-rpi3 is breaking the WiFi on Raspi3. The file /lib/firmware/brcm/brcmfmac43430-sdio.txt is missing after the upgrade.

The Image from https://wiki.ubuntu.com/ARM/RaspberryPi contains the following:

root@ubuntu:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1
    link/sit brd
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:23:31:03 brd ff:ff:ff:ff:ff:ff
4: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether b8:27:eb:76:64:56 brd ff:ff:ff:ff:ff:ff

root@ubuntu:/lib/firmware/brcm# ls
bcm4329-fullmac-4.bin brcmfmac4329-sdio.bin brcmfmac4350c2-pcie.bin
bcm43xx-0.fw brcmfmac4330-sdio.bin brcmfmac4350-pcie.bin
bcm43xx_hdr-0.fw brcmfmac43340-sdio.bin brcmfmac4354-sdio.bin
brcmfmac43143.bin brcmfmac4334-sdio.bin brcmfmac43569.bin
brcmfmac43143-sdio.bin brcmfmac4335-sdio.bin brcmfmac4356-pcie.bin
brcmfmac43236b.bin brcmfmac43362-sdio.bin brcmfmac43570-pcie.bin
brcmfmac43241b0-sdio.bin brcmfmac4339-sdio.bin brcmfmac43602-pcie.ap.bin
brcmfmac43241b4-sdio.bin brcmfmac43430-sdio.bin brcmfmac43602-pcie.bin
brcmfmac43241b5-sdio.bin brcmfmac43430-sdio.txt brcmfmac4366b-pcie.bin
brcmfmac43242a.bin brcmfmac43455-sdio.bin brcmfmac4371-pcie.bin

root@ubuntu:/lib/firmware/brcm# dpkg -S brcmfmac43430-sdio.txt
linux-firmware-raspi2: /lib/firmware/brcm/brcmfmac43430-sdio.txt

root@ubuntu:/lib/firmware/brcm# dpkg -L linux-firmware-raspi2

root@ubuntu:/lib/firmware/brcm# dpkg -s linux-firmware-raspi2
Package: linux-firmware-raspi2
Status: install ok installed
Priority: optional
Section: multiverse/misc
Installed-Size: 12321
Maintainer: Ubuntu Developers <email address hidden>
Architecture: armhf
Version: 1.20160503+6832d9a-0ubuntu1~rpi1
Description: RaspberryPi2 GPU firmware and bootloaders
 This package contains all the proprietary files necessary to boot a
 RaspberryPi2 board.
Homepage: https://github.com/raspberrypi/firmware


After doing apt-get update/upgrade I have:

root@ubuntu:/lib/firmware/brcm# ip link


Sebastian Unger (sebunger44) wrote :

I'm not sure whether this is the right place for this, but I just tried to do a fresh install of xenial on a raspberry pi (I'm not using a pre-made image but rather create a full install from scratch using debootstrap etc) and it failed because it couldn't install linux-firmware-raspi2 (1.20161020-0ubuntu1~0.2~rpi3) because the file /lib/firmware/brcm/brcmfmac43430-sdio.bin was already owned by linux-firmware 1.157.10.

This caused me to go back to my already installed and running RPI and sure enough, it was stuck on linux-firmware 1.157.8.

Is this the right place to comment or do I need to raise a new issue for this?

Sebastian Unger (sebunger44) wrote :

I went ahead and raised a separate issue (1691729) in any case, just to be sure.

Avio (aviopene) wrote :

Reposting the workaround in bug 1691729 (https://bugs.launchpad.net/ubuntu/+source/linux-firmware-raspi2/+bug/1691729) here because this is the first result googling for: "trying to overwrite '/lib/firmware/brcm/brcmfmac43430-sdio.bin', which is also in package linux-firmware-raspi2 1.20161020-0ubuntu1~0.2~rpi3".

sudo dpkg-divert --divert /lib/firmware/brcm/brcmfmac43430-sdio-2.bin --package linux-firmware-raspi2 --rename --add /lib/firmware/brcm/brcmfmac43430-sdio.bin

That command errors out:

Adding 'diversion of /lib/firmware/brcm/brcmfmac43430-sdio.bin to /lib/firmware/brcm/brcmfmac43430-sdio-2.bin by linux-firmware-raspi2'
dpkg-divert: error: rename involves overwriting '/lib/firmware/brcm/brcmfmac43430-sdio-2.bin' with
  different file '/lib/firmware/brcm/brcmfmac43430-sdio.bin', not allowed

# dpkg-divert --list
diversion of /usr/sbin/grub-set-default to /usr/sbin/grub-set-default.real by grub-legacy-ec2
diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash
diversion of /usr/share/vim/vim74/doc/tags to /usr/share/vim/vim74/doc/tags.vim-tiny by vim-runtime
diversion of /usr/share/vim/vim74/doc/help.txt to /usr/share/vim/vim74/doc/help.txt.vim-tiny by vim-runtime
diversion of /etc/init/ureadahead.conf to /etc/init/ureadahead.conf.disabled by cloud-init
diversion of /bin/sh to /bin/sh.distrib by dash
diversion of /usr/share/initramfs-tools/hooks/klibc to /usr/share/initramfs-tools/hooks/klibc^i-t by klibc-utils

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers