Embedded Development on Cheap Chromebook Hardware

Why Develop on a Chromebook?

In embedded and web development the interesting cycles happen on the target hardware. The development host doesn’t have to be a powerful machine. A chromebook with a dual core i3 and 4GB of RAM will connect to remote web servers and compile embedded programs quickly. They come in a lightweight laptop form factor with 8 hours of battery life and boot quickly. Having a long-lasting development rig makes it easy to have your development environment with you anywhere. Embedded development has some other challenges to decouple from physical location, but that’s another blog post.

They’re Cheap

An Acer 720P with a 128GB SSD is only $400 (at list) and leaves an extra 32GB SSD to drop into an enclosure. The Acer Chromebook 15 looks to be a worthy successor. The 1366×768 resolution on the 720P is workable, but the extra viewing area on a 1920×1080 screen is worth the extra 100. Look for models with the core i3 processor, as much RAM as possible, and a replaceable SSD.

It’s already running Linux…

For web development a chroot installed with crouton gives enough access to Linux tools to develop. The chroot can control USB devices, like a USBUART or JTAG programmer, so some embedded work can be done. Unfortunately, within a chroot, systemctl commands such as starting a TFTP server for an embedded Linux device running u-boot are replaced with NOPs. Most embedded development environments will want to run a full-blown Linux installation.

…and has its own Linux distro

That need brings us to GalliumOS. A distribution, based on xubuntu and xfce, targeting chromebook and chromebox hardware. Since the developers test on ChromeOS devices they have already fixed configuration problems with trackpads, keyboard backlights, function keys and most other hardware problems encountered using the xubuntu distribution directly. GalliumOS 2.0, which went into beta at the end of May 2016, is based on upstream Ubuntu 16.04 Long Term Support release. Giving the development team five years of security and bug fixes upstream leaves the developers free to tackle the particulars of running Linux on ChromeOS hardware. If you ask good questions, the project has an active subreddit and irc channel, so support is readily available.

Replacing ChromeOS with GalliumOS

The GalliumOS wiki has comprehensive installation instructions for most hardware. If the device is listed on the chrx compatibility list, run the chrx scripts from ChromeOS to setup dual booting. Chrx can also be used to install other distros, but those will need updated configurations for the hardware.

  1. Lookup hardware on the compatibility list. The C720P is a Haswell device, codenamed PEPPY, and can be used with factory firmware, which is nice.

  2. Follow the directions for Preparing the device.
    If the factory firmware supports the RW_LEGACY boot option that’s the easiest to get running, requiring only some flags to be set within ChromeOS. RW_LEGACY allows you to dual-boot with ChromeOS, if desired. However, it requires pressing Ctrl+L at the white developer screen during each boot to enter the legacy boot system. To remove the developer screen and enable a boot with no input, you can reflash the BOOT_STUB or complete Firmware. Unless you have the tools to reflash via the JTAG interface, updating the firmware brings a very small risk of bricking your hardware. Completely read through the instructions before following along.

  3. Download the ISO

  4. Write it to a USB drive or SD card

  5. Reboot into GalliumOS live
    Make sure to press Ctrl+L if the white developer screen appears

  6. Run the installer
    The defaults install a single partition for the entire SSD. A separate partition for /home will preserve user data across fresh installations.

  7. Reboot into GalliumOS
    Enjoy your cheap new Linux box.

Leave a Reply

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