Raspberry Pi 3 64 bit Install

History
Its been about a year since the Raspberry Pi3 with a 64bit capable CPU became available. At the outset, it was difficult to install Gentoo on the Pi 3 in 64 bit mode. A lot of work by a lot of people has almost brought a 64 bit Gentoo install on the Pi 3 down to a standard handbook install.

What Works
All the Pi 3 hardware is supported in 64 bit mode. That's WiFi USB Ethernet (needs USB) Bluetooth Hardware Video Acceleration Sound over HDMI

Untested
PAL/NTSC Video Output Analogue Sound Output

Whats Required
Gentoo Install on a PC microSD card reader for the PC Raspberry Pi 3 microSD card > 8G USB Keyboard USB Mouse HDMI Display The content of the microSD card will be wiped during the install.

Installation Overview

 * Install crossdev on the PC
 * Fetch the Raspberry Pi firmware
 * Fetch the Raspberry Pi kernel
 * Partition the microSD card
 * Fetch the Gentoo bits of the install
 * Cross compile and install your kernel
 * Setup
 * Boot the Pi to Test

Install Crossdev on the PC
There are no prebuilt kernel images for the Pi3 in its arm64 mode. Until you have a arm64 kernel, you can't boot it in 64 bit mode. Its a little chicken and egg. Once the Pi is running, it can build its own kernels.

crossdev is Gentoos' tool for building cross compiler tool chains. Once its installed, we will use it to build the arm64 kernel on the Gentoo PC.

will install the tool.

Using Crossdev
On your main Gentoo system. There are other parameters you can pass to crossdev too.

This will create a cross toolchain that builds things into /usr/aarch64-unknown-linux-gnu/ This is the target root.

Fetch the Raspberry Pi Firmware
The Raspberry Pi Firmware is maintained in a git repository. {rootcmd|emerge git -av}

Don't do anything you don't need to do as root.

As your normal user, make some space in the home directory for raspberry pi mkdir raspberrypi will do nicely.

cd raspberrypi git clone ...

will fetch the Pi firmware. This will

Fetch the Raspberry Pi Kernel
Stay in raspberrypi and

git clone ...

will fetch the kernel.