Except as otherwise noted, the content of this page is licensed under a Creative Commons Attribution 2.5 license, and examples are licensed under the BSD License.

The Chromium OS designs and code are preliminary. Expect them to evolve.
For Developers‎ > ‎How-Tos‎ > ‎

Build Instructions (ChromeOS)

New Instructions

The instructions below appear to be obsolete, but I am too chicken to remove them.  Please take a look here first.

Old and Probably Obsolete Instructions

Building

Chrome on ChromeOS is built on a mix of code sourced from Chrome on Linux and Chrome on Windows. Much of the user interface code is shared with Chrome on Windows. As such, if you make a change to Chrome on Windows you may find your changes affect Chrome on ChromeOS. Fortunately to test the effect of your changes you don't have to build all of ChromeOS, you can just build Chrome for ChromeOS directly on Linux. The steps look very similar to the standard Chrome for Linux build. Here's what to do:


  1. Install all the prerequisites.
  2. Make sure you have git and subversion:

    sudo apt-get install git-core subversion

  3. Follow the instructions to get the standard Chrome code here, but add the following lines to your .gclient file:

      { "name"        : "cros_deps",
        "url"         : "http://src.chromium.org/svn/trunk/src/tools/cros.DEPS",
      },

  4. Set GYP_DEFINES in your environment to include chromeos=1.

    export GYP_DEFINES="chromeos=1"

  5. gclient sync, and proceed with the rest of the normal Linux build instructions as usual.
Note that when you build ChromeOS Chrome, you'll be using the TOOLKIT_VIEWS frontend just like windows, so the files you'll probably want are in src/ui/views and src/chrome/browser/ui/views, not src/chrome/browser/ui/gtk!  Also, if chromeos=1 is specified, then toolkit_views=0 must not be specified.


Note also the underscore in the GYP_DEFINES variable name, as people sometimes mistakenly write it GYPDEFINES.

Running

The current build of ChromeOS on Linux opens in full-screen mode, and it's not possible to leave full screen.  In order to work around this, pass the --chromeos-frame option to the chrome binary.

To specify a logged in user, add the following to the command line: --user-data-dir=/tmp/chrome --login-profile=user --login-user=username@gmail.com. This is useful for debugging features like sync that require a logged in user.