Asus Chromebook C201

Intro
While there's a fair bit of documentation on how others have installed Devuan/Arch on this computer, there's very little information in the Gentoo realm on the C201/C100p (or other devices with a RK3288). I'll be slowly documenting my steps on how I managed to get Gentoo working on the Asus C201 Chromebook. In my case, I went the Libreboot route, but that's up to you.

Specs:
 * Internal name: veyron/speedy
 * SoC: Rockchip RK3288
 * CPU: Quad-core ARM Cortex-A17 @ 1.8 GHz
 * GPU: Mali T764
 * Audio: Rockchip I2S
 * 11.6" screen
 * Ram: 2 or 4 GB

What works

 * Suspend/resume
 * Wireless (on newer kernels, with patch)
 * X w/ randr (HDMI assumed to work, not tested)
 * ACPI events (lid, buttons, charger)
 * Audio
 * Touchpad
 * Everything else!

What doesn't

 * No GL. Apparently you can get OpenGLES/EGL working with the Mali T764, but I had no such luck (nor did I try very hard - there is no acceleration for X at the moment, and the blobs are closed source). Future progress in this area likely to come from https://notabug.org/cafe/chai
 * Bluetooth - Bluetooth works, but if you load the module at any time, it will crash both itself and wireless if you attempt to suspend. More to come...
 * Wireless without blobs - brcmfmac requires non-free firmware here.

Considerations

 * You'll likely want a USB ethernet dongle until you get Gentoo running. Ensure the module is included with your kernel or built-in if you're using the Devsus script to create a bootable USB.


 * This laptop is speedy for its size, but still takes a long time to emerge larger packages. I made heavy use of distcc and crossdev's armv7a-hardfloat-linux-gnueabi target.
 * There is only 16GB of internal storage space available. I use an SD card for my /home and a decent USB flash drive to compile larger packages on (firefox/libreoffice).
 * You can decide on using either the ChromeOS kernel (linux 3.14) or mainline with patches. Despite a large majority claiming you will lose functionality on newer kernels, this was not the case for me; in fact, it fixed several issues from harmless warning messages in logs to X locking up entirely. See below how I recommend building a newer kernel.
 * I recommend adding the arm_support overlay
 * DO NOT disable cros' developer mode until you are ready! If you cannot boot your kernel, you will not be able to boot from your install medium and will be forced to powerwash your Chromebook. Even if you can, you will need crossystem/mosys to change these flags. This is the solution if this happens to you on Libreboot, though wait for partition 5 to complete instead.

Starting out
First, you must enable developer mode, unsigned boot and booting from external mediums. Look here for more information.

This laptop uses a depthcharge payload to boot, thus standard minimal ISOs will not work here. I recommend creating a Devsus image and writing it to a flash drive to use for your installation medium. If you do so, modify the config file to include your

I also highly recommend you backup your ChromeOS partition (mmcblk0), however you can easily restore ChromeOS if you mess up. You can create one through desktop Chrome or download the files manually to write to a USB drive.

Once you're booted into your minimal enviroment and have obtained an internet connection via either wifi or an ethernet dongle, obtain vboot-utils from whatever distro you're on. We will now wipe ChromeOS and setup a partition for our kernel, and leave the rest for root.

Partition the rest of the free space how you wish with gdisk. Put your root filesystem directly after the kernel partition.

If you plan to use the kernel on your USB drive, simply dd the kernel on your flash drive to the internal storage and copy all modules from it:

Optionally, you can copy the firmware blobs you backed up earlier to lib/firmware on your internal storage root.

At this point, you should follow generic stage3 install steps. Mount your root filesystem wherever and setup stage3/Portage:

4.13+ kernel configuration
TODO: paste kernel creation script, copy to usb/scp kernel and modules to chromebook, +wifi patch

Suspend
TODO: suspend with lid

ALSA/Pulse quirks
TODO: alsa mute speakers/unmute on headphone plug, pulse config

Keybinds
TODO: sound and brightness keys, power button as delete key, reassigning other keys

Other quirks
TODO: cpu temp location, acpi-tools broke/upower for battery time remaining

Resources
https://notabug.org/dimkr/devsus

https://github.com/Miouyouyou/RockMyy

http://www.synkhronix.com/journal/gentoo-chromebook

https://wiki.debian.org/InstallingDebianOn/Asus/C201

+ Archlinuxarm and the Rockchip devs for their contributions.