|Deletions are marked like this.||Additions are marked like this.|
|Line 65:||Line 65:|
|Some forum posts describe building a "shimmed" u-boot which tells the RPi3 to switch to 64-bit mode, but this is no longer required with latest firmware and u-boot.||Some forum posts describe building a "stubbed" u-boot which tells the RPi3 to switch to 64-bit mode, but this is no longer required with latest firmware and u-boot.|
Table of Contents
Raspberry Pi 3
The Raspberry Pi 3 was released in early March 2016, shortly before the release of Ubuntu 16.04 (Xenial) LTS, but too short to have proper support. It is possible to run Xenial's kernel and a full Ubuntu installation, but it requires replacing the firmware, bootloader and some other hacks.
While the BCM2710 is a 64-bit CPU, as of this writing there is no firmware or kernel support for it arm64 mode yet. As such, you will be left with a 32-bit installation.
One-off raspi3 images are available which include the ppa-rpi3 PPA pre-installed. For installation details, see ARM/RaspberryPi.
This procedure assumes a working Ubuntu Xenial Raspberry Pi 2 installation. You will be converting a few things over to work on the RPi3, then doing a hardware swap from an RPi2 to an RPi3.
Be sure you have proper backups! This is not a foolproof or well-tested procedure; if it breaks, you get to keep both pieces.
Install a PPA which contains updated u-boot-rpi, flash-kernel and linux-firmware-raspi2 packages, and upgrade.
add-apt-repository ppa:ubuntu-raspi2/ppa-rpi3 apt-get update apt-get -u dist-upgrade
Install the RPi3 u-boot loader.
apt-get install binutils # Required by mkknlimg, may not be installed wget -O /tmp/mkknlimg https://raw.githubusercontent.com/raspberrypi/tools/master/mkimage/mkknlimg chmod 0755 /tmp/mkknlimg /tmp/mkknlimg --dtok /usr/lib/u-boot/rpi_3_32b/u-boot.bin /boot/firmware/uboot.bin
Remove uboot.env, as the updated flash-kernel package switches to using boot.scr on the RPi3. Run flash-kernel to install the new components.
rm -f /boot/firmware/uboot.env flash-kernel
Check that bcm2710-rpi-3-b.dtb and boot.scr have been created in /boot/firmware by flash-kernel.
Modify /boot/firmware/config.txt with at least the following configs:
enable_uart=1 device_tree_address=0x100 device_tree_end=0x8000 kernel=uboot.bin dtparam=i2c_arm=on dtparam=spi=on
enable_uart is needed by u-boot for all RPi3 modes, even if you have no intention of using a serial console. The device_tree options are needed to explicitly declare the DTB area, as the DTB is slightly larger than 16,128 bytes, and the bootloader otherwise assumes an address space of 0x100 through 0x4000.
Shut down the system.
Swap out the hardware from the RPi2 to the RPi3 and boot.
64-bit Raspberry Pi 3 kernel status is in its early days as of this writing (May 2016). The only known general-purpose working kernel is a 4.5.0 kernel from user "Electron752". Raspberry Pi firmware is working in 64-bit mode as of late April (with arm_control=0x200), and u-boot's 64-bit rpi_3 target is working as of version 2016.05.
Some forum posts describe building a "stubbed" u-boot which tells the RPi3 to switch to 64-bit mode, but this is no longer required with latest firmware and u-boot.
You may use 20160517-raspi3-arm64-firmware-kernel.tar.xz and manually integrate it into an Ubuntu arm64 userland installation. It's a tree consisting (only) of:
4.5.0+ kernel and modules from https://github.com/Electron752/boot64-rpi3 (stripped)
u-boot binary from u-boot 2016.05~rc3+dfsg1-1rpi3.2 (lp:ubuntu-raspi2/ppa-rpi3)
Firmware from linux-firmware-raspi2 1.20160503+6832d9a-0ubuntu1~rpi3 (lp:ubuntu-raspi2/ppa-rpi3)
- brcmfmac does not seem to recognize the 43430 wifi/bluetooth controller, even with firmware present.
- The kernel requires a custom DTB. Therefore u-boot loads and uses the standard bcm2710-rpi-3-b.dtb (same one compiled from the Ubuntu 4.4.0 kernels), then loads the custom DTB, overwriting 0x100 before handing off to Linux.
- Make sure flash-kernel (even the version from ppa:ubuntu-raspi2/ppa-rpi3) is not installed, as it will replace boot.scr with one which doesn't have the DTB loading hack.
VideoCore userland utilities are not yet available for arm64.
LP: #1578505 - flash-kernel: Raspberry Pi 3 support
LP: #1580323 - u-boot: Pull/merge 2016.05~rc3+dfsg1-1 from Debian experimental
Upstream Debian: Debian: #823524 - u-boot: Add rpi_3_32b target to u-boot-rpi
LP: #1578745 - linux-firmware-raspi2: Update firmware for Raspberry Pi 3 support
LP: #1580326 - livecd-rootfs: Add raspi3 subarch
MP: #293959 - livecd-rootfs: Add raspi3 subarch