Coreboot installation on Chromebook ASUS C201PA

Goal

In this manual I will try to explain how to install Coreboot (2018 year version) on the Chromebook ASUS C201PA (later referred in the manual simply as C201) with the Paper build system. At the time of writing up this manual (Q1 2018), Libreboot didn’t have any updated sources for this laptop, so I decided it would be better to use Coreboot.

Introduction

There exists a Libreboot Chromebook ASUS C201 installation guide, and I would suggest you to read that first for easier understanding and detailed insight about what we’ll be trying to achieve through this manual. The steps are not identical, you will actually be installing Coreboot, which is a different project, but it might give you some ideas first about similar hardware and software being used here. I suggest that you read more about the Coreboot project, before proceeding with the installation. First of all before proceeding with anything you should already have a working GNU/Linux operating system on the C201. This manual does not explain how to install a GNU/Linux distribution on the C201, so you will need to find this information elsewhere. At the time of trying out this Coreboot installation I had a working GNU/Linux Debian 9 Stretch operating system on the SD card and Chrome operating system on the eMMC internal flash drive. This is my review of the summary by Paul Kocialkowski’s sets of instructions. Paul is a Libreboot and Coreboot developer who was willing to assist me getting this properly installed on my computer. The summary of all performed commands is written into a text file, so make sure to double check that, because this website wrongly renders and displays some of the characters.

Requirements

  • Secondary laptop (the same laptop could also be used)
  • USB key
  • Thin piece of plastic (guitar pick) for laptop disassembly
  • Installation of additional programs “apt-get install flashrom gnupg”

Laptop disassembly instructions

First step that you need to do is removing the write protect screw, which is inside the laptop. Refer to the similar Libreboot manual to read more about it. First you need to unscrew 8 screws which are holding the laptop together. Two of them are below the plastic caps/stands. Use something like a sharp piece of plastic to slide below them and remove them. You will need to open up the chasis of the C201. Best thing that can help you with that is by using some very thin piece of plastic, something like a guitar pick would be good. I did not have that and have used a credit card which was already a bit too thick to slide inside. You need to divide the shiny silver upper part and the lower blue part of the C201 by placing a piece of plastic in between and sliding it all around the lower part of the laptop. Beware that inside the laptop are the plastic clips which are holding the two parts together so don’t go too deep with the piece of plastic, not to break those clips. When you manage to divide the bottom and upper part of the laptop you need to beware not to divide those two parts up completelly, because inside there are two striped connectors (one black wider one for keyboard and one white thin one for touchpad), so be carefull when detaching those straps not to tear them apart (you don’t really need to detach them, you can also line up the parts). When you have opened up the laptop put it into such position. Then you unscrew the inner screw which is being marked inside of the white circle on the photo. That screw is the write protection screw for Coreboot, so without it you will be able to install Coreboot. When that is done, just assemble the laptop back together by pushing both parts (shiny silver upper part and bottom blue part) and save the screw.

Installation

Boot into Chrome OS. You will need some storage to transfer the files from Chrome OS to your other computer, an USB key is fine. You need to be in Chrome OS developer mode. Log in as root user into Chrome OS. This is done with Ctrl + Alt + F1 (top right arrow). Sometimes the root doesn’t have the password set, so just use the enter key to bypass password. You should see a visible # as a prompt. Insert the USB key. It will probably automatically mount itself, in my case it has mounted under /media/removable/USBDRIVE . If the USB key doesn’t automatically mount, you will need to perform the mounting commands. You need to put a file (flash.img) on the USB key. Go to the USB key directory.

  • # cd /media/removable/USBDRIVE
  • # flashrom -p host -r flash.img

Copy file flash.img to USB key. Power off the computer and stick the USB key into another computer. Boot into your favourite GNU/Linux distribution. Install Paul Kocialkowski’s gnupg public key (fingerprint 01B7 0C5D 940C B63D 5FA6 12C2 84FD C1EA 8FEE 950C) for verifying the installer. Create a directory on the PC and copy file flash.img from USB key there. Run the following commands as normal user (non-root) on another computer:

  • gpg –recv-keys 8FEE950C
  • export DOWNLOAD_URL=http://jp.si/C201/paper-release-20180102/
  • wget “$DOWNLOAD_URL/tools/x86_64/libreboot-release/libreboot-release”
  • chmod a+x libreboot-release
  • ./libreboot-release prepare cros-scripts vboot-tools coreboot-depthcharge-veyron-speedy

You should see an output similar to this. Then continue with the following commands:

  • VBOOT_TOOLS_PATH=tools/x86_64/vboot/vboot-tools tools/x86_64/cros-scripts/cros-scripts/cros-firmware-prepare vpd flash.img extract vpd.bin
  • VBOOT_TOOLS_PATH=tools/x86_64/vboot/vboot-tools tools/x86_64/cros-scripts/cros-scripts/cros-firmware-prepare vpd images/coreboot/coreboot-depthcharge-veyron-speedy/coreboot.rom replace vpd.bin
  • cp images/coreboot/coreboot-depthcharge-veyron-speedy/coreboot.rom .

You should see an output similar to this. Copy coreboot.rom file to the USB key. Power up C201 again and boot into Chrome OS. Insert the USB key and go into USB key directory, then type as root:

  • # flashrom -p host -w coreboot.rom

You should see a message like this:

erasing and writing flash chip…..Verifying flash….VERIFIED

SUCCESS

Then check the output of the crossystem command

  • # crossystem | grep dev_boot

If you see:

dev_boot_usb=1 , dev_boot_legacy=0 , dev_boot_signed_only=0

Then it is OK to reboot the C201. And that’s it. Commands that can be used during the Coreboot boot menu are:

  • Ctrl+h = Pauses the screen
  • Ctrl+u = Boots the GNU/Linux distribution (default is ChromeOS)

Disclaimer

Be sure to read the disclaimer before proceeding with the installation.


Posted

in

, , , , ,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *