User:NeddySeagoon/Raspberry Pi 3 64 bit Desktop

Introduction
The 64 bit @system install and the odds and ends described in the [Gentoo_Handbook] were fairly straight forward. The only unusual steps were for the kernel, which needed to be cross compiled.

Xorg and Xfce4 described here have been tested by several people and are included is several of the Gentoo images available for 64 bit Raspberry Pi. However, keywording is a work in progress, especially for the plugins.

Users following this guide are encouraged to make use of package.accept_keywords and file pull requests on Github or bugs for adding the ~arm64 keyword after they have built and tested a package.

While this guide describes Xorg and Xfce4, everyone will want Xorg but the Xfce4 steps are intended to be generic enough to be applied to other lightweight Window Managers.

Wayland users should write their own guide.

Overview
Set up make.conf Follow 2015-10-22 GCC 5 Defaults to the New C++11 ABI News Item Install and test xorg-server Install and test xfce4-meta Install and test Xfce plugins

Populate package.accept_keywords as you go.

There's just not enough RAM for gcc and Xfce.

Set up make.conf
Choose the desktop profile

USE flags
USE="arm64 egl gles1 icu minizip openssl pcre16 postproc python     qt5 script sqlite svc threads xvmc     -modemmanager -pam -skia"
 * 1) skia wants to link to neon stuff but it doesn't build, in firefox anyway.

CFLAGS
CFLAGS="-march=armv8-a+crc -mtune=cortex-a53 -ftree-vectorize -O2 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}"

LINGUAS
L10N="en en-GB" LINGUAS="en en_GB"
 * 1) LINGUAS should be redundant but some overlays may still use it.

Use your language codes here

MAKEOPTS
MAKEOPTS="-j5"
 * 1) we don't have the RAM for -j5 on most things but ...
 * 1) run package lists for lesser MAKEOPTS in .env

/etc/portage/env/
Global environment override files go here. Feel free to add your own too.

Make the following files.

MAKEOPTS="-j1"
 * 1) use this for things that fail with any parallel make at all

MAKEOPTS="-j2"
 * 1) use this for things that fail at higher parallel makes that -j2

Having made some global environment override files they can be used by referring to them in /etc/portage/package.env

/etc/portage/package.env
app-text/libmwaw MAKEOPTS-j2 dev-libs/boost MAKEOPTS-j2 dev-java/icedtea MAKEOPTS-j2 games-emulation/sdlmame MAKEOPTS-j2 media-tv/kodi MAKEOPTS-j2 mail-client/thunderbird MAKEOPTS-j2 www-client/chromium MAKEOPTS-j2
 * 1) app-text/libmwaw loadave gets up to 17!
 * 1) net-libs/webkit-gtk MAKEOPTS-j2

net-libs/webkit-gtk MAKEOPTS-j1 www-client/firefox MAKEOPTS-j1
 * 1) list things that need MAKEOPTS-j1 ... maybe

sys-devel/gcc MAKEOPTS-j1
 * 1) building gcc with USE=gcj needs -j1. Without, -j2 seems to work.

Its harmless to use the above as a starting point.

Xorg Bits
INPUT_DEVICES="evdev"

VIDEO_CARDS="fbdev vc4"
 * 1) vc4 is very new if it breaks, you can keep the pieces
 * 2) fbdev gives us a fallback

The console cursor may stop flashing The console will not respond to the return key htop (if its running) may go 10 minutes between updates The Pi runs short of RAM (swap can't be used for some things) and a lot of tasks get into the ready to run state. As a result, load averages in excess of 17 have been seen, even running with MAKEOPTS="j1".

Do not stop the Pi. the kernel will invoke the Out Of Memory manager the kernel will panic normal will resume Let the system run overnight.

Upgrade to gcc-5.x
If you want to build icedtea java later, be sure to set the gcj USE flag.

Select gcc-5.x

Follow the 2015-10-22 GCC 5 Defaults to the New C++11 ABI News Item to update all the installed C++ code to be compatible with the new C++11 ABI

Install and test xorg-server
Its as easy as

Skip the xorg-server testing step at your own risk but be aware that if Xfce4 won't start, it's likely to be the first thing any helper will ask you to do.

To test run This will install everything that the default startx command needs to start but not list twm xclock and xterm in the world file, so that --depclean can clean them later.

If you don't have a normal user, make one now.

and set the password for.

Log in at the console as which should show three xterms and an analogue clock

Inspect /var/log/Xorg.0.log, it should include references to vc4 and modeset(0).

[ 3572.231] (II) modeset(0): [DRI2]   DRI driver: vc4 [ 3572.231] (II) modeset(0): [DRI2]   VDPAU driver: vc4 [ 3572.237] (II) AIGLX: Loaded and initialized vc4 ... [ 3572.015] (II) modeset(0): glamor initialized [ 3572.015] (II) modeset(0): Output HDMI-1 has no monitor section [ 3572.015] (II) modeset(0): EDID for output HDMI-1 [ 3572.015] (II) modeset(0): Printing probed modes for output HDMI-1 [ 3572.015] (II) modeset(0): Modeline "1920x1080"x60.0  173.11  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync (67.2 kHz) [ 3572.015] (II) modeset(0): Output HDMI-1 connected [ 3572.015] (II) modeset(0): Using sloppy heuristic for initial modes [ 3572.015] (II) modeset(0): Output HDMI-1 using initial mode 1920x1080 +0+0 [ 3572.015] (==) modeset(0): Using gamma correction (1.0, 1.0, 1.0) [ 3572.015] (==) modeset(0): DPI set to (96, 96)

This is not conclusive that hardware acceleration is is use, it can still be blocked by permissions but its very encouraging.

Should you see (II) FBDEV(0) /var/log/Xorg.0.log then the vc4 driver is not in use.

The framebuffer driver works, its just slow, so it can be fixed now or later.