Setting up your ARM Chromebook for development
This is a follow up to my previous post about using a ChromeOS device as your development machine. If you haven’t read that first you do so here.
So maybe you’ve got the new Asus Flip or some older ARM Chromebook that you want to use for development but you realized something. Your Chromebook isn’t the usual 64-bit architecture. Don’t think that this means you’re completely out of luck, you may need to jump through a few specific extra hoops but you’ll get there using Crouton.
Where setting up your ARM Chromebook really differs from an x86_64 architecture, is in the amount of options that you have. You can technically hack your way into the Gentoo core of your Chromebook and install the packages you need manually (though you’ll likely have to recompile a bunch yourself) but after testing this I wouldn’t recommend it. Instead your best option is to build yourself a Crouton chroot and work from there. You will have a far greater support from the community.
If you’ve never used Crouton before navigate to David Schneider’s (dnschneid) GitHub repo and check out the documentation first. Though the project may be several years old now not much has changed. The name of your Crouton will be the same as the release unless you specify it. Before you install anything take a moment to check out your options.
By default Crouton used to target an old version of Ubuntu, 12.04, which is rapidly approaching its end of life with updates. Inspecting your options for releases you can target either Ubuntu, Debian, Kali each with different options. Officially currently only Debian is “supported” though there seems to be little difference between supported releases. For installation today you’ll need to specify which release you want, I recommend either Xenial or Jessie. At the same time be sure to inspect the targets, to make sure you don’t miss out on a lot of functionality. Be sure to read your options and pick what you need. If you pick xiwi, you’ll need to install the Crouton Chrome extension which will let you move your chroot around in its own window. Its a cool addition but be warned your performance may take a hit.
For reference here is my installation:
chronos@localhost / $ sudo sh ~/Downloads/crouton -r xenial -t chromium,x11,xiwi,xfce,audio,core,gtk-extra,xorg,cli-extra
Congratulations! Once you’ve got Crouton installed and set up you’ve greatly expanded your functionality. To start your new chroot all you need to do is go to your crosh shell and run the enter command. If you installed Xiwi, you will enter a new windowed session of your chroot. Now we need to get a few more things up and running before we can start using the chroot as a development environment.
The first thing that you’ll need to do is make sure that you have curl installed since you’ll be using the command in a minute. For an Ubuntu derivative or Debian you’ll need to run this command:
sudo apt-get install curl
If you prefer Python then you’re already in luck, its installed by default. Personally I’m Rails developer so I want to install Ruby on my chroot so I’ll do that now. In a minute we’ll install Ruby Version Manager (RVM) to manage things but first lets get one version working. Use the command below and if you have any questions be sure to refer to the Ruby language documentation.
$ sudo apt-get install ruby-full
With curl installed it’s time to grab RVM which we can use to install Rails. Navigate to RVM’s install page and grab Michael Papis’s GPG key and add it to your new install (copy and paste it into a new terminal to add it to your keyserver). Now you can grab both them both with this command:
$ \curl -sSL https://get.rvm.io | bash -s stable --rails
Once you get Rails installed you’re nearly done. The last necessary elements are getting Git installed and a text editor.
$ sudo apt-get install git
Once you’ve got Git and your libraries installed you’ve got your basic development set up just like any non-Chromebook! Take a moment at this point and make a back up of your chroot before installing to much to personalize your environment. Once you’ve got this backup, stash it in your GDrive! Now should anything happen to your environment you have a backup you can restore from with minimal work.
The best part about leveraging Crouton in your development setup is that it shares your Downloads folder with your ChromeOS setup. The one biggest drawback to ARM devices is the lack of great text editor. Using the shared Downloads folder and the Chrome web app Caret you can create the code outside of Crouton and still access inside the chroot.
Now you’ve got a basic development environment on your ARM Chromebook! From here you can tweak it to meet your needs. Treat your new chroot exactly as you would a clean install of any other Debian or Ubuntu system. Need a package manager? Install Synaptic (the answer to that one is yes). Need PostgreSQL? You can do that. The only question left now is what do you want to make first?