Banana Pi the Gentoo Way

This guide is going to provide details on how to install Gentoo with a user compiled kernel and Gentoo Stage 3. I have been using Banana Pi's in a clustered distcc cross compiling environment for nearly a year.There has been a lot of controversy about the Banana Pi and it developers. The hardware is a nice board, but some of the practices concerning the methods undertook by the developers concerning business practices and the software side is certainly controversial. Best summed up on the Linux-Sunxi.org/Banana_Pi page.

To provide some clarification on documentation from different sources. Nearly everything provided on the Lemaker websites, and other Banana Pi websites has been copied from the Linux-Sunxi.org pages. One controversial practice undertaken by Lemaker, has been their duplication of the Linux-Sunxi.org git repositories, then presented as their own. For some reason, Lemaker preferred to maintain their own full kernel git repositories rather than simply having a simple patch repository and providing them to upstream Linux-Sunxi.org to be included in their git repositories. Some early patches were provided and are included in the Linux-Sunxi.org git repositories, but latter refinements have not been submitted for inclusion.

I have to provide some cautionary advice concerning some of the ready to go images for the Banana Pi, along with some of the git repositories. I have found numerous posts on a number of forums as well as the Lemaker forums themselves, with claims of malicious content. I my self have not bothered with disseminating any of the so-called official releases, and cannot confirm any of the claims. Considering the clashes and legal disputes over trademarks and domain ownership. It may certainly be true that some parties may have injected malicious content in an attempt to harm other participating parties.

The best way to avoid any possible security risks, is to use software that has been reviewed and tested by a reputable process and group. Therefore this guide will provide details on how to compile a kernel from the soc developers git repository (Linux-Sunxi.org), as well as from the Banana Pi (Lemaker) developers git repository. While using a standard Gentoo Arm Stage 3 pulled from an approved Gentoo Mirror.

To speed up compilation, it is suggested that you set up a distcc cross compiling environment on an Amd64 or other faster architecture. Distcc and Distcc/Cross-Compiling. Not all packages will compile on other machines in the cluster, but many will. If you have a number of Banana Pi devices, use the buildpkg feature so that binary packages are built that can then be quickly installed on the other Banana Pi's or distributed to devices in other locations. An NFS mount can be used for the packages directory mounted on all the Banana Pi devices.

This is a work in progress, please bear with me as I review my notes and figure out the best way to present them here. For the time being, here is one of my forum posts, concerning getting the right CFLAGS for the Banana Pi.