Disclaimer

The step-by-step guidelines below from ARM contain information about downloading and installing files, licensed by third parties, which are subject to their own licence terms and conditions.  The step-by-step guidelines are delivered to you for your convenience, and your use of such downloads are expressly subject to those third party terms. You hereby agree to comply with all the terms and conditions imposed on you by the relevant third party terms. You acknowledge that ARM shall have no liability to you in respect of those third party files and that your use of the step-by-step guidelines is at your own risk.

1. Introduction

google-chromebookThis is a guide for building a bootable SD card to run Linux on the Samsung Chromebook XE303C12 as an alternative to Chrome OS™ operating system. The guide assumes some Linux experience as a user and programmer. More specifically, one should be familiar with opening and executing commands in a terminal, mounting/unmounting storage devices and navigating the GUI. The supported windowing systems are fbdev (direct frame buffer access) and X11. The instructions are written for all variants with accompanying notes where there are differences.

2. Prerequisites

You will need the following items in order to complete the instructions in this guide:

  • Samsung Chromebook XE303C12
  • Full size SD Card with at least 1GB Capacity
  • Host PC with a 64-bit distribution of Linux such as Ubuntu 12.04.3 LTS 64-bit
  • 3GB of free disk space
  • A USB-Ethernet adapter to enable network communications.

3. Set up the host Ubuntu system

This step is to prepare your host Ubuntu system to compile and install the Chromebook software. You may use an alternative Linux distribution but these instructions have been tested only with Ubuntu 12.04.

3.1 Ubuntu packages

Run the following command to install all the required packages on the host Ubuntu system:

3.2 Initial work directory

Download the mali-r4p0-02rel0-chromebook-setup-2014-07.tar.gz archive and extract it in an empty directory:

3.3 Cross-compiler toolchain

Run this command to download and extract the Linaro Hard-Float ARM cross-compiler tool chain:

3.4 User-side MALI drivers

Download the MALI-T604 r4p0 user-space driver archives after accepting the user license, then extract them in the work directory:

3.5 Ubuntu Core

Download the pre-built Ubuntu Core 14.04 ARM Hard-Float file system archive to be used on the Chromebook (do not extract):

4. Prepare the SD card root file system

This part is to format the SD card, install and configure the root file system.

4.1 SD card block device

Insert the SD card to a SD card reader on your host computer. There should be a new block device corresponding to the SD card which you can discover by running lsblk:

In this example, /dev/sdc is the SD card of 4 GB in capacity. From now on, the SD card device shall be referred to as /dev/sdX.

4.2 SD card partitions

Run the following command to create the partition table and format the root partition on the SD card (replace /dev/sdX with your actual SD card blok device):

4.3 Root file system

The commands below will mount the root file system partition in /mnt/chromebook although it can be set to anything else if needed. They rely on the previous steps to have installed the pre-built packages in the work directory. Run these to install Ubuntu Core, configure the system including X11 and install the MALI user-side drivers (again, adjust /dev/sdX):

5. Build and flash the Linux kernel and bootloader

This step is to build the standard Linux kernel for the Chromebook repository. It relies on the cross-compiler toolchain to be installed as in section 3.

5.1 Get the source code

Run the following command to clone the kernel repository in the current working directory under kernel:

5.2 Build the kernel

Run the following command to build the kernel:

Note: The last argument can be set to s for Samsung Chromebook or hp for the HP Chromebook device.

5.3 Install the kernel modules

Once the building process is complete, you can install the kernel modules. It assumes the root file system is mounted in /mnt/chromebook as instructed in section 3.

5.4 Build and flash the bootloader with kernel image

You need to generate the boot partition using a tool called vbutil_kernel. It is not available in the repository so you need to build it from source. Run the following commands to get the vboot code, build it and install it as well as the Linux kernel image (again, adjust /dev/sdX):

Note: As in step 5.2, the last argument can be set to s for Samsung Chromebook or hp for the HP Chromebook device. Note: The build_vboot command also creates a boot_params file with the kernel command line. You can now eject the SD card (again, adjust /dev/sdX):

6. Prepare the Chromebook

This step is to prepare the Chromebook firmware to run from the newly prepared SD card.

6.1 Enable Developer Mode

You first need to enable Developer Mode on the Chromebook to allow booting of an alternative operating system from USB/SD card with the following procedure: Warning: Enabling Developer Mode will erase all user data. Make a back-up first.

  1. Eject the SD card from the host PC and insert it into the Chromebook while it’s powered off.
  2. Enter Recovery Mode by holding the ESC and REFRESH (↻ or F3) buttons, and pressing the POWER button.
  3. In Recovery Mode press Ctrl+D and ENTER to confirm and enable Developer Mode.
  4. After the system reboots, press Ctrl+D to boot into Chrome OS when a warning about ‘OS Verification’ is displayed. The system will offer to cancel the transitioning to Developer Mode for 30 seconds. With no further action, it will erase all user data. This process may take up to 20 minutes.
  5. Once this process is complete the system will reboot; press Ctrl+D to boot into Chrome OS.
  6. Press Ctrl+Alt+ (or F2) to switch to a virtual terminal.
  7. Login with username root and an empty password.
  8. Enable booting from USB/SD card with:

You will now be able to boot from USB/SD card by pressing Ctrl+U after powering on the Chromebook when the ‘OS Verification’ message is displayed. To boot in normal Chrome OS mode, press Ctrl+D. The Chromebook should now be able to boot in fbdev mode, i.e. without any windowing system. See section 7. to enable X11. Log in as root with an empty password. Note: The graphical performance is currently suboptimal in fbdev mode.

6.2 Network

After connecting to a network with a USB-Ethernet adapter, run the following command to use DHCP:

7. Enable X11 windowing system

To enable hardware-accelerated graphics rendering with X11, you will need the armsoc DDX driver and compatible MALI user-space driver. As armsoc is not available in the repository, you need to build it from source. The install-x11.sh script can be used to automate this; it was copied to the SD-card in part 4.3. Boot the Chromebook, log in as root and run: