Orange Pi PC/Quick Start

This document describes how to install Gentoo on an Orange Pi PC without compiling the u-boot bootloader or the Allwinner Linux kernel.

Prerequisites

 * microSD card (at least 4 GB Class 6, better 16 GB+ Class 10)
 * Orange Pi PC Linux SD card image (any will do, here we use the Debian_jessie_mini image from the Orange Pi forum)
 * Gentoo armv7a_hardfp stage3 from or your local mirror
 * current snapshot of the portage tree from or your local mirror

Preparing the SD card
We need to transfer the boot loader and kernel from the image to the SD card. The boot loader resides in the unpartitioned space before the first partition, and the kernel resides in the first partition.

Copying the boot loader and kernel
Uncompress the image if it is compressed. We assume that the image is called Debian_jessie_mini.img and the SD card is /dev/sdb. Adjust to match your configuration if necessary. Look at the image partition structure:

In this case we will copy the image right until the end of the boot partition to the microSD card.

Next we will remove the partition table entry for the previous root partition, then create the new root and optionally swap partitions.

Setting up the root partition
We assume that the root partition is /dev/sdb2 and the swap partition is /dev/sdb3.

Create the root filesystem with label "linux" and the swap space.

Install Gentoo to the SD card
Mount the root partition and extract the stage3 tarball and portage snapshot.

If the original Linux image supports multiple boards, mount the boot partition and choose the correct uImage and script.bin for the Orange Pi PC.

Now extract the kernel modules from the image and copy them to your Gentoo system:

Finish configuration
Edit.

Set a root password.

Set compiler and make flags in.

To work via the debug ttl uart, change:

to

That's it! Now unmount everything, insert the SD card into the Orange Pi PC, and power it on.