Asus Chromebook C201/Installing Gentoo

This guide is about installing Gentoo on the eMMC of an Asus Chromebook C201.

Additional hardware requirements

 * USB ethernet adapter

Obtaining installation media
Consult the guide on creating bootable media for depthcharge based devices for instructions on how to manually create the installation media.

Preparing the device
To be able to boot from external media like USB drives, the Asus Chromebook C201 first needs to be switched into developer mode.

This can be achieved by pressing ++ when the device is switched off to enter the.

Pressing + and then following subsequent on-screen instructions enables the.

Finally one of the parameters needs to be modified: Boot the device and enter Chrome OS'  shell, e.g. by opening Chromium Browser and hitting ++. Enable booting from external media:

Booting the installation media
Power on and when the boot screen is displayed press + to boot from the installation media. Log in (in case the installation media was manually created following the instructions referred to above the username is ‘root’ and the password is ‘gentoo’).

Configuring the installation media
Begin with configuring the network.

Once a network connection is established make sure Portage is set up:

Now install required tools ( and ):

Preparing the disks
Cf. Handbook: Preparing the disks

Recommended partition layout and size - a GUID Partition Table (GPT) is mandatory:

Finish the preparation of the partitions by creating a filesystem on the root partition. Replace with any suitable filesystem type, e.g.  or.

Depthcharge, the chromebooks’ bootloader, requires some specific parameters to be set. These signal the bootloader the presence of a valid kernel partition:

Mount the root partition:

Installing the Gentoo installation files
Choose an stage3 from the main website's download section or consider going for an  stage3 from the Hardened musl project. Follow Installing the Gentoo installation files from the Handbook.

Installing the Gentoo base system
Skip "Mounting the boot partition", apart from that follow the Handbook for Installing the Gentoo base system.

Configuring the Linux kernel
Install the tools required for deploying the kernel (, and ):

Configure as usual, cf. Configuring the Linux kernel. Alternatively refer to the RockMyy repository to include Mali GPU drivers.

Building the kernel and device tree binaries
From the kernel build directory, copy the zImage and the target device's device tree binary to the desired working directory. Replace with the filename of the target device's device tree binary, e.g.  for the Asus Chromebook C201 (which is based on Rockchip's RK3288 SoC and a board with the codename "Veyron Speedy").

Optional: Creating a custom initramfs
Follow instructions from the Custom Initramfs article. Embed the initramfs into the kernel or create it as a separate file (cf. Custom Initramfs - Creating a separate file):

Creating the FIT image
Change to the directory where the kernel, the device tree binary and (optionally) the initramfs are located:

Create the configuration file ("") for the Flattened Image Tree (FIT) with the following content. Again replace with the filename of the target device's device tree binary, e.g.  for the Asus Chromebook C201.

Pack the FIT image:

Preparing verified boot
Create a file ("kernel.flags") for the CMDLINE parameters. Replace with the root partition's filesystem type, e.g.  or.

Sign and pack the kernel:

Installing the kernel
Install the modules, keeping them small to save some space:

Install the kernel image to the kernel partition:

Configuring the system
Consult the Handbook again for Configuring the system.

Installing system tools
Stick with the Handbook: Installing system tools

Finalizing
Finalize the new Gentoo installation according to the handbook. To use wifi remember to install :

Also keep in mind that the built-in wifi requires proprietary firmware.